Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I recently opted to use Cypher and neo4j for a graph query task. So far I think it's been pretty good. Can anyone give a comparison between this and Gremlin?


It's mostly imperative vs declarative.

In gremlin you say: give me those vertices, walk down that path, store that value for later etc. (kinda like programming)

In cypher you say: I want the nodes, containting such and such properties connected such and such. (kinda like sql)

The lines are blurred (they always are). On the gremlin side you have "optimization strategies" that rewrite your query to make use of indices or reorder steps. On the cypher side you can inspect the query plan and futz with queries that are declaratively the same, but will be executed faster (just like sql! :)


Ok cool. And gremlin graphs are in memory or could it be used on a database like neo4j?


Gremlin is more a query language than a graph store. Like you can use SQL w/ Postgres or MS SQL Server or Oracle. You can use it w/ neo4j - there is a plugin: https://github.com/thinkaurelius/neo4j-gremlin-plugin


Almost every graph database supports Gremlin. In addition to that, almost all the graph processing frameworks support Gremlin.

See http://tinkerpop.incubator.apache.org/


Here are some pointers to some of the most recent papers and talks by Marko Rodriguez, the creator of Gremlin...

The Benefits of the Gremlin Graph Traversal Machine http://www.datastax.com/dev/blog/the-benefits-of-the-gremlin...

The Gremlin Graph Traversal Machine and Language http://arxiv.org/abs/1508.03843

GraphDayTexas 2016 Talks: Dr. Marko A. Rodriguez Quantum Processes in Graph Computing https://www.youtube.com/watch?v=qRoAInXxgtc

Quantum Walks with Gremlin http://arxiv.org/abs/1511.06278


Thanks I'll take a look. I'm interested to find out if I can make my current queries faster.


I'm happy to help you improve your Cypher queries. Email is in my profile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: