Just the best name for a database you've never heard of.
This project is mostly dead. The repo exists as a portfolio artifact and curio for database geeks who will find it a precursor to Uber's Schemaless approach to MySQL. An overview of its features, design, and origin follow.
Underneath it all, a simple Postgres schema describes nodes, edges, and properties, and leaves all the fun like sharding and schema enforcement to subsequent layers.
This schema, and in fact the whole stack, was inspired by work done at Slide, which used a similar approach to drive dozens of facebook apps that encompassed more than 80% of the 2010 Facebook userbase.
The fat Python client that reads from and writes to Postgres shards; in formal CAP terms, chooses consistency over availability.
This repo; wraps the datahog library in a beautiful, class-based interface.
# schema.py
from databacon import Node, lookup, prop, relation
class User(Node):
name = prop(str)
age = prop(int)
email = lookup.alias() # alias is an indexed string field
friends = relation('User')
# do-stuff.py
from schema import User
user0, user1 = User(), User()
user0.friends.add(user1)
for friend in user0.friends():
assert friend.guid == user1.guid
user0.email = 'hi@there.com'
user0.email.save()
assert User.by_email('hi@there.com').guid == user0.guid
There's a more feature-complete example modeling a corpus of documents in tests/.
Note the shenanigens w/the datahog dep.
git clone http://github.com/teepark/datahog && pushd datahog && git checkout 5d51fc8d9d && popd
git clone http://github.com/cameron/databacon
cd databacon
pip install -r requirements.txt
pip install -e .../datahog
docker-compose up
PYTHONPATH="./databacon:$PYTHONPATH" tests/test.py
If you don't see any output, that means it worked :)