O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
scaredOf
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
scaredOf
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
scaredOf
scaredOf
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
scaredOf
scaredOf
eats
eats
DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX
@DTRAPEZOID -FOR ?S-
scaredOf
scaredOf
eats
eats
OMG GRAPHS EXPRESS
RELATIONSHIPS IN THE REAL
WORLD, SO, LIKE, EVERYTHING
IS A GRAPH PROBLEM!
OMG GRAPHS EXPRESS
RELATIONSHIPS IN THE REAL
WORLD, SO, LIKE, EVERYTHING
IS A GRAPH PROBLEM!
NO.
THE WORLD IS NOT YOUR OYSTER
OK, SO WHEN
SHOULD I USE IT?
OK, SO WHEN
SHOULD I USE IT?
PROPERTY
GRAPH
WHAT’S THAT, DANI,
MY NEW FRIEND?
EXACTLY.
WAIT, WUT, LOL?
GRAPH
TERMINOLOGY
PROPERTY GRAPHS
WHAT IS A PROPERTY GRAPH?
▸Directed, binary, attributed multi-graph
▸ Vertices
▸ Edges
▸ Properties
PROPERTY GRAPHS
VERTICES
▸ Always have unique ID & Label
▸ Can be attached to vertices
and edges
▸ Have name, value & so m...
PROPERTY GRAPHS
VERTICES
▸ Always have unique ID & Label
▸ Can be attached to vertices
and edges
▸ Have name, value & so m...
PROPERTY GRAPHS
VERTICES
▸ Always have unique ID & Label
▸ Can be attached to vertices
and edges
▸ Have name, value & so m...
PROPERTY GRAPHS
EDGES
▸ Edges connect vertices with both
directionality and label
▸ They connect EXACTLY 2 vertices
and th...
PROPERTY GRAPHS
PROPERTIES
▸ Where the Property Graph
gets its name
▸ K:V pairs
▸ Associated with any vertex
(entity) or e...
PROPERTY GRAPHS
PROPERTIES
▸ Where the Property Graph
gets its name
▸ K:V pairs
▸ Associated with any vertex
(entity) or e...
PROPERTY GRAPHS
MULTI-PROPERTIES
▸ More than 1 property
YOUME
LOVES CATS
HATES CATS
FRIENDS
PROPERTY GRAPHS
MULTI-PROPERTIES
▸ More than 1 property
YOUME
LOVES CATS
HATES CATS
LOVES BATMAN
FRIENDS
PROPERTY GRAPHS
MULTI-PROPERTIES
▸ More than 1 property
YOUME
LOVES CATS
HATES CATS
LOVES BATMAN LOVES BATMAN
FRIENDS
PROPERTY GRAPHS
META-PROPERTIES
▸ Properties about properties
YOUME
LOVES CATS
HATES CATS
LOVES BATMAN LOVES BATMAN
WATCHE...
PROPERTY GRAPHS
FINAL PROPERTY GRAPH
▸ We’ve built a nice story here
▸ But this is just a subgraph
▸ Our final property gra...
PROPERTY GRAPHS
FINAL PROPERTY GRAPH
▸ We’ve built a nice story here
▸ But this is just a subgraph
▸ Our final property gra...
PROPERTY GRAPHS
FINAL PROPERTY GRAPH
▸ We’ve built a nice story here
▸ But this is just a subgraph
▸ Our final property gra...
JUST SHOW ME
SOMETHING REAL!
YOU GOT IT:
A REAL FINAL PROPERTY GRAPH
MOVIES, WE LOVE 'EM
THE GREMLIN GRAPH
TRAVERSAL LANGUAGE
THE GREMLIN GRAPH TRAVERSAL LANGUAGE
WHAT’S THIS GREMLIN NOW?
▸ Gremlin is defined by Apache TinkerPop
▸ Expressive languag...
LINEAR MOTIF: TRAVERSAL
IS A SEQUENCE OF STEPS
NESTED MOTIF: TRAVERSAL
IS A TREE OF STEPS
TRAVERSAL INGREDIENTS
TRAVERSAL INGREDIENTS
TRAVERSAL INGREDIENTS
TRAVERSAL INGREDIENTS
BECOMING PROFICIENT IN GREMLIN
GRAPH TRAVERSAL STEP EVALUATION
▸ Lazy evaluation
▸ Everything is lazily evaluated
▸ All bu...
HOW DO I GET GREMLIN-
DANGEROUS?
HOW DO I GET GREMLIN-
DANGEROUS?
LEARN TO TRAVERSE LIKE A BOSS
HOW DO I GET GREMLIN-
DANGEROUS?
LEARN TO TRAVERSE LIKE A BOSS
TYPES OF GRAPH
TRAVERSALS
TRAVERSAL TYPES
SO MANY TRAVERSALS!
▸ Simple Traversal
▸ Branching Traversal
▸ Recursive Traversal
▸ Path Traversal
▸ Proj...
TRAVERSAL TYPES
LET’S JUST TALK ABOUT 1 TYPE OF GRAPH TRAVERSAL*
▸Simple
*WISH WE HAD TIME TO ADDRESS RECURSIVE & STATISTI...
SIMPLE
TRAVERSALS
THE MOST BASIC
GRAPH TRAVERSAL
▸Moves traverser through
steps in sequential order
▸Contains no internal, nested
traversals
PREREQUISITES: VERTEX STEPS
& NAVIGATION
NAVIGATING FROM
AN EDGE
SIMPLE TRAVERSAL WITH IN
Find Johnny Depp’s movies released in 2010 or later:
SIMPLE TRAVERSAL WITH IN AND OUT
Find directors of Johnny Depp’s movies released in
2010 or later:
SIMPLE TRAVERSAL WITH IN AND INE
Find user ratings for Johnny Depp’s movies released
in 2010 or later:
PREDICATES
Relating objects and values
SIMPLE TRAVERSAL
WITH IN, INE, AND OUTV
Find ages of users who left 7 or 8 star ratings for Johnny Depp’s movies
released ...
DEMO TIME
THANK YOU,
BEAUTIFUL HUMANZ
@DTRAPEZOID
Próximos SlideShares
Carregando em…5
×

Diving into DSE Graph

539 visualizações

Publicada em

I did this talk at Nike Tech. This is a good foundation for graph databases and discusses the frameworks associated with DSE Graph. This addresses use case fit, property graph, terminology and gremlin.

Publicada em: Dados e análise
  • Seja o primeiro a comentar

Diving into DSE Graph

  1. 1. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  2. 2. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  3. 3. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  4. 4. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  5. 5. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  6. 6. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  7. 7. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S-
  8. 8. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- eats
  9. 9. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- eats
  10. 10. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- scaredOf eats
  11. 11. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- scaredOf eats
  12. 12. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- scaredOf scaredOf eats
  13. 13. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- scaredOf scaredOf eats eats
  14. 14. DIVING INTO DSE GRAPHWITH DANI TRAPHAGEN, DATASTAX @DTRAPEZOID -FOR ?S- scaredOf scaredOf eats eats
  15. 15. OMG GRAPHS EXPRESS RELATIONSHIPS IN THE REAL WORLD, SO, LIKE, EVERYTHING IS A GRAPH PROBLEM!
  16. 16. OMG GRAPHS EXPRESS RELATIONSHIPS IN THE REAL WORLD, SO, LIKE, EVERYTHING IS A GRAPH PROBLEM!
  17. 17. NO.
  18. 18. THE WORLD IS NOT YOUR OYSTER
  19. 19. OK, SO WHEN SHOULD I USE IT?
  20. 20. OK, SO WHEN SHOULD I USE IT?
  21. 21. PROPERTY GRAPH
  22. 22. WHAT’S THAT, DANI, MY NEW FRIEND?
  23. 23. EXACTLY.
  24. 24. WAIT, WUT, LOL?
  25. 25. GRAPH TERMINOLOGY
  26. 26. PROPERTY GRAPHS WHAT IS A PROPERTY GRAPH? ▸Directed, binary, attributed multi-graph ▸ Vertices ▸ Edges ▸ Properties
  27. 27. PROPERTY GRAPHS VERTICES ▸ Always have unique ID & Label ▸ Can be attached to vertices and edges ▸ Have name, value & so much more ▸ Grossly Simplified Here
  28. 28. PROPERTY GRAPHS VERTICES ▸ Always have unique ID & Label ▸ Can be attached to vertices and edges ▸ Have name, value & so much more ▸ Grossly Simplified Here ME
  29. 29. PROPERTY GRAPHS VERTICES ▸ Always have unique ID & Label ▸ Can be attached to vertices and edges ▸ Have name, value & so much more ▸ Grossly Simplified Here YOUME
  30. 30. PROPERTY GRAPHS EDGES ▸ Edges connect vertices with both directionality and label ▸ They connect EXACTLY 2 vertices and they always have direction… ▸ Unlike me in life… ▸ JK, I’m fine, really HAHA, FRIENDSHIP! IKR? YOUME FRIENDS
  31. 31. PROPERTY GRAPHS PROPERTIES ▸ Where the Property Graph gets its name ▸ K:V pairs ▸ Associated with any vertex (entity) or edge (relationship) in a property graph YOUME LOVES CATS FRIENDS
  32. 32. PROPERTY GRAPHS PROPERTIES ▸ Where the Property Graph gets its name ▸ K:V pairs ▸ Associated with any vertex (entity) or edge (relationship) in a property graph YOUME HATES CATS LOVES CATS FRIENDS
  33. 33. PROPERTY GRAPHS MULTI-PROPERTIES ▸ More than 1 property YOUME LOVES CATS HATES CATS FRIENDS
  34. 34. PROPERTY GRAPHS MULTI-PROPERTIES ▸ More than 1 property YOUME LOVES CATS HATES CATS LOVES BATMAN FRIENDS
  35. 35. PROPERTY GRAPHS MULTI-PROPERTIES ▸ More than 1 property YOUME LOVES CATS HATES CATS LOVES BATMAN LOVES BATMAN FRIENDS
  36. 36. PROPERTY GRAPHS META-PROPERTIES ▸ Properties about properties YOUME LOVES CATS HATES CATS LOVES BATMAN LOVES BATMAN WATCHES BATMAN ON FRI WATCHES BATMAN ON FRI FRIENDS
  37. 37. PROPERTY GRAPHS FINAL PROPERTY GRAPH ▸ We’ve built a nice story here ▸ But this is just a subgraph ▸ Our final property graph comprises everything YOUME LOVES CATS HATES CATS LOVES BATMAN LOVES BATMAN WATCHES BATMAN ON FRI WATCHES BATMAN ON FRI FRIENDS
  38. 38. PROPERTY GRAPHS FINAL PROPERTY GRAPH ▸ We’ve built a nice story here ▸ But this is just a subgraph ▸ Our final property graph comprises everything YOUME LOVES CATS HATES CATS LOVES BATMAN LOVES BATMAN WATCHES BATMAN ON FRI WATCHES BATMAN ON FRI LOVES JOHNNY DEPP FRIENDS
  39. 39. PROPERTY GRAPHS FINAL PROPERTY GRAPH ▸ We’ve built a nice story here ▸ But this is just a subgraph ▸ Our final property graph comprises everything YOUME LOVES CATS HATES CATS LOVES BATMAN LOVES BATMAN WATCHES BATMAN ON FRI WATCHES BATMAN ON FRI HATES JOHNNY DEPP LOVES JOHNNY DEPP FRIENDS
  40. 40. JUST SHOW ME SOMETHING REAL!
  41. 41. YOU GOT IT: A REAL FINAL PROPERTY GRAPH
  42. 42. MOVIES, WE LOVE 'EM
  43. 43. THE GREMLIN GRAPH TRAVERSAL LANGUAGE
  44. 44. THE GREMLIN GRAPH TRAVERSAL LANGUAGE WHAT’S THIS GREMLIN NOW? ▸ Gremlin is defined by Apache TinkerPop ▸ Expressive language to define traversals ▸ Yo, what good is a graph db if we can’t traverse it? ▸ Functional language with a fluent syntax ▸ Bindings in Groovy, Java8, Scala, Closure, and more
  45. 45. LINEAR MOTIF: TRAVERSAL IS A SEQUENCE OF STEPS
  46. 46. NESTED MOTIF: TRAVERSAL IS A TREE OF STEPS
  47. 47. TRAVERSAL INGREDIENTS
  48. 48. TRAVERSAL INGREDIENTS
  49. 49. TRAVERSAL INGREDIENTS
  50. 50. TRAVERSAL INGREDIENTS
  51. 51. BECOMING PROFICIENT IN GREMLIN GRAPH TRAVERSAL STEP EVALUATION ▸ Lazy evaluation ▸ Everything is lazily evaluated ▸ All but barrier steps ▸ Barrier steps ▸ Collecting barrier steps: aggregate, barrier, order, sample ▸ Reducing barrier steps: count, fold, max, min, sum ▸ Supplying barrier step: cap
  52. 52. HOW DO I GET GREMLIN- DANGEROUS?
  53. 53. HOW DO I GET GREMLIN- DANGEROUS? LEARN TO TRAVERSE LIKE A BOSS
  54. 54. HOW DO I GET GREMLIN- DANGEROUS? LEARN TO TRAVERSE LIKE A BOSS
  55. 55. TYPES OF GRAPH TRAVERSALS
  56. 56. TRAVERSAL TYPES SO MANY TRAVERSALS! ▸ Simple Traversal ▸ Branching Traversal ▸ Recursive Traversal ▸ Path Traversal ▸ Projecting Traversal ▸ Declarative Traversal ▸ Subgraph Traversal ▸ Statistical Traversal ▸ Ordering Traversal ▸ Mutating Traversal ▸ Domain Specific Traversal
  57. 57. TRAVERSAL TYPES LET’S JUST TALK ABOUT 1 TYPE OF GRAPH TRAVERSAL* ▸Simple *WISH WE HAD TIME TO ADDRESS RECURSIVE & STATISTICAL TOO BUT THAT WON’T LIKELY HAPPEN, I HAVE DEMOS ON THEM, IF WE DO. WE JUST GOTTA PICK OUR POISONS WITH LIMITED TIME. :’(
  58. 58. SIMPLE TRAVERSALS
  59. 59. THE MOST BASIC GRAPH TRAVERSAL ▸Moves traverser through steps in sequential order ▸Contains no internal, nested traversals
  60. 60. PREREQUISITES: VERTEX STEPS & NAVIGATION
  61. 61. NAVIGATING FROM AN EDGE
  62. 62. SIMPLE TRAVERSAL WITH IN Find Johnny Depp’s movies released in 2010 or later:
  63. 63. SIMPLE TRAVERSAL WITH IN AND OUT Find directors of Johnny Depp’s movies released in 2010 or later:
  64. 64. SIMPLE TRAVERSAL WITH IN AND INE Find user ratings for Johnny Depp’s movies released in 2010 or later:
  65. 65. PREDICATES Relating objects and values
  66. 66. SIMPLE TRAVERSAL WITH IN, INE, AND OUTV Find ages of users who left 7 or 8 star ratings for Johnny Depp’s movies released in 2010 or later
  67. 67. DEMO TIME
  68. 68. THANK YOU, BEAUTIFUL HUMANZ @DTRAPEZOID

×