This is an almost exact copy of bananadb project (http://people.apache.org/~kalle/bananadb/)