Clone this wiki locally
Attention: this Wiki hosts an outdated version of the TinkerPop framework and Gremlin language documentation.
Gremlin is part of a larger eco-system of technologies. The primary technologies to understand when using Gremlin are itemized below.
- Blueprints: A library to interact with various graph software vendors.
- Pipes: A library for computing using data flows.
- Groovy: The default host language for Gremlin.
Blueprints can be considered the JDBC of the graph database community. It provides a set of interfaces that when implemented, yield a Blueprints-enabled graph database. The TinkerPop graph stack is all predicated on Blueprints and the databases that support Blueprints.
Given that Gremlin is hosted by various JVM languages, it is possible to make use of the Blueprints API from within these other JVM languages. In this way, all the utilities provided in Blueprints are easily accessible. In essence, Gremlin is a shorthand notation for many of the access patterns used when dealing with Blueprints.
Pipes is a data flow framework written in Java. Gremlin extends Pipes to support data flow processing of Blueprints-enabled graph databases. Pipes boasts a lazy evaluation model that yields memory efficient graph traversal algorithms. When coding in Pipes, in Java, code can be very verbose. Gremlin simplifies this process by compiling its shorthand notation down to Pipes. In essence, Gremlin is a Pipes compiler for other JVM languages.
Groovy is a dynamic language that serves as a superset of Java. It provides metaprogramming facilities through the Java Reflection API and as such, easily supports the creation of domain specific languages.
Gremlin is a particular DSL that manipulates the
MetaClass of various objects. Beyond that, Gremlin is full Groovy. All constructs such as variable setting, looping, branching, closures, currying, etc. are all provided to Gremlin through the Groovy language. Finally, Groovy works seamlessly with Java and vice versa. The benefit of this is that Gremlin developers are able to easily use the Java API in their algorithms.
Here is a collection of introductory texts on Groovy that may be helpful: