Skip to content

Orient DB

aris alexis edited this page Feb 9, 2016 · 3 revisions

OrientDB is used as the main database in the project.

For an introduction to graph databases and the notions of Vertices and Edges look here

This is the main database where we keep all user/activity data, it can query using lucene and spatial.
For transient data and fast access we use the Key-Value interface of Orient.

Sub-entities of POJOS are saved as JSON strings (when we don't want to look them up) so we are compatible with all databases instead of saving a serializable object.

One common scenario is to bind relations with edges but for faster access also cache the relationship in a Vertex property.

There is no use of ORM just a custom ORM-like class that uses Apache Beanutils to map JSON to POJO and also to fetch data from objects connected through relationships.

Query languages are mixed, some stuff are done with Gremlin (mainly using the pipelines), some stuff with the native Blueprints interface that Orient supports and most with Orient's SQL variant. This is because Graph domain knowledge wasn't there and experimentation mode was on :)
*Note that Tinkperpop 3.x stack is not used yet but it is planned.

Most of the things are easier done with the SQL but this has the disadvantage of not being an universal abstraction layer but too specific.

Clone this wiki locally