Difference between revisions of "Gremlin Basics"
Jump to navigation
Jump to search
(→Steps) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
# a traversal Ψ | # a traversal Ψ | ||
# and a set of Traversers T | # and a set of Traversers T | ||
+ | == Diagram == | ||
+ | Click any Concept to get to the corresponding JavaDoc page | ||
<uml> | <uml> | ||
left to right direction | left to right direction | ||
Line 17: | Line 19: | ||
} | } | ||
note top of GraphTraversalSource: A GraphTraversalSource is the primary DSL of the Gremlin traversal machine.\n It provides access to all the configurations and steps for Turing complete graph computing.\n Any DSL can be constructed based on the methods of both GraphTraversalSource and GraphTraversal. | note top of GraphTraversalSource: A GraphTraversalSource is the primary DSL of the Gremlin traversal machine.\n It provides access to all the configurations and steps for Turing complete graph computing.\n Any DSL can be constructed based on the methods of both GraphTraversalSource and GraphTraversal. | ||
− | class GraphTraversalSource [[http://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/GraphTraversalSource.html]] { | + | |
+ | class GraphTraversalSource [[http://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversalSource.html]] { | ||
} | } | ||
note top of Traversal: traversal Ψ\nA Traversal represents a directed walk over a Graph. \nThis is the base interface for all traversal's, where each extending interface is seen as a domain specific language. \nFor example, GraphTraversal is a domain specific language for traversing a graph using "graph concepts" (e.g. vertices, edges). \nAnother example may represent the graph using "social concepts" (e.g. people, cities, artifacts). \nA Traversal is evaluated in one of two ways: iterator-based OLTP or GraphComputer-based OLAP.\n OLTP traversals leverage an iterator and are executed within a single JVM (with data access allowed to be remote). \nOLAP traversals leverage GraphComputer and are executed between multiple JVMs (and/or cores). | note top of Traversal: traversal Ψ\nA Traversal represents a directed walk over a Graph. \nThis is the base interface for all traversal's, where each extending interface is seen as a domain specific language. \nFor example, GraphTraversal is a domain specific language for traversing a graph using "graph concepts" (e.g. vertices, edges). \nAnother example may represent the graph using "social concepts" (e.g. people, cities, artifacts). \nA Traversal is evaluated in one of two ways: iterator-based OLTP or GraphComputer-based OLAP.\n OLTP traversals leverage an iterator and are executed within a single JVM (with data access allowed to be remote). \nOLAP traversals leverage GraphComputer and are executed between multiple JVMs (and/or cores). | ||
Line 64: | Line 67: | ||
<uml> | <uml> | ||
hide Circle | hide Circle | ||
+ | Note top of Step: The Gremlin graph traversal language defines approximately 30 steps which can be understood as the instruction set of the Gremlin traversal machine\n These steps are useful in practice, with typically only 10 or so of them being applied in the majority of cases. \nEach of the provided steps can be understood as being a specification of one of the 5 general types shown below | ||
+ | class Step [[http://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.html]] { | ||
+ | } | ||
+ | class map [[http://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.html#map-java.util.function.Function-]] { | ||
+ | } | ||
Step <|-- map | Step <|-- map | ||
Step <|-- flatMap | Step <|-- flatMap | ||
Line 70: | Line 78: | ||
Step <|-- branch | Step <|-- branch | ||
</uml> | </uml> | ||
+ | [[Category:frontend]] | ||
+ | [[Category:Gremlin]] | ||
+ | [[Category:Tinkerpop]] |
Latest revision as of 13:56, 24 December 2018
Gremlin Paper by Marko Rodriguez
DSL
Concepts
Three interacting components
- a Graph G
- a traversal Ψ
- and a set of Traversers T
Diagram
Click any Concept to get to the corresponding JavaDoc page