The Gremlin Graph Traversal Machine and Language

Gremlin is a graph traversal machine and language designed, developed, and distributed by the Apache TinkerPop project. G remlin, as a graph traversal machine, is composed of three inter acting components: a graph G, a traversalΨ, and a set of traversers T . The traversers move about the graph according to the instru ctions specified in the traversal, where the result of the comp utation is the ultimate locations of all halted traversers. A Gremli n machine can be executed over any supporting graph computing sy stem such as an OLTP graph database and/or an OLAP graph processor. Gremlin, as a graph traversal language, is a functio nal language implemented in the user’s native programming languag e and is used to define the Ψ of a Gremlin machine. This article provides a mathematical description of Gremlin and details its autom at n and functional properties. These properties enable Gremli n to naturally support imperative and declarative querying, host l anguage agnosticism, user-defined domain specific languages, an ext e sible compiler/optimizer, singleand multi-machine execution models, hybrid depthand breadth-first evaluation, as well as the ex ist nce of a Universal Gremlin Machine and its respective entailmen ts.