GRAPH Embeddable ENgine with Gremlin API, with no additional dependencies.

See test folder for a lot of examples of usage.

import 'package:grapheen/grapheen.dart';
...
Grapheen g = await newGrapheen(new Storage(),"test");
Pipe vIM = await g.addVertex({"name":"Iron Maiden"}); // id=1
Pipe vHM = await g.addVertex({"name":"Heavy Metal"}); // id=2
Pipe e1 = await g.addEdge(vIM,vHM,"PLAYS"); // id=3
List<int> ids;
ids = await g.V(1).outE().inV(); // [2]
ids = await g.V("name","Iron Maiden").outE("PLAYS").inV(); // [2]
await g.V(1).setProperty("name","Iron 'The best' Maiden");
await g.E(3).remove();

Storage

The storage is currently in-memory, but the engine has code separation for storage layer. So any implementation of Storage interface will make data to resides anywhere else - IndexedDB, MySQL, NOSQL etc.. Of course, server side usage is not recommended, use rather tinkerpop.

Functionality

I am implementing the Gremlin API as needed for my projects, so far I have:

Adding to graph: addVertex , addEdge

Changing the graph: setProperty, remove

Traversing the graph: V, E, inE, outE, bothE, inV, outV, bothV

Filtering pipeline: has, hasNot

Transforming pipeline: dedup, order (just the property based)

Performance

Performance mainly depends on performance of storage. Since the most expected usage is inside the web browser, compiled to javascript. All measurements are in compiled mode in Opera on my MacBook.

  • Sample data are airport dataset from http://openflights.org/data.html, it's 8000 records in CSV format.
  • number is OPERATIONS PER SECONDS, so 500 means, that such workflow, will run 500 times in one second
-----WORKFLOW----------- MEMORY------------------------------------------
createVertex          |  37.627 |     
load data set         |       7 |
query by ID           | 190.114 |
query by property     |     163 |
-------------------------------------------------------------------------

References

Libraries

airports
grapheen
grapheen_data_bands