GRADES2017: Graph Data-management Experiences & Systems Chicago May 2017 Cy Cypher pher-based based Graph ph Pattern ttern Ma Matc tching hing in in Gradoo adoop Martin Junghanns 1 , Max Kießling 1,2 , Alex Averbuch 2 , André Petermann 1 and Erhard Rahm 1 1 University of Leipzig – Database Research Group 2 Neo Technology
Moti tivation tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Moti Mo tivati tion on 2 2 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark 3 3 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark „Who are the closest enemies of each Orc ?“ 4 4 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Cypher 5 5 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Flink Gelly 6 6 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark 7 7 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark 8 8 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark „Which two clan leaders hate each other and one of them knows Frodo over one to ten hops?“ 9 9 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Cypher 10 10 10 10 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti Moti tivation tivation tion tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Flink Gelly (or any other non-declarative graph processing system) 11 11 11 11 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark GRA GRADO DOOP OP 12 12 12 12 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark „An open -source graph dataflow system for declarative analytics of heterogeneous graph data .“ 13 13 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark Analytical API I/O Graph Operators Graph Algorithms E xtended P roperty G raph M odel (EPGM) Distributed Operator Execution (Apache Flink) Distributed Graph Storage (Apache HDFS) 14 14 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark Hobbit name : Frodo yob : 2968 hates 4 since : 2301 3 leaderOf memberOf knows 5 1 since : 2790 since : 2013 2 3 Orc since : 2990 1 2 name : Bolg Orc Clan name : Azog name : Tribes of Moria founded : 1981 4 hates 5 Hobbit name : Samwise Property Graph Model 15 15 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark 2 | Area |title:Shire Hobbit name : Frodo yob : 2968 hates 4 since : 2301 3 1 | Area |title:Mordor leaderOf memberOf knows 5 1 since : 2790 2 since : 2013 3 Orc since : 2990 1 2 name : Bolg Orc Clan name : Azog name : Tribes of Moria founded : 1981 4 hates 5 Hobbit name : Samwise Extended Property Graph Model 16 16 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark Gradoop Graph Transformations Unary Binary Aggregation Combination Logical Graph Overlap Pattern Matching Transformation Exclusion Grouping Equality Subgraph Fusion Call Selection Union Pattern Matching Intersection Graph Collection Distinct Difference Limit Equality Apply Reduce Call 17 17 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO GRADOO DOOP DOOP Impleme lementa ntation tion Benc nchmar hmark Pattern Matching (Single-Graph Setting) 4 3 5 4 4 Pattern 1 2 3 1 2 3 5 Graph Collection GraphCollection collection = graph3. cypher ( ‘MATCH (:Green) -[:orange]- >(:Orange) RETURN *’ , ISO, ISO); 18 18 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme lementa ntation tion Benc nchmar hmark Imple Im plemen menta tati tion on 19 19 19 19 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme Impleme lementa lementa ntation ntation tion tion Benc nchmar hmark DataSet <EPGMGraphHead> Id Id Label Pro roperti ties 1 Area {title:Mordor} 2 Area {title:Shire} DataSet <EPGMVertex> DataSet <EPGMEdge> Id Id Label Pro roperti ties Graphs Id Id Label Sour urce Targ rget Pro roperti ties Graphs 1 Orc {name:Azog} {1} 1 leaderOf 1 2 {since:2790} {1} 2 Clan {name:Tribes of Moria, founded:1981} {1} 2 memberOf 3 2 {since:2013} {1} 3 Orc {name:Bolg} {1,2} 3 hates 3 4 {since:2301} {2} 4 Hobbit {name:Frodo, yob:2968} {2} 4 hates 3 5 {} {2} 5 Hobbit {name:Samwise} {2} 5 knows 5 4 {since:2990} {2} 20 20 20 20 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme Impleme lementa lementa ntation ntation tion tion Benc nchmar hmark => 23 => 42 => 84 0 1 => 123 2 3 4 => 456 => 789 0 1 2 3 5 4 Parsing Planning Execution 0 1 c1 c2 2 3 6 4 o1 o2 h 0 1 4 (c1 != c2) AND (o1 != o2) AND (h.name = Frodo Baggins) 2 3 6 7 21 21 21 21 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme Impleme lementa lementa ntation ntation tion tion Benc nchmar hmark PlanTableEntry | type: GRAPH | all-vars: [...] | proc-vars: [...] | attr-vars: [] | est-card: 23 | prediates: () | Plan : |-FilterEmbeddingsNode{filterPredicate=((c1 != c2) AND (o1 != o2))} |.|-JoinEmbeddingsNode{joinVariables=[o2], vertexMorphism=H, edgeMorphism=I} |.|.|-JoinEmbeddingsNode{joinVariables=[o1], vertexMorphism=H, edgeMorphism=I} |.|.|.|-JoinEmbeddingsNode{joinVariables=[c1], vertexMorphism=H, edgeMorphism=I} |.|.|.|.|-FilterAndProjectVerticesNode{vertexVar=c1, filterPredicate=((c1.label = Clan)), projectionKeys=[]} |.|.|.|.|-FilterAndProjectEdgesNode{sourceVar='o1', edgeVar='_e0', targetVar='c1', filterPredicate=((_e0.label = leaderOf)), projectionKeys=[]} |.|.|.|-JoinEmbeddingsNode{joinVariables=[o1], vertexMorphism=H, edgeMorphism=I} |.|.|.|.|-FilterAndProjectVerticesNode{vertexVar=o1, filterPredicate=((o1.label = Orc)), projectionKeys=[]} |.|.|.|.|-FilterAndProjectEdgesNode{sourceVar='o1', edgeVar='_e1', targetVar='o2', filterPredicate=((_e1.label = hates)), projectionKeys=[]} |.|.|-JoinEmbeddingsNode{joinVariables=[o2], vertexMorphism=H, edgeMorphism=I} |.|.|.|-JoinEmbeddingsNode{joinVariables=[h], vertexMorphism=H, edgeMorphism=I} |.|.|.|.|-FilterAndProjectVerticesNode{vertexVar=h, filterPredicate=((h.label = Hobbit) AND (h.name = Frodo Baggins)), projectionKeys=[]} |.|.|.|.|-ExpandEmbeddingsNode={startVar='o2', pathVar='_e3', endVar='h', lb=1, ub=10, direction=OUT, vertexMorphism=H, edgeMorphism=I} |.|.|.|.|.|-FilterAndProjectVerticesNode{vertexVar=o2, filterPredicate=((o2.label = Orc)), projectionKeys=[]} |.|.|.|.|.|-FilterAndProjectEdgesNode{sourceVar='o2', edgeVar='_e3', targetVar='h', filterPredicate=((_e3.label = knows)), projectionKeys=[]} |.|.|.|-JoinEmbeddingsNode{joinVariables=[c2], vertexMorphism=H, edgeMorphism=I} |.|.|.|.|-FilterAndProjectVerticesNode{vertexVar=c2, filterPredicate=((c2.label = Clan)), projectionKeys=[]} |.|.|.|.|-FilterAndProjectEdgesNode{sourceVar='o2', edgeVar='_e2', targetVar='c2', filterPredicate=((_e2.label = leaderOf)), projectionKeys=[]} 22 22 22 22 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Moti tivation tion GRADOO DOOP Impleme Impleme lementa lementa ntation ntation tion tion Benc nchmar hmark FilterAndProject Project Filter name: Frodo Baggins height: 1.22m [ ] Hobbit(name=Frodo Baggins) gender : male city: Bag End id Properties 𝜏 𝑀𝑏𝑐𝑓𝑚=𝐼𝑝𝑐𝑐𝑗𝑢 (𝑊) 𝜌 ℎ.𝐽𝑒 (𝑊 ′ ) 1 {…} ∧𝑜𝑏𝑛𝑓=𝐺𝑠𝑝𝑒𝑝 h.id h.name h.height … h.id 2 {…} 31 Frodo 1.22 … 32 3 {…} … … DataSet<Vertex> DataSet<Embedding> FlatMap (Vertex -> Embedding) 23 23 23 23 Cypher-based Graph Pattern Matching in GRADOOP – GRADES 2017
Recommend
More recommend