Gremlin

Description

Gremlin is the graph traversal language of Apache TinkerPop. Hop connects to Gremlin servers with a graph database connection of the Gremlin type, from the optional Gremlin plugin. It is tested with Apache TinkerPop Gremlin Server and JanusGraph. The Gremlin endpoint of Amazon Neptune uses the same protocol. IAM authentication isn’t supported.

Run Gremlin Server in docker

docker run -p 8182:8182 tinkerpop/gremlin-server

or JanusGraph:

docker run -p 8182:8182 janusgraph/janusgraph

What works

  • The Graph query transform and the Graph script action run Gremlin traversals as scripts. The parameters become script bindings. A traversal returns a row per result: a map, from project(), elementMap() or valueMap(), gives a field per key, anything else one field called result. Vertices, edges and paths come back like the nodes, relationships and paths of other graph databases, for example as a graph value with the Return graph option.

  • The Graph output transform upserts vertices and edges with Gremlin traversals, without scripts. A vertex is identified by its primary properties and gets the first label of a node.

  • The Check graph database connections action.

What doesn’t work

The features built on Cypher:

Differences with Cypher databases

  • There are no transactions: every request is committed on its own.

  • The binding names id, label, key and value are reserved by Gremlin servers: don’t use them as parameter names.

  • Amazon Neptune doesn’t run scripts with bindings: use Graph output to write to Neptune.

  • Amazon Neptune: the connection only authenticates with a username and password, which Neptune doesn’t use. Requests aren’t signed with AWS Signature Version 4, so IAM database authentication isn’t supported: connect to a Neptune cluster with IAM authentication disabled, over TLS.

  • Graph output sets vertex properties with single cardinality: an update replaces the value, also on servers which keep a set of values by default, like Neptune.

  • Graph output needs at least one primary property per node: it looks vertices up by these properties.

  • Dates and times are stored as UTC dates, the date type every Gremlin server supports.

  • Create indexes with the schema tools of the server, for example the JanusGraph management API: Graph output looks vertices up by their primary properties.

  • Gremlin Server has no browser. Tools like Graph Explorer can show its graph through the HTTP endpoint of the server, which needs the WsAndHttpChannelizer in its configuration.