Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Neo4j GraphDay Tel Aviv - Real World Graph Use Cases

146 vues

Publié le

Assi Barak

Publié dans : Technologie
  • Soyez le premier à commenter

Neo4j GraphDay Tel Aviv - Real World Graph Use Cases

  1. 1. Real-World Graph use cases Graph Days TLV 2017 Assi Barak
  2. 2. Fascinated by Graphs  We think in graphs, not in INNER JOINs  A great way to represent data and knowledge
  3. 3. Disillusioned RDF Practitioner  Please give me back my properties!  Reasoners not used in practice  Some great ideas, though. We should borrow http://lod-cloud.net/versions/2017-02-20/lod.svg
  4. 4. Fascinated by Cypher  Very expressive  Human Readable  Visual
  5. 5. Power of Cypher MATCH (A:Person) WHERE A.birth_date < '1.1.1970' AND A.death_date != null RETURN A UNION MATCH (A:Person) -[:Offspring]-> (B:Person) WHERE B.gender = 'male' AND B.birth_date <= '1.1.1950' RETURN A “People born before the seventies and still alive, or people whose father was born before the fifties”
  6. 6. Gremlin is nice, Kind’a g.v(1).outE('friend').inV().has('age',25).firstName; No too fond of imperative style
  7. 7. Cypher Strikes back MATCH (A:Person)-[:Owns]->(B:Dragon), (A)-[:Offspring]->(C:Person)-[:Owns]->(D:Dragon)-[:Freezes]->(B), (A)-[:Offspring]->(E:Person)-[:Owns]->(F:Dragon)-[:Freezes]->(B) WHERE C <> E AND D <> F RETURN DISTINCT A “A person who owns a dragon, and has two parents which each own a dragon that freezed that persons dragon”
  8. 8. Using custom traversal via APOC MATCH (A:Person {name: ‘Rogar Bolton’}), (B:Person {name: 'Robyn Arryn’) WITH A AS StartNode, B AS EndNode CALL neo4j.procedures.allSimplePaths(StartNode,EndNode,[‘Freezes’: 2],[‘Dragon’: 4],4) YIELD p as path RETURN path A real world example that I cant really explain
  9. 9. Real world 1 - Knowledge Graphs  Not much to add here  This is the bread and butter of Neo4j
  10. 10. Real world 2 - Scale-Free Graphs http://mathworld.wolfram.com/Scale-FreeNetwork.html Very Large Scale-Free graphs appear in Cyber Security, IOT, User-Based analytics and more
  11. 11. Scale Free Graphs  Have a lot of edges  We would like to ask aggregate queries on edges  Cypher custom traversal also comes in handy  Several validated scenarios Match p = (A:Person)-[*1..4]-(B:Person) WHERE count(p) > 5 RETURN A “Any person who is linked in up to 4 hops to another Person, with more that 5 distinct paths”
  12. 12. The challenge for scale free graphs  Well – Scale for one   Partitioning graphs is a hard problem, will mature eventually but no one is there yet  Neo4j are on the right track  Some good practices for now
  13. 13. Facing the scale challenge Graph Data Lake  Most use cases fit into 1TB Memory servers  This is commodity hardware these days and Neo4j uses it well  Neo4j overhead is low, graphs are compact  Build your own partitions if needed  For huge cases  Build a Lambda Architecture  Neo4J can be a great serving speed layer  Neo4J Transactivity helps here  Remove Super-nodes  You don’t usually care about them
  14. 14. Big Hardware is coming  3dx point memory changes the math of memory cost in the data center  Intel Optane  Micron QuantX  IBM Power8 with CAPI Flash already an interesting offering  This is coming to the data center by end 2017, and will be mainstream by end of 2018  Memory intensive graphs like Neo4J will benefit from this immensely https://arstechnica.com/information-technology/2017/03/intels-first-optane-ssd-375gb-that-you-can- also-use-as-ram/
  15. 15. Visualization  Vis.js  Keylines (probably too costly)  Export results as TDE to tableau BI
  16. 16. Final relationship joke.. (neo4j guys asked that I add this)
  17. 17. Questions Assi Barak Abarak.consulting@gmail.com