Tuesday, October 23, 2012

Working with Gremlin

If you want to learn more about graphs or graph databases you might want to check out Gremlin.

Gremlin is a graph traversal language that can be used for graph query, analysis, and manipulation. 

As a simple example, if we have this simple graph:























And we want to answer the question "Who are marko's codevelopers?" then we could write the following query in Gremlin:


That would give us "peter and josh"

With Gremlin it's possible to work with any graph (database) that implements the blueprints property graph data model., i.e Neo4J which is probably the most popular graph database right now.

The easiest way to start working with Neo4J is to start it in embedded more but a more production-like scenario would be to send Gremlin queries to a Neo4J server using the REST API and Spring's Neo4J template.

Check out Gremlin's Web Console if you want to try out Gremlin without installing anything.

No comments:

Post a Comment