SlideShare a Scribd company logo
Neo4j
           And some graph problems



                             #neo4j
Peter Neubauer               @peterneubauer
COO, Neo Technology          peter@neotechnology.com
Any sufficiently advanced technology is
    indistinguishable from magic.
            Arthur C. Clarke




            @kymerawand
First, a recap: NOSQL data models
            Key-value stores
Data size




                          Column Family


                                          Document
                                          databases


                                                         Graph databases

                                                                           We are here




                                                      Data complexity
What makes a good DB?


       Separate Logic and Data
       Support Ad-Hoc queries
       Be persistent
       Scale good enough
The property graph model
 Core abstractions:
                                               name = “Emil”

   Nodes
                                               age = 29
                                               sex = “yes”


   Relationships between nodes
   Properties on both                      1                         2


 Traversal framework
                          type = KNOWS
   High performance       time = 4 years                       3
   queries on connected
   data sets                                                       type = car
                                                                   vendor = “SAAB”

 Other bindings                                                    model = “95 Aero”



   Langs, REST, Gremlin, RDF
Social data (customer: brand-name social network)
                                                                           name = “Marcy Runkle”

                              name = “Hank”
                              last_name = “Moody”
 name = “Mike”
                              age = 42                                                          42
 age = 29                                                                              S
                                                                                   W
                                                                                 NO
                                                 disclosure = public
                                                                                K
                  KNOWS                           KNOWS                           KNO
      1                                 7                              3             W     S

                  KN
                                                                                                   13

                                             S
                     OW                                  name = “Charlie”
                                        KNOW
                          S                              last_name = “Runkle”
                                                                                               name = “Dani”
                                                                                               last_name = “California”
          age = 3 days                                                                         age = 27
                                    2

                              name = “Karen”
Just a social graph?
Spatial data (customer: large telecom company)
                                                                         name = ...

                           name = “The Tavern”
                           lat = 1295238237
 name = “Omni Hotel”
                           long = 234823492                                                42
 lat = 3492848
 long = 283823423                              length = 7 miles                     AD
                                                                               RO
                   ROAD                         ROAD                             ROO
      1                                 7                            3              OAD


                   RO
                                                                                             13
                      AD                               name = ...
                                        ROAD
                                                       lat, long = ...
                                                                                          name = “Swedland”
                                                                                          lat = 23410349
       length = 3 miles                                                                   long = 2342348852
                                  2

                           name = ...
Social? Spatial? … Social AND spatial!
Social AND spatial data (customer: LBS)
                                                                    name = “Peter”

                          name = “The Tavern”
                          lat = 1295238237
name = “Omni Hotel”
                          long = 234823492                                                 42
lat = 3492848                                                                     S
                                                                              W
                                                                            NO
long = 283823423                              weight = 10
                                                                           K
                  ROAD                           LIKES                      SIBL
     1                                 7                        3                IN   G

                  RO
                                                                                              13
                     AD                               name = “Emil”
                                       ROAD
                                                      beer_qual = expert
                                                                                          name = “Maria”
                                                                                          age = 30
      length = 3 miles                                                                    beer_qual = non-existant
                                 2

                          name = ...
Financial data (customer: international bank)
                                                                                 name = ...

                                 name = “The Tavern”
                                 lat = 1295238237
                                 long = 234823492                                                        42
 name = “Mr Godfather”                                                                             AW
 karma = veeeery-low
                                                                                             HDR
 cash = more-than-you                                      amount = $1000
                                                                                           IT
                                                                                       W
                   OWNS                                    TRANSFER                        WIT
      1                                       7                              3                 HDR
                                                                                                   AW

                                                                                                            13

                                                  S FE R
                   DE                                             name = “Emil”
                      P   OS                                      cash = always-too-li'l
                            IT                TRAN
                                                                                                        title = “ATM @ Wall St”
                                                                                                        id = 230918484233
        amount = $1000                                                                                  cash_left = 384204
                                        2

                                 name = ...
Use Cases
 REST in Neo4j
 The graph as an OODB – Roo, Grails
 Jruby, Jo4neo
 Deep graph algos – Routing with A*
 Multiple indexes in the graph – GIS
 Recommendation systems – Gremlin
 and LinkedData
REST in Neo4j
  Build on self describing JSON
  Indexing
  Querying
  Bindings to PHP, C#, JS
  OpenGraph API
  Jruby, Scala
The Graph for objects
 Keep data clean!
 Annotation based
    Grails
    Jo4neo
    Roo
    JPA
 Mixin based
   Django
   JRuby
 C# (REST)
 PHP (REST)
The Graph as an OODB
Routing with Neo4j and A*
Routing with Neo4j and A*
Multiple indexes - GIS
 QuadTree (2D)
 Hierarchy
 Time (1D)
 On-demand index
Multiple indexes - GIS
Multiple indexes - GIS
Recommendation - Gremlin
 gremlin.tinkerpop.com
 XPath based “Perl for Graphs”
 Property Graph Model
    Neo4j, RDF-SAIL, Tinkergraph, MongoDB, FS
 LinkedData SAIL
Recommendation - Gremlin
Recommendation - Gremlin
Other use cases
 Activity streams
 Process automation
   Life-filtering of event streams
   Web-of-Things data f ows
                          l
 Object oriented reporting
   Jasper Reports
   ReportAnywhere
   Scripting
Why graph databases?
                                                       “For anything with multiple
                                                       relationships, multiple
                                                       connections N e o4 j
                                                       ab s ol u t e l y R OCK S!”

                                                               http://bit.ly/dys4nx


   A web where the default is social →
   an explosion of graph-y data


   “Just 3 years ago, the data sets our product
   handled were very simple. But the past 9-12
   months have seen an e x p l os i on of the number
   of relationships between things.”

                                           Manager
                                           of an
                                           enterprise
                                           product
                                           for the
                                           Fortune
                                           5000                      Werner Vogels
                                                                     CTO, Amazon
How ego are you? (aka other impls?)
  Franz’ Al l e g roGrap h      (http://agraph.franz.com)

     Proprietary, Lisp, RDF-oriented but real graphdb
  Sones g rap h DB      (http://sones.com)

     Proprietary, .NET, in beta
  Twitter's Fl oc k DB    (http://github.com/twitter/flockdb)

     Twitter's (graph) database for large and shallow graphs
  Google P re g e l   (http://bit.ly/dP9IP)

     We are oh-so-secret
  Objectivity's I n fi n i te Gra p h    (http://infinitegraph.com)

     New, closed OODB with Graph Layer on top
Why Neo4j?
 Most widely deployed graph db in the world
   Robust: 24/7 production since 2003
   Mature: lots of production deployments
   Community: ecosystem of tools, bindings, frameworks

 Available NOW under AGPLv3 / commercial license
   AGPLv3: “if you’re open source, we’re open source”
   If you have proprietary software? Must buy a commercial
   license
   But the f rst one is free! For ALL use-cases.
           i
 Download
   http://neo4j.org
 Feedback
   http://lists.neo4j.org
Th e N e o4 j te a m
    i s h i ri n g !
Do you see the Matrix?
     Apply now.
Questions?




             Image credit: lost again! Sorry :(
http://neotechnology.com

More Related Content

PDF
From Data Warehouse to Lakehouse
PDF
Hyperspace for Delta Lake
PDF
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
PDF
Apache Spark in Depth: Core Concepts, Architecture & Internals
PDF
Large Scale Lakehouse Implementation Using Structured Streaming
PPTX
NoSQL Graph Databases - Why, When and Where
PPTX
Processing Large Data with Apache Spark -- HasGeek
PDF
Introduction to Spark Streaming
From Data Warehouse to Lakehouse
Hyperspace for Delta Lake
The Modern Data Team for the Modern Data Stack: dbt and the Role of the Analy...
Apache Spark in Depth: Core Concepts, Architecture & Internals
Large Scale Lakehouse Implementation Using Structured Streaming
NoSQL Graph Databases - Why, When and Where
Processing Large Data with Apache Spark -- HasGeek
Introduction to Spark Streaming

What's hot (20)

PDF
Predicting Flights with Azure Databricks
PDF
Spark SQL
PDF
Spark with Delta Lake
PPTX
Machine Learning Models in Production
PPTX
Survey of High Performance NoSQL Systems
PPTX
Getting started with postgresql
PDF
Data Mesh in Practice - How Europe's Leading Online Platform for Fashion Goes...
PDF
Spark streaming: Best Practices
PPTX
Introduction to snowflake
PPTX
Programming in Spark using PySpark
PDF
Intro to Graphs and Neo4j
PPT
Graph database
PDF
Building Robust ETL Pipelines with Apache Spark
PDF
Introduction to Redis
PDF
GraphRAG is All You need? LLM & Knowledge Graph
PDF
Neo4j GraphDay Seattle- Sept19- neo4j basic training
PDF
Snowflake Data Science and AI/ML at Scale
PDF
Spark and S3 with Ryan Blue
PDF
Neo4j in Depth
PDF
Vue d'ensemble Dremio
Predicting Flights with Azure Databricks
Spark SQL
Spark with Delta Lake
Machine Learning Models in Production
Survey of High Performance NoSQL Systems
Getting started with postgresql
Data Mesh in Practice - How Europe's Leading Online Platform for Fashion Goes...
Spark streaming: Best Practices
Introduction to snowflake
Programming in Spark using PySpark
Intro to Graphs and Neo4j
Graph database
Building Robust ETL Pipelines with Apache Spark
Introduction to Redis
GraphRAG is All You need? LLM & Knowledge Graph
Neo4j GraphDay Seattle- Sept19- neo4j basic training
Snowflake Data Science and AI/ML at Scale
Spark and S3 with Ryan Blue
Neo4j in Depth
Vue d'ensemble Dremio
Ad

Similar to Neo4j - 5 cool graph examples (8)

PDF
2010 09-neo4j-deutsche-telekom
PDF
An intro to Neo4j and some use cases (JFokus 2011)
PDF
Neo4j Nosqllive
PDF
Basic Neo4j Code Examples 2008 05 08
PDF
Neo4j -- or why graph dbs kick ass
PDF
GDM 2011 - Neo4j and real world apps.
PDF
Neo4j - The Benefits of Graph Databases (OSCON 2009)
2010 09-neo4j-deutsche-telekom
An intro to Neo4j and some use cases (JFokus 2011)
Neo4j Nosqllive
Basic Neo4j Code Examples 2008 05 08
Neo4j -- or why graph dbs kick ass
GDM 2011 - Neo4j and real world apps.
Neo4j - The Benefits of Graph Databases (OSCON 2009)
Ad

More from Peter Neubauer (12)

PDF
Intro to Neo4j 2.0
PDF
2012 09 GDG San Francisco Hackday at Parisoma
KEY
2012 09 SF Data Mining zero to hero
PDF
Test driven documentation
PDF
Neo4j at @PolyglotVancouver
PDF
From Zero to Hero - Neo4j and Cypher.
PDF
Tips for building communitites with limited resources
PDF
Intro to Neo4j or why insurances should love graphs
KEY
2011 11-öredev
PDF
Neo4j Spatial - GIS for the rest of us.
KEY
Geekout Tallinn - Neo4j for the rescue!
PDF
Neo4j spatial-nosql-frankfurt
Intro to Neo4j 2.0
2012 09 GDG San Francisco Hackday at Parisoma
2012 09 SF Data Mining zero to hero
Test driven documentation
Neo4j at @PolyglotVancouver
From Zero to Hero - Neo4j and Cypher.
Tips for building communitites with limited resources
Intro to Neo4j or why insurances should love graphs
2011 11-öredev
Neo4j Spatial - GIS for the rest of us.
Geekout Tallinn - Neo4j for the rescue!
Neo4j spatial-nosql-frankfurt

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology

Neo4j - 5 cool graph examples

  • 1. Neo4j And some graph problems #neo4j Peter Neubauer @peterneubauer COO, Neo Technology peter@neotechnology.com
  • 2. Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke @kymerawand
  • 3. First, a recap: NOSQL data models Key-value stores Data size Column Family Document databases Graph databases We are here Data complexity
  • 4. What makes a good DB? Separate Logic and Data Support Ad-Hoc queries Be persistent Scale good enough
  • 5. The property graph model Core abstractions: name = “Emil” Nodes age = 29 sex = “yes” Relationships between nodes Properties on both 1 2 Traversal framework type = KNOWS High performance time = 4 years 3 queries on connected data sets type = car vendor = “SAAB” Other bindings model = “95 Aero” Langs, REST, Gremlin, RDF
  • 6. Social data (customer: brand-name social network) name = “Marcy Runkle” name = “Hank” last_name = “Moody” name = “Mike” age = 42 42 age = 29 S W NO disclosure = public K KNOWS KNOWS KNO 1 7 3 W S KN 13 S OW name = “Charlie” KNOW S last_name = “Runkle” name = “Dani” last_name = “California” age = 3 days age = 27 2 name = “Karen”
  • 7. Just a social graph?
  • 8. Spatial data (customer: large telecom company) name = ... name = “The Tavern” lat = 1295238237 name = “Omni Hotel” long = 234823492 42 lat = 3492848 long = 283823423 length = 7 miles AD RO ROAD ROAD ROO 1 7 3 OAD RO 13 AD name = ... ROAD lat, long = ... name = “Swedland” lat = 23410349 length = 3 miles long = 2342348852 2 name = ...
  • 9. Social? Spatial? … Social AND spatial!
  • 10. Social AND spatial data (customer: LBS) name = “Peter” name = “The Tavern” lat = 1295238237 name = “Omni Hotel” long = 234823492 42 lat = 3492848 S W NO long = 283823423 weight = 10 K ROAD LIKES SIBL 1 7 3 IN G RO 13 AD name = “Emil” ROAD beer_qual = expert name = “Maria” age = 30 length = 3 miles beer_qual = non-existant 2 name = ...
  • 11. Financial data (customer: international bank) name = ... name = “The Tavern” lat = 1295238237 long = 234823492 42 name = “Mr Godfather” AW karma = veeeery-low HDR cash = more-than-you amount = $1000 IT W OWNS TRANSFER WIT 1 7 3 HDR AW 13 S FE R DE name = “Emil” P OS cash = always-too-li'l IT TRAN title = “ATM @ Wall St” id = 230918484233 amount = $1000 cash_left = 384204 2 name = ...
  • 12. Use Cases REST in Neo4j The graph as an OODB – Roo, Grails Jruby, Jo4neo Deep graph algos – Routing with A* Multiple indexes in the graph – GIS Recommendation systems – Gremlin and LinkedData
  • 13. REST in Neo4j Build on self describing JSON Indexing Querying Bindings to PHP, C#, JS OpenGraph API Jruby, Scala
  • 14. The Graph for objects Keep data clean! Annotation based Grails Jo4neo Roo JPA Mixin based Django JRuby C# (REST) PHP (REST)
  • 15. The Graph as an OODB
  • 18. Multiple indexes - GIS QuadTree (2D) Hierarchy Time (1D) On-demand index
  • 21. Recommendation - Gremlin gremlin.tinkerpop.com XPath based “Perl for Graphs” Property Graph Model Neo4j, RDF-SAIL, Tinkergraph, MongoDB, FS LinkedData SAIL
  • 24. Other use cases Activity streams Process automation Life-filtering of event streams Web-of-Things data f ows l Object oriented reporting Jasper Reports ReportAnywhere Scripting
  • 25. Why graph databases? “For anything with multiple relationships, multiple connections N e o4 j ab s ol u t e l y R OCK S!” http://bit.ly/dys4nx A web where the default is social → an explosion of graph-y data “Just 3 years ago, the data sets our product handled were very simple. But the past 9-12 months have seen an e x p l os i on of the number of relationships between things.” Manager of an enterprise product for the Fortune 5000 Werner Vogels CTO, Amazon
  • 26. How ego are you? (aka other impls?) Franz’ Al l e g roGrap h (http://agraph.franz.com) Proprietary, Lisp, RDF-oriented but real graphdb Sones g rap h DB (http://sones.com) Proprietary, .NET, in beta Twitter's Fl oc k DB (http://github.com/twitter/flockdb) Twitter's (graph) database for large and shallow graphs Google P re g e l (http://bit.ly/dP9IP) We are oh-so-secret Objectivity's I n fi n i te Gra p h (http://infinitegraph.com) New, closed OODB with Graph Layer on top
  • 27. Why Neo4j? Most widely deployed graph db in the world Robust: 24/7 production since 2003 Mature: lots of production deployments Community: ecosystem of tools, bindings, frameworks Available NOW under AGPLv3 / commercial license AGPLv3: “if you’re open source, we’re open source” If you have proprietary software? Must buy a commercial license But the f rst one is free! For ALL use-cases. i Download http://neo4j.org Feedback http://lists.neo4j.org
  • 28. Th e N e o4 j te a m i s h i ri n g ! Do you see the Matrix? Apply now.
  • 29. Questions? Image credit: lost again! Sorry :(