SlideShare a Scribd company logo
Gremlin’s Graph Traversal Machinery
Dr. Marko A. Rodriguez
Director of Engineering at DataStax, Inc.
Project Management Committee, Apache TinkerPop
http://tinkerpop.apache.org
f : X ! X
The function f is a process that maps a structure of type X to a structure of type X.
f(x1) = x2
The function f maps the object x1 (from the set of X) to the object x2 (from the set of X).
x1 2 X x2 2 X
f(x)
A step is a function.
f(x)
Assume that this step rotates an X by 90°.
90°
90°
The algorithm of the step is a “black box.”
90°
A traverser wraps a value of type V.
class Traverser<V> {
V value;
}
class Traverser<V> {
V value;
}
90°
The step maps an integer traverser to an integer traverser.
class Traverser<V> {
V value;
}
class Traverser<V> {
V value;
}
Traverser<Integer> Traverser<Integer>
90°
A traverser of with a rotation of 0° becomes a traverser with a rotation of 90°.
Traverser(0) Traverser(90)
class Traverser<V> {
V value;
}
class Traverser<V> {
V value;
}
90°
Both the input and output traversers are of type Traverser<Integer>.
90°
T[N] ! T[N]
2 T[N]
2 T[N]
A stream of input traversers…
90°
…yields a stream of output traversers.
90°
A traverser can have a bulk which denotes how many V values it represents.
90°
class Traverser<V> {
V value;
long bulk;
}
class Traverser<V> {
V value;
long bulk;
}
4
4
Bulking groups identical traversers to reduce the number of evaluations of a step.
90°
class Traverser<V> {
V value;
long bulk;
}
class Traverser<V> {
V value;
long bulk;
}
A variegated stream of input traversers yields a variegated stream of output traversers.
90°
1
2
1 1
1
2
Bulking can reduce the size of the stream.
90°
class Traverser<V> {
V value;
long bulk;
}
class Traverser<V> {
V value;
long bulk;
}
If the order of the stream does not matter…
90°
…then reordering can increase the likelihood of bulking.
90°
1
21
total bulk = 4
total count = 4
total bulk = 4
total count = 3
90°
180°
270°
360°
A traversal is a list of one or more steps.
90° 90° 90°
90°
f : X ! Y
Different functions can yield different mappings between different domains and ranges.
h : Y ! Z
The output of f can be the input to h because the range of f is the domain of h (i.e. Y).
Y y = f(x)
Z z = h(y)
y = f(x)
z = h(y)
y = f(x)
z = h(y)
f(x) = y
h(y) = z
f(x) = y
h(y) = z
f(x) = yh(y) = z
f(x) h = z
f h = zx
f h = zx · ·
x · f · h = z
h(f(x)) = z
readable
unreadable
≣
z = x · f · h
z = x.f().h().next()
z = x · f · h
stream/iterator/traversalhead/start
90° 225°
315°
Different types of steps exist and their various compositions yield query expressivity.
90° 225°
315°
Steps process traverser streams/flows and their composition is a traversal/iterator.
= . (). ().next()90° 225°
repeat( ).times(2)
180°
Anonymous traversals can serve as step arguments.
90°
traversal with a single step
90°
repeat( ).times(2)
180°
Some functions serve as step-modulators instead of steps.
90°
…groupCount().by(out().count())
…select(“a”,”b”).by(“name”)
…addE(“knows”).from(“a”).to(“b”)
…order().by(“age”,decr)
repeat( ).times(2)
≣
90° 90°
180°
During optimization, traversal strategies may rewrite a traversal to a more efficient,
semantically equivalent form.
90°
RepeatUnrollStrategy
interface TraversalStrategy {
void apply(Traversal traversal);
Set<TraversalStrategy> applyPrior();
Set<TraversalStrategy> applyPost();
}
repeat( ).until(0°)90°
Continuously process a traverser until some condition is met.
repeat( ).until(0°)
4 loops
2 loops
1 loop
90° 180° 360°
90°do while(x != )
repeat().until() provides do/while-semantics.
90°
≣
until(0°).repeat( )
0 loops
2 loops
1 loop
90° 180° 0°
90°dowhile(x != )
90°
≣
until().repeat() provides while/do-semantics.
until(0°).repeat( )
3
Even if the traversers in the input stream can not be bulked, the output traversers may be able to be.
90°
filter(x)map(x) sideEffect(x)flatMap(x)
one-to-one one-to-many one-to-(one-or-none) one-to-same
m
filter(x)map(x) sideEffect(x)flatMap(x)
one-to-one one-to-many one-to-(one-or-none) one-to-same
out(“knows”)
has(“name”,”gremlin”)
groupCount(“m”)
where(“a”,eq(“b”))
select(“a”,”b”)
path()
mean()
sum()
count()
groupCount()
many-to-one(reducers)
order()
values(“age”)
values(“name”)
and(x,y)
or(x,y)
coin(0.5)
sample(10)
simplePath()
dedup()
store(“m”)
tree(“m”)
subgraph(“m”)
in(“created”)
group(“m”)
m
label()
id()
* A collection of examples. Not the full step library.
match(x,y,z)
properties()
outE(“knows”)
V()
values(“age”)
filter(x)map(x) sideEffect(x)flatMap(x)
one-to-one one-to-many one-to-(one-or-none) one-to-same
out(“knows”)
has(“name”,”gremlin”)
path()
groupCount()
simplePath()
m
label()
outE(“knows”)
group(“m”)
V()
T[V [ E] ! T[N+
]
values(“age”)
filter(x)map(x) sideEffect(x)flatMap(x)
one-to-one one-to-many one-to-(one-or-none) one-to-same
out(“knows”)
has(“name”,”gremlin”)
path()
groupCount()
simplePath()
m
label()
outE(“knows”)
T[?] ! T[path]
T[V [ E] ! T[string]
T[?] ! T[?]
T[V [ E] ! ; [ T[V [ E]
T[?] ! ; [ T[?]
T[V ] ! T[V ]⇤
T[V ] ! T[E]⇤
group(“m”)
V()T[?] ! T[map[?, N+
]]
T[G] ! T[V ]⇤
T[V [ E] ! T[N+
]
values(“age”)
out(“knows”)
has(“name”,”gremlin”)
groupCount()
T[V [ E] ! ; [ T[V [ E]
T[V ] ! T[V ]⇤
V()T[?] ! T[map[?, N+
]]
T[G] ! T[V ]⇤
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
T[V [ E] ! T[N+
]values(“age”)
out(“knows”)
has(“name”,”gremlin”)
groupCount()
T[V ] ! T[V ]⇤
V()
T[?] ! T[map[?, N+
]]
T[G] ! T[V ]⇤
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
Steps can be composed if their respective domains and ranges match.
T[V [ E] ! ; [ T[V [ E]
values(“age”)
out(“knows”)
has(“name”,”gremlin”)
groupCount()
T[V ] ! T[V ]⇤
V() T[G] ! T[V ]⇤
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
T[V ] ! ; [ T[V ]
T[V ] ! T[N+
]
T[N+
] ! T[map[N+
, N+
]]
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
What is the distribution of ages of the people that Gremlin knows?
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices
(flatMap)
…
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices
(flatMap)
one vertex
to that vertex or no vertex
(filter)
?
…
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices
(flatMap)
one vertex
to that vertex or no vertex
(filter)
one vertex
to many friend vertices
(flatMap)
?
…
name=gremlin
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices
(flatMap)
one vertex
to that vertex or no vertex
(filter)
one vertex
to many friend vertices
(flatMap)
one vertex to
one age value
(map)
?
…
37
name=gremlin
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices
(flatMap)
one vertex
to that vertex or no vertex
(filter)
one vertex
to many friend vertices
(flatMap)
one vertex to
one age value
(map)
many age values
to an age distribution
(map — reducer)
?
…
37 [37:2, 41:1,
24:1, 35:4]37
37
24
35
35
35
35 41
name=gremlin
The Gremlin Traversal Language
The Gremlin Traversal Machine
a b c
a b c
Traversal creation via
step composition
Step parameterization via
traversal and constant nesting
a().b().c()
a(b().c()).d(x)d(x)
function
com
position
function
nesting
fluent m
ethods
m
ethod
argum
ents
Any language that supports function composition and function nesting can host Gremlin.
Gremlin Traversal Language
class Traverser<V> {
V value;
long bulk;
}
class Step<S,E> {
Traverser<E> processNextStart();
}
f(x)
class Traversal<S,E> implements Iterator<E> {
E next();
Traverser<E> nextTraverser();
}
The fundamental constructs of Gremlin’s machinery.
Gremlin Traversal Machine
interface TraversalStrategy {
void apply(Traversal traversal);
Set<TraversalStrategy> applyPrior();
Set<TraversalStrategy> applyPost();
}
a db c
a de
≣
1
Bytecode
Gremlin-Java
g.V(1).
repeat(out(“knows”)).times(2).
groupCount().by(“age”)
[[V, 1]
[repeat, [[out, knows]]]
[times, 2]
[groupCount]
[by, age]]
Traversal GraphStep GroupCountStep
RepeatStep
VertexStep
GraphStep GroupCountStepVertexStep VertexStep
Traversal
Strategies
GraphStep GroupCountStepVertexStep VertexStep
translates
compiles
optimizes
executes
[29:2, 30:1,
31:1, 35:10]
1
Bytecode
Gremlin-Python
g.V(1).
repeat(out(‘knows’)).times(2).
groupCount().by(‘age’)
[[V, 1]
[repeat, [[out, knows]]]
[times, 2]
[groupCount]
[by, age]]
Traversal GraphStep GroupCountStep
RepeatStep
VertexStep
GraphStep GroupCountStepVertexStep VertexStep
Traversal
Strategies
GraphStep GroupCountStepVertexStep VertexStep
translates
compiles
optimizes
executes
[29:2, 30:1,
31:1, 35:10]
1
Bytecode
Gremlin-Python
g.V(1).
repeat(out(‘knows’)).times(2).
groupCount().by(‘age’)
[[V, 1]
[repeat, [[out, knows]]]
[times, 2]
[groupCount]
[by, age]]
Traversal GraphStep GroupCountStep
RepeatStep
VertexStep
GraphStep GroupCountStepVertexStep VertexStep
Traversal
Strategies
GraphStep GroupCountStepVertexStep VertexStep
translates
compiles
optimizes
executes
[29:2, 30:1,
31:1, 35:10]
Gremlin language variant
Language agnostic bytecode
Execution engine assembly
Execution engine optimization
Execution engine evaluation
LanguageMachine
LanguageMachine
Gremlin-Python
Gremlin-Groovy
Gremlin-Java
Gremlin-JavaScriptGremlin-Ruby
Gremlin-Scala
Gremlin-Clojure
Bytecode
Java-based Implementation
?
?-based Implementation
?
?
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gremlin_python.structure.graph import Graph
>>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
Gremlin-Python
CPython
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gremlin_python.structure.graph import Graph
>>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
>>> graph = Graph()
>>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g'))
Gremlin-Python
DriverRemoteConnection
CPython
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gremlin_python.structure.graph import Graph
>>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
>>> graph = Graph()
>>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g'))
# nested traversal with Python slicing and attribute interception extensions
>>> g.V().hasLabel("person").repeat(both()).times(2).name[0:2].toList()
[u'marko', u'marko']
Gremlin-Python
Bytecode
DriverRemoteConnection
Gremlin Traversal Machine
CPython JVM
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gremlin_python.structure.graph import Graph
>>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
>>> graph = Graph()
>>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g'))
# nested traversal with Python slicing and attribute interception extensions
>>> g.V().hasLabel("person").repeat(both()).times(2).name[0:2].toList()
[u'marko', u'marko']
# a complex, nested multi-line traversal
>>> g.V().match( 
... as_(“a”).out("created").as_(“b”), 
... as_(“b”).in_(“created").as_(“c”), 
... as_(“a”).out("knows").as_(“c”)). 
... select("c"). 
... union(in_(“knows"),out("created")). 
... name.toList()
[u'ripple', u'marko', u'lop']
>>>
Gremlin-Python
Bytecode
DriverRemoteConnection
Gremlin Traversal Machine
CPython JVM
Cypher
Bytecode
Distinct query languages (not only Gremlin language variants) can generate bytecode for
evaluation by any OLTP/OLAP TinkerPop-enabled graph system.
Gremlin Traversal Machine
SELECT DISTINCT ?c
WHERE {
?a v:label "person" .
?a e:created ?b .
?b v:name ?c .
?a v:age ?d .
FILTER (?d > 30)
}
[
[V],
[match,
[[as, a], [hasLabel, person]],
[[as, a], [out, created], [as, b]],
[[as, a], [has, age, gt(30)]]],
[select, b],
[by, name],
[dedup]
]
Bytecode
Graph
Database
OLTP
Graph
Processor
OLAP
Bytecode
Bytecode
Bytecode
TinkerGraph
DSE Graph
Titan
Neo4j
OrientDB
IBM Graph
…
TinkerComputer
Spark
Giraph
Hadoop
Fulgora
…
Gremlin Traversal Machine
Traversal
Traversal
Traversal
Gremlin traversals can be executed against OLTP graph databases and OLAP graph processors.
That means that if, e.g., SPARQL compiles to bytecode, it can execute both OLTP and OLAP.
Graph
Database
OLTP
Graph
Processor
OLAP
Gremlin Traversal Machine
Traversal
Traversal
Traversal
TraversalStrategies TraversalStrategies
optimizes
Graph system providers (OLTP/OLAP) typically have custom strategies registered
with the Gremlin traversal machine that take advantage of unique, provider-specific features.
Most OLTP graph systems have a traversal strategy that combines
[V,has*]-sequences into a single global index-based flatMap-step.
g.V().has(“name”,”gremlin”).
out(“knows”).values(“age”).
groupCount()
one graph to many vertices using index lookup
(flatMap)
GraphStepStrategy
one graph to many vertices
(flatMap)
one vertex to that vertex or no vertex
(filter)
?
…
compiles
optimizes
name=gremlin
DataStax 
Enterprise Graph
Most OLAP graph systems have a traversal strategy that bypasses Traversal semantics
and implements reducers using the native API of the system.
g.V().count()
one graph to long
(map — reducer)
rdd.count() 12,146,934
compiles
one graph to many vertices
(flatMap)
many vertices to long
(map — reducer)
… 12,146,934
optimizes
SparkInterceptorStrategy
…
Physical Machine
DataProgram Traversal
Heap/DiskMemory Memory
Memory/Graph System
Physical Machine
Java
Virtual Machine
bytecode
steps
DataProgram
Memory/DiskMemory
Physical Machine
instructions
Java
Virtual Machine
Gremlin
Traversal Machine
From the physical computing machine to the Gremlin traversal machine.
Stakeholders
Language Providers
Gremlin Language Variant
Distinct Query Language
Application Developers Graph System Providers
OLAP Provider
OLTP Provider
Stakeholders
Application Developers
One query language for
all OLTP/OLAP systems.
GremlinG = (V, E)
Real-time and analytic queries are represented in Gremlin.
Graph
Database
OLTP
Graph
Processor
OLAP
Stakeholders
Application Developers
One query language for
all OLTP/OLAP systems.
No vendor lock-in.
Apache TinkerPop as the JDBC for graphs.
DataStax 
Enterprise Graph
Stakeholders
Application Developers
One query language for
all OLTP/OLAP systems.
No vendor lock-in.
Gremlin is embedded in
the developer’s language.
Iterator<String> result =
g.V().hasLabel(“person”).
order().by(“age”).
limit(10).values(“name”)
vs.
ResultSet result = statement.executeQuery(
“SELECT name FROM People n” +
“ ORDER BY age n” +
“ LIMIT 10”)
Grem
lin-Java
SQL
in
Java
No “fat strings.” The developer writes their graph database/processor
queries in their native programming language.
Stakeholders
Language Providers
Gremlin Language Variant
Distinct Query Language
Easy to generate bytecode.
GraphTraversal.getMethods()
.findAll { GraphTraversal.class == it.returnType }
.collect { it.name }
.unique()
.each {
pythonClass.append(
""" def ${it}(self, *args):
self.bytecode.add_step(“${it}”, *args)
return self
“””)}
Gremlin-Python’s source code is
programmatically generated using Java reflection.
Stakeholders
Language Providers
Gremlin Language Variant
Distinct Query Language
Easy to generate bytecode.
Bytecode executes against
TinkerPop-enabled systems.
Language providers write a translator for the Gremlin traversal machine,
not a particular graph database/processor.
DataStax 
Enterprise Graph
Graph
Database
OLTP
Graph
Processor
OLAP
Stakeholders
Language Providers
Gremlin Language Variant
Distinct Query Language
Easy to generate bytecode.
Bytecode executes against
TinkerPop-enabled systems.
Provider can focus on design,
not evaluation.
Gremlin Traversal Machine
The language designer does not have to concern themselves with
OLTP or OLAP execution. They simply generate bytecode and the
Gremlin traversal machine handles the rest.
Easy to implement core
interfaces.
Graph System Providers
Stakeholders
OLAP Provider
OLTP Provider
Vertex
Edge
Graph
Transaction
TraversalStrategy
Property
key=value
?
? ?
Provider supports all
provided languages.
Easy to implement core
interfaces.
Graph System Providers
Stakeholders
OLAP Provider
OLTP Provider
The provider automatically supports all query languages
that have compilers that generate Gremlin bytecode.
OLTP providers can leverage
existing OLAP systems.
Provider supports all
provided languages.
Easy to implement core
interfaces.
Graph System Providers
Stakeholders
OLAP Provider
OLTP Provider
DSE Graph leverages SparkGraphComputer for OLAP processing.
DataStax 
Enterprise Graph
Stakeholders
Language Providers
Gremlin Language Variant
Distinct Query Language
Application Developers Graph System Providers
OLAP Provider
OLTP Provider
One query language for
all OLTP/OLAP systems.
No vendor lock-in.
Gremlin is embedded in
the developer’s language.
Easy to generate bytecode.
Bytecode executes against
TinkerPop-enabled systems.
Provider can focus on design,
not evaluation.
Easy to implement core
interfaces.
Provider supports all
provided languages.
OLTP providers can leverage
existing OLAP systems.
Thank you.
http://tinkerpop.apache.org
http://www.datastax.com/products/datastax-enterprise-graph

More Related Content

What's hot

mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learn
pavan373
 
The Ring programming language version 1.3 book - Part 26 of 88
The Ring programming language version 1.3 book - Part 26 of 88The Ring programming language version 1.3 book - Part 26 of 88
The Ring programming language version 1.3 book - Part 26 of 88
Mahmoud Samir Fayed
 
Mikhail Khristophorov "Introduction to Regular Expressions"
Mikhail Khristophorov "Introduction to Regular Expressions"Mikhail Khristophorov "Introduction to Regular Expressions"
Mikhail Khristophorov "Introduction to Regular Expressions"
LogeekNightUkraine
 
Building Machine Learning Algorithms on Apache Spark with William Benton
Building Machine Learning Algorithms on Apache Spark with William BentonBuilding Machine Learning Algorithms on Apache Spark with William Benton
Building Machine Learning Algorithms on Apache Spark with William Benton
Spark Summit
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
Kandarp Tiwari
 
The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain Enterprise
ClarkTony
 
Perm winter school 2014.01.31
Perm winter school 2014.01.31Perm winter school 2014.01.31
Perm winter school 2014.01.31
Vyacheslav Arbuzov
 
Edu presentation1
 Edu presentation1 Edu presentation1
Edu presentation1
hook1kf
 
Reactive Collections
Reactive CollectionsReactive Collections
Reactive Collections
Aleksandar Prokopec
 
ggplot2: An Extensible Platform for Publication-quality Graphics
ggplot2: An Extensible Platform for Publication-quality Graphicsggplot2: An Extensible Platform for Publication-quality Graphics
ggplot2: An Extensible Platform for Publication-quality Graphics
Claus Wilke
 
Twopi.1
Twopi.1Twopi.1
Twopi.1
fhhangtuah
 
Seminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mmeSeminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mme
Vyacheslav Arbuzov
 
Writing DSL with Applicative Functors
Writing DSL with Applicative FunctorsWriting DSL with Applicative Functors
Writing DSL with Applicative Functors
David Galichet
 
Graphing day 1 worked
Graphing day 1 workedGraphing day 1 worked
Graphing day 1 worked
Jonna Ramsey
 
Seminar psu 20.10.2013
Seminar psu 20.10.2013Seminar psu 20.10.2013
Seminar psu 20.10.2013
Vyacheslav Arbuzov
 
D3 svg & angular
D3 svg & angularD3 svg & angular
D3 svg & angular
500Tech
 
Recursion and Functional Programming
Recursion and Functional ProgrammingRecursion and Functional Programming
Recursion and Functional Programming
sathish316
 
Mit6 094 iap10_lec04
Mit6 094 iap10_lec04Mit6 094 iap10_lec04
Mit6 094 iap10_lec04
Tribhuwan Pant
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
Amr Rashed
 
Arrays
ArraysArrays
Arrays
AnaraAlam
 

What's hot (20)

mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learn
 
The Ring programming language version 1.3 book - Part 26 of 88
The Ring programming language version 1.3 book - Part 26 of 88The Ring programming language version 1.3 book - Part 26 of 88
The Ring programming language version 1.3 book - Part 26 of 88
 
Mikhail Khristophorov "Introduction to Regular Expressions"
Mikhail Khristophorov "Introduction to Regular Expressions"Mikhail Khristophorov "Introduction to Regular Expressions"
Mikhail Khristophorov "Introduction to Regular Expressions"
 
Building Machine Learning Algorithms on Apache Spark with William Benton
Building Machine Learning Algorithms on Apache Spark with William BentonBuilding Machine Learning Algorithms on Apache Spark with William Benton
Building Machine Learning Algorithms on Apache Spark with William Benton
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain Enterprise
 
Perm winter school 2014.01.31
Perm winter school 2014.01.31Perm winter school 2014.01.31
Perm winter school 2014.01.31
 
Edu presentation1
 Edu presentation1 Edu presentation1
Edu presentation1
 
Reactive Collections
Reactive CollectionsReactive Collections
Reactive Collections
 
ggplot2: An Extensible Platform for Publication-quality Graphics
ggplot2: An Extensible Platform for Publication-quality Graphicsggplot2: An Extensible Platform for Publication-quality Graphics
ggplot2: An Extensible Platform for Publication-quality Graphics
 
Twopi.1
Twopi.1Twopi.1
Twopi.1
 
Seminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mmeSeminar PSU 10.10.2014 mme
Seminar PSU 10.10.2014 mme
 
Writing DSL with Applicative Functors
Writing DSL with Applicative FunctorsWriting DSL with Applicative Functors
Writing DSL with Applicative Functors
 
Graphing day 1 worked
Graphing day 1 workedGraphing day 1 worked
Graphing day 1 worked
 
Seminar psu 20.10.2013
Seminar psu 20.10.2013Seminar psu 20.10.2013
Seminar psu 20.10.2013
 
D3 svg & angular
D3 svg & angularD3 svg & angular
D3 svg & angular
 
Recursion and Functional Programming
Recursion and Functional ProgrammingRecursion and Functional Programming
Recursion and Functional Programming
 
Mit6 094 iap10_lec04
Mit6 094 iap10_lec04Mit6 094 iap10_lec04
Mit6 094 iap10_lec04
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
 
Arrays
ArraysArrays
Arrays
 

Viewers also liked

DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
DataStax
 
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
Intro to Graph Databases Using Tinkerpop, TitanDB, and GremlinIntro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
Caleb Jones
 
TinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBsTinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBs
Joshua Shinavier
 
Graph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPopGraph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPop
Jason Plurad
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBay
DataStax Academy
 
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
DataStax
 
Titan: The Rise of Big Graph Data
Titan: The Rise of Big Graph DataTitan: The Rise of Big Graph Data
Titan: The Rise of Big Graph Data
Marko Rodriguez
 
Hello DataStax Enterprise Graph
Hello DataStax Enterprise Graph Hello DataStax Enterprise Graph
Hello DataStax Enterprise Graph
DataStax
 
Thug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen ZhangThug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen Zhang
Chen Zhang
 
Graph databases: Tinkerpop and Titan DB
Graph databases: Tinkerpop and Titan DBGraph databases: Tinkerpop and Titan DB
Graph databases: Tinkerpop and Titan DB
Mohamed Taher Alrefaie
 
Graph Database in Graph Intelligence
Graph Database in Graph IntelligenceGraph Database in Graph Intelligence
Graph Database in Graph Intelligence
Chen Zhang
 
Adding Value through graph analysis using Titan and Faunus
Adding Value through graph analysis using Titan and FaunusAdding Value through graph analysis using Titan and Faunus
Adding Value through graph analysis using Titan and Faunus
Matthias Broecheler
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphs
Kumar
 
Graphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXGraphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphX
Andrea Iacono
 
Cassandra Summit - What's New In Apache TinkerPop?
Cassandra Summit - What's New In Apache TinkerPop?Cassandra Summit - What's New In Apache TinkerPop?
Cassandra Summit - What's New In Apache TinkerPop?
Stephen Mallette
 
Neo, Titan & Cassandra
Neo, Titan & CassandraNeo, Titan & Cassandra
Neo, Titan & Cassandra
johnrjenson
 
Quantum Processes in Graph Computing
Quantum Processes in Graph ComputingQuantum Processes in Graph Computing
Quantum Processes in Graph Computing
Marko Rodriguez
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
DataStax
 
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
DataStax
 
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax
 

Viewers also liked (20)

DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
DataStax | Network Analysis Adventure with DSE Graph, DataStax Studio, and Ti...
 
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
Intro to Graph Databases Using Tinkerpop, TitanDB, and GremlinIntro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
 
TinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBsTinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBs
 
Graph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPopGraph Processing with Apache TinkerPop
Graph Processing with Apache TinkerPop
 
Graph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBayGraph Based Recommendation Systems at eBay
Graph Based Recommendation Systems at eBay
 
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
Bloor Research & DataStax: How graph databases solve previously unsolvable bu...
 
Titan: The Rise of Big Graph Data
Titan: The Rise of Big Graph DataTitan: The Rise of Big Graph Data
Titan: The Rise of Big Graph Data
 
Hello DataStax Enterprise Graph
Hello DataStax Enterprise Graph Hello DataStax Enterprise Graph
Hello DataStax Enterprise Graph
 
Thug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen ZhangThug feb 23 2015 Chen Zhang
Thug feb 23 2015 Chen Zhang
 
Graph databases: Tinkerpop and Titan DB
Graph databases: Tinkerpop and Titan DBGraph databases: Tinkerpop and Titan DB
Graph databases: Tinkerpop and Titan DB
 
Graph Database in Graph Intelligence
Graph Database in Graph IntelligenceGraph Database in Graph Intelligence
Graph Database in Graph Intelligence
 
Adding Value through graph analysis using Titan and Faunus
Adding Value through graph analysis using Titan and FaunusAdding Value through graph analysis using Titan and Faunus
Adding Value through graph analysis using Titan and Faunus
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphs
 
Graphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphXGraphs are everywhere! Distributed graph computing with Spark GraphX
Graphs are everywhere! Distributed graph computing with Spark GraphX
 
Cassandra Summit - What's New In Apache TinkerPop?
Cassandra Summit - What's New In Apache TinkerPop?Cassandra Summit - What's New In Apache TinkerPop?
Cassandra Summit - What's New In Apache TinkerPop?
 
Neo, Titan & Cassandra
Neo, Titan & CassandraNeo, Titan & Cassandra
Neo, Titan & Cassandra
 
Quantum Processes in Graph Computing
Quantum Processes in Graph ComputingQuantum Processes in Graph Computing
Quantum Processes in Graph Computing
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
 
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
DataStax | Graph Data Modeling in DataStax Enterprise (Artem Chebotko) | Cass...
 
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
DataStax | Building a Spark Streaming App with DSE File System (Rocco Varela)...
 

Similar to DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandra Summit 2016

ML-CheatSheet (1).pdf
ML-CheatSheet (1).pdfML-CheatSheet (1).pdf
ML-CheatSheet (1).pdf
KarroumAbdelmalek
 
CS 354 Graphics Math
CS 354 Graphics MathCS 354 Graphics Math
CS 354 Graphics Math
Mark Kilgard
 
Data transformation-cheatsheet
Data transformation-cheatsheetData transformation-cheatsheet
Data transformation-cheatsheet
Dieudonne Nahigombeye
 
Rate of change and tangent lines
Rate of change and tangent linesRate of change and tangent lines
Rate of change and tangent lines
Mrs. Ibtsam Youssef
 
Differentiation full detail presentation
Differentiation full detail presentationDifferentiation full detail presentation
Differentiation full detail presentation
xavev33334
 
Computer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1bComputer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1b
Philip Schwarz
 
Advanced Functions Unit 1
Advanced Functions Unit 1Advanced Functions Unit 1
Advanced Functions Unit 1
leefong2310
 
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
ImplementDijkstra’s algorithm using the graph class you implemente.pdfImplementDijkstra’s algorithm using the graph class you implemente.pdf
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
gopalk44
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
Mel Anthony Pepito
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
Matthew Leingang
 
3.5 Transformation of Functions
3.5 Transformation of Functions3.5 Transformation of Functions
3.5 Transformation of Functions
smiller5
 
Abstract machines for great good
Abstract machines for great goodAbstract machines for great good
Abstract machines for great good
Александр Ежов
 
Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1
Raphael Marques
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncr
Css Founder
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncr
Css Founder
 
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
shreemadghodasra
 
A walk in graph databases v1.0
A walk in graph databases v1.0A walk in graph databases v1.0
A walk in graph databases v1.0
Pierre De Wilde
 
Monadologie
MonadologieMonadologie
Monadologie
league
 
Lesson 5: Functions and surfaces
Lesson 5: Functions and surfacesLesson 5: Functions and surfaces
Lesson 5: Functions and surfaces
Matthew Leingang
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2
Hang Zhao
 

Similar to DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandra Summit 2016 (20)

ML-CheatSheet (1).pdf
ML-CheatSheet (1).pdfML-CheatSheet (1).pdf
ML-CheatSheet (1).pdf
 
CS 354 Graphics Math
CS 354 Graphics MathCS 354 Graphics Math
CS 354 Graphics Math
 
Data transformation-cheatsheet
Data transformation-cheatsheetData transformation-cheatsheet
Data transformation-cheatsheet
 
Rate of change and tangent lines
Rate of change and tangent linesRate of change and tangent lines
Rate of change and tangent lines
 
Differentiation full detail presentation
Differentiation full detail presentationDifferentiation full detail presentation
Differentiation full detail presentation
 
Computer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1bComputer Graphics in Java and Scala - Part 1b
Computer Graphics in Java and Scala - Part 1b
 
Advanced Functions Unit 1
Advanced Functions Unit 1Advanced Functions Unit 1
Advanced Functions Unit 1
 
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
ImplementDijkstra’s algorithm using the graph class you implemente.pdfImplementDijkstra’s algorithm using the graph class you implemente.pdf
ImplementDijkstra’s algorithm using the graph class you implemente.pdf
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)Lesson 2: A Catalog of Essential Functions (slides)
Lesson 2: A Catalog of Essential Functions (slides)
 
3.5 Transformation of Functions
3.5 Transformation of Functions3.5 Transformation of Functions
3.5 Transformation of Functions
 
Abstract machines for great good
Abstract machines for great goodAbstract machines for great good
Abstract machines for great good
 
Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1Mini-curso JavaFX Aula1
Mini-curso JavaFX Aula1
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncr
 
Website designing company in delhi ncr
Website designing company in delhi ncrWebsite designing company in delhi ncr
Website designing company in delhi ncr
 
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
Applicationofpartialderivativeswithtwovariables 140225070102-phpapp01 (1)
 
A walk in graph databases v1.0
A walk in graph databases v1.0A walk in graph databases v1.0
A walk in graph databases v1.0
 
Monadologie
MonadologieMonadologie
Monadologie
 
Lesson 5: Functions and surfaces
Lesson 5: Functions and surfacesLesson 5: Functions and surfaces
Lesson 5: Functions and surfaces
 
Fp in scala part 2
Fp in scala part 2Fp in scala part 2
Fp in scala part 2
 

More from DataStax

Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?
DataStax
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
DataStax
 
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid EnvironmentsRunning DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
DataStax
 
Best Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise GraphBest Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise Graph
DataStax
 
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step JourneyWebinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
DataStax
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
DataStax
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
DataStax
 
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax EnterpriseTop 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
DataStax
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0
DataStax
 
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
DataStax
 
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud RealitiesWebinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
DataStax
 
Designing a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for DummiesDesigning a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for Dummies
DataStax
 
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid CloudHow to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
DataStax
 
How to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerceHow to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerce
DataStax
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
DataStax
 
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
DataStax
 
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
DataStax
 
Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)
DataStax
 
An Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking ApplicationsAn Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking Applications
DataStax
 
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design ThinkingBecoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
DataStax
 

More from DataStax (20)

Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?Is Your Enterprise Ready to Shine This Holiday Season?
Is Your Enterprise Ready to Shine This Holiday Season?
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
 
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid EnvironmentsRunning DataStax Enterprise in VMware Cloud and Hybrid Environments
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
 
Best Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise GraphBest Practices for Getting to Production with DataStax Enterprise Graph
Best Practices for Getting to Production with DataStax Enterprise Graph
 
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step JourneyWebinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
 
Webinar | Better Together: Apache Cassandra and Apache Kafka
Webinar  |  Better Together: Apache Cassandra and Apache KafkaWebinar  |  Better Together: Apache Cassandra and Apache Kafka
Webinar | Better Together: Apache Cassandra and Apache Kafka
 
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax EnterpriseTop 10 Best Practices for Apache Cassandra and DataStax Enterprise
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
 
Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0Introduction to Apache Cassandra™ + What’s New in 4.0
Introduction to Apache Cassandra™ + What’s New in 4.0
 
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
 
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud RealitiesWebinar  |  Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
 
Designing a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for DummiesDesigning a Distributed Cloud Database for Dummies
Designing a Distributed Cloud Database for Dummies
 
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid CloudHow to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
 
How to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerceHow to Evaluate Cloud Databases for eCommerce
How to Evaluate Cloud Databases for eCommerce
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
 
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
 
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
 
Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)Datastax - The Architect's guide to customer experience (CX)
Datastax - The Architect's guide to customer experience (CX)
 
An Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking ApplicationsAn Operational Data Layer is Critical for Transformative Banking Applications
An Operational Data Layer is Critical for Transformative Banking Applications
 
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design ThinkingBecoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
 

Recently uploaded

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Envertis Software Solutions
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 

Recently uploaded (20)

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 

DataStax | Graph Computing with Apache TinkerPop (Marko Rodriguez) | Cassandra Summit 2016

  • 1. Gremlin’s Graph Traversal Machinery Dr. Marko A. Rodriguez Director of Engineering at DataStax, Inc. Project Management Committee, Apache TinkerPop http://tinkerpop.apache.org
  • 2. f : X ! X The function f is a process that maps a structure of type X to a structure of type X.
  • 3. f(x1) = x2 The function f maps the object x1 (from the set of X) to the object x2 (from the set of X). x1 2 X x2 2 X
  • 4. f(x) A step is a function.
  • 5. f(x) Assume that this step rotates an X by 90°. 90°
  • 6. 90° The algorithm of the step is a “black box.”
  • 7. 90° A traverser wraps a value of type V. class Traverser<V> { V value; } class Traverser<V> { V value; }
  • 8. 90° The step maps an integer traverser to an integer traverser. class Traverser<V> { V value; } class Traverser<V> { V value; } Traverser<Integer> Traverser<Integer>
  • 9. 90° A traverser of with a rotation of 0° becomes a traverser with a rotation of 90°. Traverser(0) Traverser(90) class Traverser<V> { V value; } class Traverser<V> { V value; }
  • 10. 90°
  • 11. Both the input and output traversers are of type Traverser<Integer>. 90° T[N] ! T[N] 2 T[N] 2 T[N]
  • 12. A stream of input traversers… 90°
  • 13. …yields a stream of output traversers. 90°
  • 14. A traverser can have a bulk which denotes how many V values it represents. 90° class Traverser<V> { V value; long bulk; } class Traverser<V> { V value; long bulk; }
  • 15. 4 4 Bulking groups identical traversers to reduce the number of evaluations of a step. 90° class Traverser<V> { V value; long bulk; } class Traverser<V> { V value; long bulk; }
  • 16. A variegated stream of input traversers yields a variegated stream of output traversers. 90°
  • 17. 1 2 1 1 1 2 Bulking can reduce the size of the stream. 90° class Traverser<V> { V value; long bulk; } class Traverser<V> { V value; long bulk; }
  • 18. If the order of the stream does not matter… 90°
  • 19. …then reordering can increase the likelihood of bulking. 90° 1 21 total bulk = 4 total count = 4 total bulk = 4 total count = 3
  • 20. 90° 180° 270° 360° A traversal is a list of one or more steps. 90° 90° 90° 90°
  • 21. f : X ! Y Different functions can yield different mappings between different domains and ranges. h : Y ! Z
  • 22. The output of f can be the input to h because the range of f is the domain of h (i.e. Y). Y y = f(x) Z z = h(y)
  • 23. y = f(x) z = h(y)
  • 24. y = f(x) z = h(y)
  • 28. f(x) h = z
  • 29. f h = zx
  • 30. f h = zx · ·
  • 31. x · f · h = z h(f(x)) = z readable unreadable ≣
  • 32. z = x · f · h
  • 33. z = x.f().h().next() z = x · f · h stream/iterator/traversalhead/start
  • 34. 90° 225° 315° Different types of steps exist and their various compositions yield query expressivity.
  • 35. 90° 225° 315° Steps process traverser streams/flows and their composition is a traversal/iterator. = . (). ().next()90° 225°
  • 36. repeat( ).times(2) 180° Anonymous traversals can serve as step arguments. 90° traversal with a single step 90°
  • 37. repeat( ).times(2) 180° Some functions serve as step-modulators instead of steps. 90° …groupCount().by(out().count()) …select(“a”,”b”).by(“name”) …addE(“knows”).from(“a”).to(“b”) …order().by(“age”,decr)
  • 38. repeat( ).times(2) ≣ 90° 90° 180° During optimization, traversal strategies may rewrite a traversal to a more efficient, semantically equivalent form. 90° RepeatUnrollStrategy interface TraversalStrategy { void apply(Traversal traversal); Set<TraversalStrategy> applyPrior(); Set<TraversalStrategy> applyPost(); }
  • 39. repeat( ).until(0°)90° Continuously process a traverser until some condition is met.
  • 40. repeat( ).until(0°) 4 loops 2 loops 1 loop 90° 180° 360° 90°do while(x != ) repeat().until() provides do/while-semantics. 90° ≣
  • 41. until(0°).repeat( ) 0 loops 2 loops 1 loop 90° 180° 0° 90°dowhile(x != ) 90° ≣ until().repeat() provides while/do-semantics.
  • 42. until(0°).repeat( ) 3 Even if the traversers in the input stream can not be bulked, the output traversers may be able to be. 90°
  • 44. filter(x)map(x) sideEffect(x)flatMap(x) one-to-one one-to-many one-to-(one-or-none) one-to-same out(“knows”) has(“name”,”gremlin”) groupCount(“m”) where(“a”,eq(“b”)) select(“a”,”b”) path() mean() sum() count() groupCount() many-to-one(reducers) order() values(“age”) values(“name”) and(x,y) or(x,y) coin(0.5) sample(10) simplePath() dedup() store(“m”) tree(“m”) subgraph(“m”) in(“created”) group(“m”) m label() id() * A collection of examples. Not the full step library. match(x,y,z) properties() outE(“knows”) V()
  • 45. values(“age”) filter(x)map(x) sideEffect(x)flatMap(x) one-to-one one-to-many one-to-(one-or-none) one-to-same out(“knows”) has(“name”,”gremlin”) path() groupCount() simplePath() m label() outE(“knows”) group(“m”) V()
  • 46. T[V [ E] ! T[N+ ] values(“age”) filter(x)map(x) sideEffect(x)flatMap(x) one-to-one one-to-many one-to-(one-or-none) one-to-same out(“knows”) has(“name”,”gremlin”) path() groupCount() simplePath() m label() outE(“knows”) T[?] ! T[path] T[V [ E] ! T[string] T[?] ! T[?] T[V [ E] ! ; [ T[V [ E] T[?] ! ; [ T[?] T[V ] ! T[V ]⇤ T[V ] ! T[E]⇤ group(“m”) V()T[?] ! T[map[?, N+ ]] T[G] ! T[V ]⇤
  • 47. T[V [ E] ! T[N+ ] values(“age”) out(“knows”) has(“name”,”gremlin”) groupCount() T[V [ E] ! ; [ T[V [ E] T[V ] ! T[V ]⇤ V()T[?] ! T[map[?, N+ ]] T[G] ! T[V ]⇤ g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount()
  • 48. T[V [ E] ! T[N+ ]values(“age”) out(“knows”) has(“name”,”gremlin”) groupCount() T[V ] ! T[V ]⇤ V() T[?] ! T[map[?, N+ ]] T[G] ! T[V ]⇤ g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() Steps can be composed if their respective domains and ranges match. T[V [ E] ! ; [ T[V [ E]
  • 49. values(“age”) out(“knows”) has(“name”,”gremlin”) groupCount() T[V ] ! T[V ]⇤ V() T[G] ! T[V ]⇤ g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() T[V ] ! ; [ T[V ] T[V ] ! T[N+ ] T[N+ ] ! T[map[N+ , N+ ]]
  • 52. g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() one graph to many vertices (flatMap) one vertex to that vertex or no vertex (filter) ? …
  • 53. g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() one graph to many vertices (flatMap) one vertex to that vertex or no vertex (filter) one vertex to many friend vertices (flatMap) ? … name=gremlin
  • 54. g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() one graph to many vertices (flatMap) one vertex to that vertex or no vertex (filter) one vertex to many friend vertices (flatMap) one vertex to one age value (map) ? … 37 name=gremlin
  • 55. g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() one graph to many vertices (flatMap) one vertex to that vertex or no vertex (filter) one vertex to many friend vertices (flatMap) one vertex to one age value (map) many age values to an age distribution (map — reducer) ? … 37 [37:2, 41:1, 24:1, 35:4]37 37 24 35 35 35 35 41 name=gremlin
  • 56. The Gremlin Traversal Language The Gremlin Traversal Machine
  • 57. a b c a b c Traversal creation via step composition Step parameterization via traversal and constant nesting a().b().c() a(b().c()).d(x)d(x) function com position function nesting fluent m ethods m ethod argum ents Any language that supports function composition and function nesting can host Gremlin. Gremlin Traversal Language
  • 58. class Traverser<V> { V value; long bulk; } class Step<S,E> { Traverser<E> processNextStart(); } f(x) class Traversal<S,E> implements Iterator<E> { E next(); Traverser<E> nextTraverser(); } The fundamental constructs of Gremlin’s machinery. Gremlin Traversal Machine interface TraversalStrategy { void apply(Traversal traversal); Set<TraversalStrategy> applyPrior(); Set<TraversalStrategy> applyPost(); } a db c a de ≣
  • 59. 1 Bytecode Gremlin-Java g.V(1). repeat(out(“knows”)).times(2). groupCount().by(“age”) [[V, 1] [repeat, [[out, knows]]] [times, 2] [groupCount] [by, age]] Traversal GraphStep GroupCountStep RepeatStep VertexStep GraphStep GroupCountStepVertexStep VertexStep Traversal Strategies GraphStep GroupCountStepVertexStep VertexStep translates compiles optimizes executes [29:2, 30:1, 31:1, 35:10]
  • 60. 1 Bytecode Gremlin-Python g.V(1). repeat(out(‘knows’)).times(2). groupCount().by(‘age’) [[V, 1] [repeat, [[out, knows]]] [times, 2] [groupCount] [by, age]] Traversal GraphStep GroupCountStep RepeatStep VertexStep GraphStep GroupCountStepVertexStep VertexStep Traversal Strategies GraphStep GroupCountStepVertexStep VertexStep translates compiles optimizes executes [29:2, 30:1, 31:1, 35:10]
  • 61. 1 Bytecode Gremlin-Python g.V(1). repeat(out(‘knows’)).times(2). groupCount().by(‘age’) [[V, 1] [repeat, [[out, knows]]] [times, 2] [groupCount] [by, age]] Traversal GraphStep GroupCountStep RepeatStep VertexStep GraphStep GroupCountStepVertexStep VertexStep Traversal Strategies GraphStep GroupCountStepVertexStep VertexStep translates compiles optimizes executes [29:2, 30:1, 31:1, 35:10] Gremlin language variant Language agnostic bytecode Execution engine assembly Execution engine optimization Execution engine evaluation LanguageMachine
  • 63. Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from gremlin_python.structure.graph import Graph >>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection Gremlin-Python CPython
  • 64. Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from gremlin_python.structure.graph import Graph >>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection >>> graph = Graph() >>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g')) Gremlin-Python DriverRemoteConnection CPython
  • 65. Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from gremlin_python.structure.graph import Graph >>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection >>> graph = Graph() >>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g')) # nested traversal with Python slicing and attribute interception extensions >>> g.V().hasLabel("person").repeat(both()).times(2).name[0:2].toList() [u'marko', u'marko'] Gremlin-Python Bytecode DriverRemoteConnection Gremlin Traversal Machine CPython JVM
  • 66. Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from gremlin_python.structure.graph import Graph >>> from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection >>> graph = Graph() >>> g = graph.traversal().withRemote(DriverRemoteConnection('ws://localhost:8182','g')) # nested traversal with Python slicing and attribute interception extensions >>> g.V().hasLabel("person").repeat(both()).times(2).name[0:2].toList() [u'marko', u'marko'] # a complex, nested multi-line traversal >>> g.V().match( ... as_(“a”).out("created").as_(“b”), ... as_(“b”).in_(“created").as_(“c”), ... as_(“a”).out("knows").as_(“c”)). ... select("c"). ... union(in_(“knows"),out("created")). ... name.toList() [u'ripple', u'marko', u'lop'] >>> Gremlin-Python Bytecode DriverRemoteConnection Gremlin Traversal Machine CPython JVM
  • 67. Cypher Bytecode Distinct query languages (not only Gremlin language variants) can generate bytecode for evaluation by any OLTP/OLAP TinkerPop-enabled graph system. Gremlin Traversal Machine
  • 68. SELECT DISTINCT ?c WHERE { ?a v:label "person" . ?a e:created ?b . ?b v:name ?c . ?a v:age ?d . FILTER (?d > 30) } [ [V], [match, [[as, a], [hasLabel, person]], [[as, a], [out, created], [as, b]], [[as, a], [has, age, gt(30)]]], [select, b], [by, name], [dedup] ] Bytecode
  • 69. Graph Database OLTP Graph Processor OLAP Bytecode Bytecode Bytecode TinkerGraph DSE Graph Titan Neo4j OrientDB IBM Graph … TinkerComputer Spark Giraph Hadoop Fulgora … Gremlin Traversal Machine Traversal Traversal Traversal Gremlin traversals can be executed against OLTP graph databases and OLAP graph processors. That means that if, e.g., SPARQL compiles to bytecode, it can execute both OLTP and OLAP.
  • 70. Graph Database OLTP Graph Processor OLAP Gremlin Traversal Machine Traversal Traversal Traversal TraversalStrategies TraversalStrategies optimizes Graph system providers (OLTP/OLAP) typically have custom strategies registered with the Gremlin traversal machine that take advantage of unique, provider-specific features.
  • 71. Most OLTP graph systems have a traversal strategy that combines [V,has*]-sequences into a single global index-based flatMap-step. g.V().has(“name”,”gremlin”). out(“knows”).values(“age”). groupCount() one graph to many vertices using index lookup (flatMap) GraphStepStrategy one graph to many vertices (flatMap) one vertex to that vertex or no vertex (filter) ? … compiles optimizes name=gremlin DataStax Enterprise Graph
  • 72. Most OLAP graph systems have a traversal strategy that bypasses Traversal semantics and implements reducers using the native API of the system. g.V().count() one graph to long (map — reducer) rdd.count() 12,146,934 compiles one graph to many vertices (flatMap) many vertices to long (map — reducer) … 12,146,934 optimizes SparkInterceptorStrategy …
  • 73. Physical Machine DataProgram Traversal Heap/DiskMemory Memory Memory/Graph System Physical Machine Java Virtual Machine bytecode steps DataProgram Memory/DiskMemory Physical Machine instructions Java Virtual Machine Gremlin Traversal Machine From the physical computing machine to the Gremlin traversal machine.
  • 74. Stakeholders Language Providers Gremlin Language Variant Distinct Query Language Application Developers Graph System Providers OLAP Provider OLTP Provider
  • 75. Stakeholders Application Developers One query language for all OLTP/OLAP systems. GremlinG = (V, E) Real-time and analytic queries are represented in Gremlin. Graph Database OLTP Graph Processor OLAP
  • 76. Stakeholders Application Developers One query language for all OLTP/OLAP systems. No vendor lock-in. Apache TinkerPop as the JDBC for graphs. DataStax Enterprise Graph
  • 77. Stakeholders Application Developers One query language for all OLTP/OLAP systems. No vendor lock-in. Gremlin is embedded in the developer’s language. Iterator<String> result = g.V().hasLabel(“person”). order().by(“age”). limit(10).values(“name”) vs. ResultSet result = statement.executeQuery( “SELECT name FROM People n” + “ ORDER BY age n” + “ LIMIT 10”) Grem lin-Java SQL in Java No “fat strings.” The developer writes their graph database/processor queries in their native programming language.
  • 78. Stakeholders Language Providers Gremlin Language Variant Distinct Query Language Easy to generate bytecode. GraphTraversal.getMethods() .findAll { GraphTraversal.class == it.returnType } .collect { it.name } .unique() .each { pythonClass.append( """ def ${it}(self, *args): self.bytecode.add_step(“${it}”, *args) return self “””)} Gremlin-Python’s source code is programmatically generated using Java reflection.
  • 79. Stakeholders Language Providers Gremlin Language Variant Distinct Query Language Easy to generate bytecode. Bytecode executes against TinkerPop-enabled systems. Language providers write a translator for the Gremlin traversal machine, not a particular graph database/processor. DataStax Enterprise Graph
  • 80. Graph Database OLTP Graph Processor OLAP Stakeholders Language Providers Gremlin Language Variant Distinct Query Language Easy to generate bytecode. Bytecode executes against TinkerPop-enabled systems. Provider can focus on design, not evaluation. Gremlin Traversal Machine The language designer does not have to concern themselves with OLTP or OLAP execution. They simply generate bytecode and the Gremlin traversal machine handles the rest.
  • 81. Easy to implement core interfaces. Graph System Providers Stakeholders OLAP Provider OLTP Provider Vertex Edge Graph Transaction TraversalStrategy Property key=value ? ? ?
  • 82. Provider supports all provided languages. Easy to implement core interfaces. Graph System Providers Stakeholders OLAP Provider OLTP Provider The provider automatically supports all query languages that have compilers that generate Gremlin bytecode.
  • 83. OLTP providers can leverage existing OLAP systems. Provider supports all provided languages. Easy to implement core interfaces. Graph System Providers Stakeholders OLAP Provider OLTP Provider DSE Graph leverages SparkGraphComputer for OLAP processing. DataStax Enterprise Graph
  • 84. Stakeholders Language Providers Gremlin Language Variant Distinct Query Language Application Developers Graph System Providers OLAP Provider OLTP Provider One query language for all OLTP/OLAP systems. No vendor lock-in. Gremlin is embedded in the developer’s language. Easy to generate bytecode. Bytecode executes against TinkerPop-enabled systems. Provider can focus on design, not evaluation. Easy to implement core interfaces. Provider supports all provided languages. OLTP providers can leverage existing OLAP systems.