the ingraph project
play

The ingraph project and incremental evaluation of Cypher queries - PowerPoint PPT Presentation

The ingraph project and incremental evaluation of Cypher queries Gbor Szrnyas, Jzsef Marton Incremental Queries Live railway model Live railway model Live railway model Live railway model Live railway model Proximity detection Live


  1. The ingraph project and incremental evaluation of Cypher queries Gábor Szárnyas, József Marton

  2. Incremental Queries

  3. Live railway model

  4. Live railway model

  5. Live railway model

  6. Live railway model

  7. Live railway model Proximity detection

  8. Live railway model Proximity detection

  9. Live railway model Proximity detection

  10. Live railway model Proximity detection Trailing the switch

  11. Live railway model

  12. Live railway model

  13. Live railway model 1 2 a b c d e div f g

  14. Live railway model 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  15. Proximity detection Proximity detection ≤ 𝟐 segments

  16. Proximity detection Proximity detection t1 t2 ≤ 𝟐 segments ON ON seg1 seg2 NEXT: 1..2

  17. Proximity detection Proximity detection t1 t2 ≤ 𝟐 segments ON ON seg1 seg2 NEXT: 1..2 MATCH (t1:Train)-[:ON]->(seg1:Segment) -[:NEXT*1..2]->(seg2:Segment) <-[:ON]-(t2:Train) RETURN t1, t2, seg1, seg2

  18. Proximity detection Proximity detection t1 t2 ≤ 𝟐 segments ON ON seg1 seg2 NEXT: 1..2 MATCH (t1:Train)-[:ON]->(seg1:Segment) -[:NEXT*1..2]->(seg2:Segment) <-[:ON]-(t2:Train) RETURN t1, t2, seg1, seg2

  19. Trailing the switch

  20. Trailing the switch t ON STRAIGHT seg div

  21. Trailing the switch t ON STRAIGHT seg div MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  22. Trailing the switch t ON STRAIGHT seg div MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  23. Trailing the switch t ON Evaluate STRAIGHT continuously seg div MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  24. Incremental queries  Register a set of standing queries  Continuously evaluate queries on changes  The Rete algorithm (1974) o Originally for rule-based expert systems o Indexes the graph and caches interim query results Ujhelyi, Z. et al. EMF-IncQuery: An integrated development environment for live model queries S cience of Computer Programming (SCP), 2015 http://www.sciencedirect.com/science/article/pii/S0167642314000082

  25. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON STRAIGHT

  26. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON STRAIGHT 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  27. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON STRAIGHT 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  28. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON STRAIGHT 1 1 2 2 ON ON ON ON STRAIGHT TOP a a b c d e e div f NEXT NEXT NEXT NEXT g

  29. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON ON 1 a 2 e STRAIGHT 1 1 2 2 ON ON ON ON STRAIGHT TOP a a b c d e e div f NEXT NEXT NEXT NEXT g

  30. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON ON 1 a 2 e STRAIGHT 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  31. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON ON 1 a 2 e STRAIGHT 1 2 ON ON STRAIGHT STRAIGHT TOP a b c d e e div div f NEXT NEXT NEXT NEXT g

  32. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 ON ON STRAIGHT STRAIGHT TOP a b c d e e div div f NEXT NEXT NEXT NEXT g

  33. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  34. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON ON STRAIGHT STRAIGHT ON 1 a 2 2 e e STRAIGHT e e div div 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  35. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON ON STRAIGHT STRAIGHT ON 1 a 2 2 e e STRAIGHT e e div div 1 2 2 ON ON ON STRAIGHT STRAIGHT TOP a b c d e e div div f NEXT NEXT NEXT NEXT g

  36. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON ON STRAIGHT STRAIGHT ON 1 a 2 2 e e STRAIGHT e e div div 1 2 2 ON ON ON STRAIGHT STRAIGHT TOP a b c d e e div div f NEXT NEXT NEXT NEXT g

  37. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ON ON STRAIGHT STRAIGHT ⋈ 2 e div 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  38. Trailing the switch π t.number, sw ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON ON STRAIGHT STRAIGHT ⋈ 2 e div 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  39. Trailing the switch π t.number, sw ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  40. Trailing the switch π t.number, sw div 2 ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  41. Trailing the switch π t.number, sw div 2 ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  42. Trailing the switch π t.number, sw div 2 ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON STRAIGHT ON 1 a 2 e STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  43. Trailing the switch π t.number, sw div 2 ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ON STRAIGHT ⋈ 2 e div ON ON STRAIGHT ON 1 a 2 d STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  44. Trailing the switch π t.number, sw div 2 ON STRAIGHT σ sw.position = ′diverging′ 2 e div ON STRAIGHT div ⋈ ON ON STRAIGHT ON 1 a 2 d STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  45. Trailing the switch π t.number, sw div 2 σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON STRAIGHT ON 1 a 2 d STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  46. Trailing the switch π t.number, sw σ sw.position = ′diverging′ ON STRAIGHT div ⋈ ON ON STRAIGHT ON 1 a 2 d STRAIGHT e div 1 2 ON ON STRAIGHT TOP a b c d e div div f NEXT NEXT NEXT NEXT g

  47. ingraph  PoC query engine for openCypher  Based on the Rete algorithm  Goals: o Provide incremental query evaluation o Cover standard openCypher constructs o Run in parallel & distributedly to allow scalability Szárnyas, G. et al. IncQuery-D: A distributed incremental model query framework in the cloud. MODELS, 2014, https://link.springer.com/chapter/10.1007/978-3-319-11653-2_40

  48. Architecture & Building Blocks

  49. openCypher query MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  50. openCypher Query query syntax tree MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  51. openCypher Query query syntax tree Query parser MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  52. Relational openCypher Query Graph query syntax tree Algebra Query parser MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  53. Relational openCypher Query Graph query syntax tree Algebra Relational Query algebra parser builder MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

Recommend


More recommend