
Gremlin as a modern query language - espeed
https://groups.google.com/d/msg/gremlin-users/HVzGeLwDP64/nL8PeTeXAgAJ
======
charlieegan3
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?

~~~
jauco
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! :)

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

~~~
ci5er
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](https://github.com/thinkaurelius/neo4j-gremlin-plugin)

