incremental graph queries for cypher
play

Incremental Graph Queries for Cypher Gbor Szrnyas, Jzsef Marton - PowerPoint PPT Presentation

Incremental Graph Queries for Cypher Gbor Szrnyas, Jzsef Marton Budapest University of Technology and Economics McGill University, Montral Budapest University of Technology and Economics Department of Measurement and Information Systems


  1. Incremental Graph Queries for Cypher Gábor Szárnyas, József Marton Budapest University of Technology and Economics McGill University, Montréal Budapest University of Technology and Economics Department of Measurement and Information Systems Department of Telecommunications and Media Informatics

  2. Live railway model

  3. Live railway model

  4. Live railway model

  5. Live railway model

  6. Live railway model Proximity detection

  7. Live railway model Proximity detection

  8. Live railway model Proximity detection

  9. Live railway model Proximity detection Trailing the switch

  10. Live railway model

  11. Live railway model

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

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

  14. Proximity detection Proximity detection ≤ 𝟑 segments

  15. Proximity detection Proximity detection t1 t2 ≤ 𝟑 segments ON ON seg1 seg2 NEXT: 1..2

  16. 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

  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. Trailing the switch

  19. Trailing the switch t ON STRAIGHT seg div

  20. 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

  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 Evaluate continuously MATCH (t:Train)-[:ON]->(seg:Segment) <-[:STRAIGHT]-(sw:Switch) WHERE sw.position = 'diverging' RETURN t.number, sw

  23. Incremental queries

  24. Incremental queries  Register a set of standing queries  Continuously evaluate queries on changes

  25. 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

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

  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 2 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  29. 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

  30. 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

  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 TOP a b c d e div f NEXT NEXT NEXT NEXT g

  32. 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

  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 STRAIGHT TOP a b c d e e div div f NEXT NEXT NEXT NEXT g

  34. 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

  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 ON ON STRAIGHT TOP a b c d e div f NEXT NEXT NEXT NEXT g

  36. 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

  37. 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

  38. 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

  39. 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

  40. 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

  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 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 e 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 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

  45. 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

  46. 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

  47. 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

  48. Batch vs. incremental queries  Batch queries (pull / request-driven): 1. Client selects a query 2. Results are calculated  Query results obtained on demand

  49. Batch vs. incremental queries  Batch queries  Incremental queries (pull / request-driven): (push / event-driven): 1. Client selects a query 1. Client registers queries 2. Results are calculated 2. Graph is changed  Query results 3. Results are maintained obtained on demand 4. Goto 2  Query results are always available

  50. Incremental query engines  CLIPS C structures NASA  Drools POJO Red Hat  VIATRA EMF BME / IncQuery Labs.

  51. Incremental query engines  CLIPS C structures NASA  Drools POJO Red Hat  VIATRA EMF BME / IncQuery Labs.  INSTANS RDF Aalto University  i3QL POJO TU Darmstadt  IncQuery-D RDF BME

  52. Incremental query engines  CLIPS C structures NASA  Drools POJO Red Hat  VIATRA EMF BME / IncQuery Labs.  INSTANS RDF Aalto University  i3QL POJO TU Darmstadt  IncQuery-D RDF BME  No implementations for property graphs yet

  53. ingraph  An incremental, in-memory graph query engine

  54. ingraph  An incremental, in-memory graph query engine client ingraph

  55. ingraph  An incremental, in-memory graph query engine register queries client ingraph

  56. ingraph  An incremental, in-memory graph query engine register queries update graph client ingraph

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend