/plushcap/analysis/datastax/datastax-benefits-gremlin-graph-traversal-machine

The Benefits of the Gremlin Graph Traversal Machine

What's this blog post about?

A computer can be defined as a machine that evolves its state (data) according to a set of rules (program). Programmable computers have an instruction set whereby parameterized instructions can be arbitrarily composed to yield different algorithms. General-purpose computers are called universal, and they can simulate any "one off" computer or programmable computer with a sufficiently complex instruction set. Virtual machines emerged to enable the same program to run on different operating/hardware platforms. Popular virtual machines, such as the Java Virtual Machine, are universal in that they can be used to simulate other universal machines, including themselves. Gremlin is both a virtual machine and a programming language (or query language). The Gremlin traversal machine maintains a step library whose steps can be arbitrarily composed to enact any computable graph traversal algorithm. In other words, the Gremlin traversal machine is a programmable, universal machine. Moreover, the Gremlin traversal machine can be supported by any graph system vendor such that Gremlin expresses the same "write once, run anywhere"-mantra. The Gremlin traversal language (aka Gremlin-Java8) is a human writable language that when compiled, a traversal is generated that can be executed by the Gremlin traversal machine. The separation of the virtual machine/programming language distinction allows other JVM languages to exist and enables other graph traversal languages to execute by a Gremlin traversal machine such as SPARQL, GraphQL, Cypher, and the like. The Gremlin traversal machine is universal and maintains an extensive step library of the common query motifs found in most every graph language. The Gremlin traversal machine can not only execute a traversal compiled from any graph traversal language but also execute the same traversal on a single machine or across a multi-machine compute cluster. The distributed traversal is complete when all existing traversers have halted (i.e., no more steps to execute). The result of the query is the aggregate of the locations of all halted traversers. Gremlin is designed and developed by Apache TinkerPop, an open-source project that enables graph developers to use any query language with any graph system. Gremlin can be implemented in the native language of the underlying graph system wishing to capitalize on the benefits of the Gremlin traversal machine and language.

Company
DataStax

Date published
Sept. 14, 2015

Author(s)
Marko A. Rodriguez

Word count
2415

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.