Linux.conf.au 2014 – Day 2 – Session 1 – Open Programming Miniconf

Keeping Current: Maintaining an internal fork by Benno Rice

  • FreeBSD contributor, works for EMC isilon division
  • OneFS file system runs on appliances FreeBSD
  • OneFS = FreeBSD + stuff
  • Various add-one. Pretty interfaces, file system, etc
  • Some changes upstreamed but not others
  • We maintain a divergent fork of FreeBSD

Strategy:

  • Don’t maintain a fork
    • Version is old. 7.3 from 2010 plus backports
  • Don’t get behind
    • Need to catchup and stay caught up
    • Track FreeBSD-current
    • Do our own releases
  • Don’t track branches
    • upstream as much as possible to minimise diffs
  • Upstream as much as possible
    • Code checkout 5GB
    • Pile it all up approach approach – bulk merge and fix things – no timeline – no way to test
    • Pretend we use git approach
      • merge changes from bsd and apply
      • subversion couldn’t do directly, fixed with script
  • If your tools don’t do what you need fix them
    • worlds ugliest rebase – merge in all changes since 7.3
    • eventually got there
    • merge 20 changesets and then test a bit. bisect changes
    • 9 weeks of work to get to FSB v8
  • Don’t Stop
    • Got to keep tracking it forever
    • need to work out when to do releases

 

USB and Android by Joel Stanley

  • Last 3 years making consumer electronic devices, all talk to USB
  • Android as a tool
    • cheap, portable, lots of connectivity
    • No licensing worries vs laptops
    • Lots of features
    • Works out of the box
  • USB APIs as of Andriod 4.0
  • Normally runs in peripheral mode – we are interested in host mode
    • Most hardware requires a dongle
    • ADB over TCP to debug
    • Asus Transformer
  • Architecture
    • libusb  – std Linux
    • app.so – Same as linux version
    • C wrapper – app code created and mait by C, simplyfyin Java
    • JNI
    • App Classes – calls into C code
    • User Interface
  • Java Naive Interface – JNI
    • C can call Java
    • Jave can call purpose-written C-code
    • Hard to get started with, look at others people code off github
  • Native Development Kit
    • C/C++ cross compiler for targeting Android
    • Provided by Google
    • Used it to compile shared libs
  • Android permissions
    • Limits access to device files
    • No auto access to hardware, can’t hard-code since USB is dynamic
    • Get permission in Java code and then change permission so C code can use
  • https://github.com/shenki/FreeDV-Android

 

Developing OQGRAPH, a tool for graph based traversal of SQL data in MariaDB by Andrew McDonnell

  • Graphs = nodes + edges/links
  • Graph alogrithms – Breadth first, depth first, shortest path
  • Graphs in the “real world” – maps (how does GPS work), relationships (linkedin, facebook), trees
  • MariaDB is fork of MySQL
    • Being adopted a various distributios
    • Used by big companies
  • Graphs in a SQL RDBMS
    • store a graph as a list of edges
  • OQGraph
    • Creates “latch” column that contains a special command executed by the storage engine
    • where latch=’breadth_first”
    • Project hosted on lauchpad