11

For prototyping purposes, I'm looking for a lightweight graph database - essentially a graph equivalent for Memcached, Redis or SQLite; something that is trivial to use and deploy (in a JavaScript/Ruby/Python/Go/... environment).

While Neo4j provides everything I want, it's a bit heavyweight for my purposes.

The closest I've found is HeliosJS, though that uses Gremlin whereas I'd prefer Cypher.

Any recommendations would be appreciated.

David Makogon
  • 69,407
  • 21
  • 141
  • 189
AnC
  • 4,099
  • 8
  • 43
  • 69

3 Answers3

8

Cypher only works with Neo4j, so if you are tied to using it then you are also tied to Neo4j. I'm not aware of any other implementations of that language for any other graph.

For prototyping, I always recommend TinkerGraph with a Gremlin REPL. TinkerGraph is very lightweight and operates as an in-memory graph database. It is the fastest of all Blueprints implementations. I almost always first turn to Gremlin/TinkerGraph when "prototyping", trying a traversal, testing a graphs schema, loading a sample of a dataset, etc., as it provides instant feedback, lots of integration options, and all the power of Groovy for manipulating data. You can read more about the Gremlin REPL as a "workbench for graphs" here.

Update: Note that the above links point to TinkerPop 2.x. TinkerPop 3.x also offers TinkerGraph and the Gremlin Console.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Thanks, that's very informative. (I had to read up on Blueprints to really make sense of it - not necessarily a bad thing of course.) I'd rather avoid the JVM though - or if I'm stuck with the JVM, I might as well use Neo4j. (I'm thinking of prototyping applications in JavaScript/Ruby/Python/Go/... - so the JVM seems like a bit of a burden.) – AnC Dec 27 '13 at 17:13
  • 2
    I guess if you wanted to do some python you could go with NetworkX (http://networkx.github.io/) – stephen mallette Dec 27 '13 at 18:51
  • 1
    Revisiting this after several years, I have now found that https://github.com/opencypher/cypher-for-gremlin Cypher for Gremlin is a transpiler (transformational compiler) that can emit Gremlin from Cypher queries. Just two cents... – Etamar Laron Feb 17 '19 at 17:26
  • There is now a larger number of graph databases that support Cypher. Take a look at my answer at https://stackoverflow.com/a/73700930/19100466. – KWriter Oct 04 '22 at 11:37
1

Here in 2022, we have a few more options. Memgraph is an in-memory graph database which provides a Cypher implementation. I found this SO question and the following roundup of five Python in-memory databases at the top of a search for "lightweight in-memory graph database"-

https://memgraph.com/blog/in-memory-database-python

I haven't tried any of them yet, but will be trying Memgraph for an intense in-memory graph problem in Python.

Another option I'll be reviewing is Apache TinkerPop, which offers Gremlin for queries (a GQL which, among other things, employs method chaining) and has Python interfaces, such as gremlinpython which appears to maintain the method chaining invocation style.

Kevin-Prichard
  • 147
  • 1
  • 7
0

This is a fairly old question, but the additional answer is may help someone. I've been looking for a lightweight Graph NoSQL, and I found RedisGraph. It is a Graph DB based on Redis and GraphBLAS, which uses Cypher as a query language. I haven't used it, so I can not comment on how useful it is for fast prototyping, but Redis is relatively lightweight NoSQL DB, so you should be able to run it anywhere and once you install RedisGraph extension, you can interact with it using redis-cli.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32752077) – user16217248 Sep 24 '22 at 23:37