Hexagon: building a graph database on top of a key-value store
I've always been interested in how information is stored and retrieved. Inspired by a project of a friend (Levelgraph), I decided to research more about Hexastores and how they can be adapted to modern NoSQL databases such as LevelDB and Cassandra. Out of this fascination and curiosity I created Hexagon: a simple Python implementation of Hexastores backed by LevelDB.
In this talk I plan on giving a very simple and hands-on introduction to the subject, followed by a demonstration of how Python really allowed me to focus on the implementation thanks to its extremely intuitive syntax and features. I will show how generators, collections, and Test Driven Development allowed me to iterate fast and not get lost in (too many) bugs along the way.
The talk will start with an overview of what Hexagon is and the reason why I built it. The second step will consist in the explanation of the two main concepts behind Hexagon itself, namely LevelDB and the Hexastore paper. Both of them will be treated in a very practical way. LevelDB will be analyzed in greater depth, through its underlying data structures, the basic APIs, and some production use cases. The Hexastore introduction will consist of an effective overview of the main points of this paper, that shall be expressed visually for simplicity and intuitivity. Finally, I’ll present the Hexagon project itself and its API. I’ll go through the explanation of how it works under the hood and will provide readable examples of parts of its code. I also plan to demonstrate the whole project on a big graph dataset.
My talk will conclude with a recap and an examination of the pros and cons of this approach. Last but not least, the takeaway I’d love to leave to all the curious attendees of my talk, is that I was able to learn and build Hexagon so quickly because I of my familiarity with Python and its tools.
Table of contents
- Main Intro (2)
- Introduction to LevelDB: (5)
- The data structure
- The basic APIs
- The benefits
- Introduction to Hexastores: (8)
- Definition of a graph
- Visual illustration of a Hexastore
- Comparison with traditional triple-store implementation
- Hexagon: (8)
- The API
- Under the hood
- Example querying some big graph
- Conclusion: (7)
- Pros and cons
- Key points to take away
- Questions (5)