I am in the preparation phase of the design a graph-based (or key-value) database library for C++ which many here will find similar to projects such as http://neo4j.org/.
Since this is a very early phase of design, my requirements are simple, unrefined and (I admit) probably still rather naive:
Given these rough requirements as a challenge, what would your primary concerns be with regard to:
I am looking for good starting points from which to work, hence I'm more than happy to receive references to existing work. Most importantly: What should I be thinking about that I am not thinking about?
But no cycles
This is a heavy requirement if you need fast edge inserts. Verifying that a new edge does not introduce a cycle is O(v+e) in the worst case (where v is the number of vertices and e is the number of edges). It probably also rules out concurrent insertion of edges. Consider to make this requirement optional.
Another option is to distinguish between two insert operations: CheapInsert and ExpensiveInsert. Let each vertice have a "rank" integer and only allow cheap inserts of edges from lower to higher rank vertices. The expensive insert will not have this constraint and will automatically rewrite the ranks if necessary. Clients can inspect and change the rank of any vertice (as long as the low-to-high rule isn't broken). This way they can implement their own insert strategy, possibly by exploiting some specific properties of the graph to avoid expensive inserts.
A fast key/value database you might be interested in for reference is TinyCDB http://www.corpit.ru/mjt/tinycdb.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With