SlideShare a Scribd company logo
1 of 84
Lunch and Learn
         Neo4j
Andreas Kollegger
@akollegger
#neo4j
                    1
Lunch and Learn
         Neo4j
Andreas Kollegger
@akollegger
#neo4j
                    1
Lunch and Learn
         Neo4j
Andreas Kollegger
@akollegger
#neo4j
                    1
1
Graph DB 101


               2
3
You know relational




                      3
You know relational




                      3
You know relational




          foo

                      3
You know relational




          foo         bar

                            3
You know relational




          foo   foo_bar   bar

                                3
You know relational




          foo   foo_bar   bar

                                3
You know relational




          foo   foo_bar   bar

                                3
You know relational




          foo   foo_bar   bar

                                3
You know relational
now consider relationships...




                                3
You know relational
now consider relationships...




                                3
You know relational
now consider relationships...




                                3
You know relational
now consider relationships...




                                3
You know relational
now consider relationships...




                                3
You know relational
now consider relationships...




                                3
3
4
We're talking about a
Property Graph




                        4
We're talking about a
Property Graph


    Nodes




                        4
We're talking about a
Property Graph


    Nodes


     Relationships




                        4
We're talking about a
Property Graph
                                            Em                                       Joh
                                                 il                                      a   n
                                  knows                                     knows
                     Alli                                         Tob                                    Lar

    Nodes
                            son                                       ias           knows                   s
                                                          knows
                                          And                                       And                  knows
                     knows                      rea                                       rés
                                                      s
                                                          knows             knows                knows
                     Pet                                          Miic
                                                                  Mc                knows                 Ian
                        er                knows                        a
                                                                       a
                                  knows                   knows
                                           De                                       Mic
                                              lia                                      h   ael

     Relationships

            Properties (each a key+value)

       + Indexes (for easy look-ups)
                                                                                                                 4
4
5
Webadmin




           5
6
Cypher - a graph query language
๏ a pattern-matching query language
๏ declarative grammar with clauses (like SQL)
๏ aggregation, ordering, limits
๏ create, read, update, delete




                                                6
Cypher - a graph query language
๏ a pattern-matching query language
๏ declarative grammar with clauses (like SQL)
๏ aggregation, ordering, limits
๏ create, read, update, delete

   // get node with id 0
   start a=node(0) return a
   // traverse from node 1
   start a=node(1) match (a)-->(b) return b
   // return friends of friends
   start a=node(1) match (a)--()--(c) return c

                                                6
Neo4j - the Graph Database




                        7
With love, from Sweden
๏ 2001 - a Swedish media asset project
   •CTO Emil prototyped a proper graph interface
   •first SQL-backed, then revised down to bare metal
   •(just like Amazon->Dynamo, Facebook->Cassandra,
     Google-> Big Table, Sweden->Neo4j)
๏ 2003 Neo4j went into 24/7 production
๏ 2006-2007 - Neo4j was spun off as an open source project
๏ 2009 seed funding for the company
๏ 2010 Neo4j Server was created (previously only an embedded DB)
๏ 2011 Series-A Funding, Top-Tier customers
     (gratuitous name dropping)

                                                                   8
Neo4j is a Graph Database




                            9
Neo4j is a Graph Database
๏ A Graph Database:




                            9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both




                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data




                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:




                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions


                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties



                                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties

   • Server with REST API, or Embeddable on the JVM
                                                                  9
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties

   • Server with REST API, or Embeddable on the JVM
   • high-performance with High-Availability (read scaling)       9
the Real World


                 10
11
Real World Use Cases:




                        11
Real World Use Cases:
•   [A] Mmm Pancakes




                        11
Real World Use Cases:
•[A] Mmm Pancakes
• [B] ACL from Hell




                        11
Real World Use Cases:
•[A] Mmm Pancakes
• [B] ACL from Hell
• [C] Master of your Domain




                              11
[A] Mmm Pancakes
[A] Mmm Pancakes
[A] Mozilla Pancake




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
[A] Mozilla Pancake
        • Experimental cloud-based browser
        • Built to improve how users Discover,
                  Collect, Share & Organize things on
                  the web

        • Goal: help users better access &
                  curate information on the net, on
                  any device

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Why Neo4J?




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Why Neo4J?
        • The internet is a network of pages
                  connected to each other. What
                  better way to model that than in
                  graphs?

        • No time lost fighting with less
                  expressive datastores

        • Easy to implement experimental
                  features

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Cute meta + data




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Cute meta + data




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Neo4J Co-Existence
        • Node uuids as refs in external
                  ElasticSearch also in internal Lucene

        • Custom search ranking for user
                  history based on node relationship
                  data

        • MySQL for user data, Redis for
                  metrics

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Mozilla Pancake
            Available on BitBucket:
            https://bitbucket.org/
            mozillapancake/pancake


            Questions?
            Olivier Yiptong:
            oyiptong@mozilla.com

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
[B] ACL from Hell




One of the top 10 telcos worldwide
Background

Telenor calculated in 2010 that it´s self-service web solution for
companies, MinBedrift, would not scale with the projected
customer and subscription growth beyond 2012.




                                                  Limit
                                      th
                                G row
                          ted
                      jec
                   Pro




                 2010
                                           2015
[B] Telenor Background

Background

Telenor calculated in 2010 that it´s self-service web solution for
companies, MinBedrift, would not scale with the projected
customer and subscription growth beyond 2012.




                                                  Limit
                                      th
                                G row
                          ted
                      jec
                   Pro




                 2010
                                           2015
[B] Telenor Background
• MinBedrif, a self service web
  solution for companies
     Background

• 2010 - calculated that it would not
     Telenor calculated in 2010 that it´s self-service web solution for

  scale with projected growth
     companies, MinBedrift, would not scale with the projected
     customer and subscription growth beyond 2012.




                                                       Limit
                                           th
                                     G row
                               ted
                           jec
                        Pro




                      2010
                                                2015
Business Case

The business case is built on the negative consequence of NOT
addressing the problem.




                             Loss of customers (income)

                             Reduced sales transactions (income)

                             Increased manual support (expenses)

                             Other
21
Current ACL Service




                      21
Current ACL Service
๏ Stored procedure in DB calculating all access
   •cached results for up to 24 hours
   •minutes to calculate for large customers
   •extremely complex to understand (1500 lines)
   •depends on temporary tables
   •joins across multiple tables


                                                   21
Example Access Authorization
                                                                             User
Access may be given directly or by inheritance                               Customer
                                                                             Account
                                                U                            Subscription
                 U                                      Inherit = true
                          Inherit =
                                    false
                In


                                                C
                  he
                    rit
                     =




C                                                          C                                C
                      tru
                         e




        A                        A              A                    A           A


    S       S                S       S      S       S            S       S   S         S
23
ACL With Neo4j




                 23
ACL With Neo4j
๏ Faster than current solution
๏ Simpler to understand the logic
๏ Avoid large temporary tables
๏ Tailored for service (resource authorization)




                                                  23
[C] Master of your Domain
[C] MDM within Cisco
master data management, sales compensation management, online customer support


Description                                                          Benefits
Real-time conflict detection in sales compensation management.        Performance : “Minutes to Milliseconds”
Business-critical “P1” system. Neo4j allows Cisco to model complex   Outperforms Oracle RAC, serving complex queries in real time
algorithms, which still maintaining high performance over a large    Flexibility
dataset.                                                             Allows for Cisco to model interconnected data and complex queries with
                                                                     ease
Background
                                                                     Robustness
Neo4j replaces Oracle RAC, which was not performant enough for the
                                                                     With 9+ years of production experience, Neo4j brings a solid product.
use case.




Architecture
3-node Enterprise cluster with mirrored
disaster recovery cluster
Dedicated hardware in own datacenter
Embedded in custom webapp
Sizing
35 million nodes
50 million relationships
600 million properties
26
Really, once you start
              thinking in graphs
               it's hard to stop

          Recommendations       MDM
                        Business intelligence
       Geospatial
                   catalogs       Systems
   access control Social computingManagement
                                 your brain
          Biotechnology
                          routing         genealogy
linguistics
              Making Sense of all that
      compensation
              data          market vectors
                                              26
Really, once you start
              thinking in graphs
               it's hard to stop

       What will you MDM
        Recommendations build?
                        Business intelligence
       Geospatial
                   catalogs       Systems
   access control Social computingManagement
                                 your brain
          Biotechnology
                          routing         genealogy
linguistics
              Making Sense of all that
      compensation
              data          market vectors
                                              26
27
Neo4j




and, Thanks :)




                 27
Lunch and learn cypher

More Related Content

Similar to Lunch and learn cypher

Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012jexp
 
Dbrec - Music recommendations using DBpedia
Dbrec - Music recommendations using DBpediaDbrec - Music recommendations using DBpedia
Dbrec - Music recommendations using DBpediaAlexandre Passant
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBlehresman
 
Linked Data Publication of Live Music Archives
Linked Data Publication of Live Music ArchivesLinked Data Publication of Live Music Archives
Linked Data Publication of Live Music Archivesseanb
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashearsoscon2007
 
Graph Data Science with Neo4j: Nordics Webinar
Graph Data Science with Neo4j: Nordics WebinarGraph Data Science with Neo4j: Nordics Webinar
Graph Data Science with Neo4j: Nordics WebinarNeo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011jexp
 
What Drove Wordnik Non-Relational?
What Drove Wordnik Non-Relational?What Drove Wordnik Non-Relational?
What Drove Wordnik Non-Relational?DATAVERSITY
 
The making of planaby 2
The making of planaby 2The making of planaby 2
The making of planaby 2jtayler
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training IntroductionMax De Marzi
 
Clojure at BackType
Clojure at BackTypeClojure at BackType
Clojure at BackTypenathanmarz
 
Methodological Guidelines for Publishing Linked Data
Methodological Guidelines for Publishing Linked DataMethodological Guidelines for Publishing Linked Data
Methodological Guidelines for Publishing Linked DataBoris Villazón-Terrazas
 
Linked Data Book: Cambridge Semantic Web Meetup 20130108
Linked Data Book: Cambridge Semantic Web Meetup 20130108Linked Data Book: Cambridge Semantic Web Meetup 20130108
Linked Data Book: Cambridge Semantic Web Meetup 201301083 Round Stones
 
Dbta Webinar Realize Value of Big Data with graph 011713
Dbta Webinar Realize Value of Big Data with graph  011713Dbta Webinar Realize Value of Big Data with graph  011713
Dbta Webinar Realize Value of Big Data with graph 011713InfiniteGraph
 
NLP for Everyday People
NLP for Everyday PeopleNLP for Everyday People
NLP for Everyday PeopleRebecca Bilbro
 

Similar to Lunch and learn cypher (20)

Intro to Neo4j 2.0
Intro to Neo4j 2.0Intro to Neo4j 2.0
Intro to Neo4j 2.0
 
Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012Spring Data Neo4j Intro SpringOne 2012
Spring Data Neo4j Intro SpringOne 2012
 
Dbrec - Music recommendations using DBpedia
Dbrec - Music recommendations using DBpediaDbrec - Music recommendations using DBpedia
Dbrec - Music recommendations using DBpedia
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDB
 
Linked Data Publication of Live Music Archives
Linked Data Publication of Live Music ArchivesLinked Data Publication of Live Music Archives
Linked Data Publication of Live Music Archives
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashears
 
Cloud robotics
Cloud roboticsCloud robotics
Cloud robotics
 
Graph Data Science with Neo4j: Nordics Webinar
Graph Data Science with Neo4j: Nordics WebinarGraph Data Science with Neo4j: Nordics Webinar
Graph Data Science with Neo4j: Nordics Webinar
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011Spring Data Neo4j Intro SpringOne 2011
Spring Data Neo4j Intro SpringOne 2011
 
What Drove Wordnik Non-Relational?
What Drove Wordnik Non-Relational?What Drove Wordnik Non-Relational?
What Drove Wordnik Non-Relational?
 
The making of planaby 2
The making of planaby 2The making of planaby 2
The making of planaby 2
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training Introduction
 
Clojure at BackType
Clojure at BackTypeClojure at BackType
Clojure at BackType
 
Methodological Guidelines for Publishing Linked Data
Methodological Guidelines for Publishing Linked DataMethodological Guidelines for Publishing Linked Data
Methodological Guidelines for Publishing Linked Data
 
Linked Data Book: Cambridge Semantic Web Meetup 20130108
Linked Data Book: Cambridge Semantic Web Meetup 20130108Linked Data Book: Cambridge Semantic Web Meetup 20130108
Linked Data Book: Cambridge Semantic Web Meetup 20130108
 
Anti-social Databases
Anti-social DatabasesAnti-social Databases
Anti-social Databases
 
Why schema.org
Why schema.orgWhy schema.org
Why schema.org
 
Dbta Webinar Realize Value of Big Data with graph 011713
Dbta Webinar Realize Value of Big Data with graph  011713Dbta Webinar Realize Value of Big Data with graph  011713
Dbta Webinar Realize Value of Big Data with graph 011713
 
NLP for Everyday People
NLP for Everyday PeopleNLP for Everyday People
NLP for Everyday People
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Lunch and learn cypher

  • 1. Lunch and Learn Neo4j Andreas Kollegger @akollegger #neo4j 1
  • 2. Lunch and Learn Neo4j Andreas Kollegger @akollegger #neo4j 1
  • 3. Lunch and Learn Neo4j Andreas Kollegger @akollegger #neo4j 1
  • 4. 1
  • 6. 3
  • 10. You know relational foo bar 3
  • 11. You know relational foo foo_bar bar 3
  • 12. You know relational foo foo_bar bar 3
  • 13. You know relational foo foo_bar bar 3
  • 14. You know relational foo foo_bar bar 3
  • 15. You know relational now consider relationships... 3
  • 16. You know relational now consider relationships... 3
  • 17. You know relational now consider relationships... 3
  • 18. You know relational now consider relationships... 3
  • 19. You know relational now consider relationships... 3
  • 20. You know relational now consider relationships... 3
  • 21. 3
  • 22. 4
  • 23. We're talking about a Property Graph 4
  • 24. We're talking about a Property Graph Nodes 4
  • 25. We're talking about a Property Graph Nodes Relationships 4
  • 26. We're talking about a Property Graph Em Joh il a n knows knows Alli Tob Lar Nodes son ias knows s knows And And knows knows rea rés s knows knows knows Pet Miic Mc knows Ian er knows a a knows knows De Mic lia h ael Relationships Properties (each a key+value) + Indexes (for easy look-ups) 4
  • 27. 4
  • 28. 5
  • 29. Webadmin 5
  • 30. 6
  • 31. Cypher - a graph query language ๏ a pattern-matching query language ๏ declarative grammar with clauses (like SQL) ๏ aggregation, ordering, limits ๏ create, read, update, delete 6
  • 32. Cypher - a graph query language ๏ a pattern-matching query language ๏ declarative grammar with clauses (like SQL) ๏ aggregation, ordering, limits ๏ create, read, update, delete // get node with id 0 start a=node(0) return a // traverse from node 1 start a=node(1) match (a)-->(b) return b // return friends of friends start a=node(1) match (a)--()--(c) return c 6
  • 33. Neo4j - the Graph Database 7
  • 34. With love, from Sweden ๏ 2001 - a Swedish media asset project •CTO Emil prototyped a proper graph interface •first SQL-backed, then revised down to bare metal •(just like Amazon->Dynamo, Facebook->Cassandra, Google-> Big Table, Sweden->Neo4j) ๏ 2003 Neo4j went into 24/7 production ๏ 2006-2007 - Neo4j was spun off as an open source project ๏ 2009 seed funding for the company ๏ 2010 Neo4j Server was created (previously only an embedded DB) ๏ 2011 Series-A Funding, Top-Tier customers (gratuitous name dropping) 8
  • 35. Neo4j is a Graph Database 9
  • 36. Neo4j is a Graph Database ๏ A Graph Database: 9
  • 37. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both 9
  • 38. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data 9
  • 39. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: 9
  • 40. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions 9
  • 41. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties 9
  • 42. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties • Server with REST API, or Embeddable on the JVM 9
  • 43. Neo4j is a Graph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties • Server with REST API, or Embeddable on the JVM • high-performance with High-Availability (read scaling) 9
  • 45. 11
  • 46. Real World Use Cases: 11
  • 47. Real World Use Cases: • [A] Mmm Pancakes 11
  • 48. Real World Use Cases: •[A] Mmm Pancakes • [B] ACL from Hell 11
  • 49. Real World Use Cases: •[A] Mmm Pancakes • [B] ACL from Hell • [C] Master of your Domain 11
  • 50.
  • 53.
  • 54. [A] Mozilla Pancake This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 55. [A] Mozilla Pancake • Experimental cloud-based browser • Built to improve how users Discover, Collect, Share & Organize things on the web • Goal: help users better access & curate information on the net, on any device This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 56. This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 57. Why Neo4J? This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 58. Why Neo4J? • The internet is a network of pages connected to each other. What better way to model that than in graphs? • No time lost fighting with less expressive datastores • Easy to implement experimental features This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 59. Cute meta + data This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 60. Cute meta + data This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 61. Neo4J Co-Existence • Node uuids as refs in external ElasticSearch also in internal Lucene • Custom search ranking for user history based on node relationship data • MySQL for user data, Redis for metrics This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 62. Mozilla Pancake Available on BitBucket: https://bitbucket.org/ mozillapancake/pancake Questions? Olivier Yiptong: oyiptong@mozilla.com This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 63.
  • 64. [B] ACL from Hell One of the top 10 telcos worldwide
  • 65. Background Telenor calculated in 2010 that it´s self-service web solution for companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 66. [B] Telenor Background Background Telenor calculated in 2010 that it´s self-service web solution for companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 67. [B] Telenor Background • MinBedrif, a self service web solution for companies Background • 2010 - calculated that it would not Telenor calculated in 2010 that it´s self-service web solution for scale with projected growth companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 68. Business Case The business case is built on the negative consequence of NOT addressing the problem. Loss of customers (income) Reduced sales transactions (income) Increased manual support (expenses) Other
  • 69. 21
  • 71. Current ACL Service ๏ Stored procedure in DB calculating all access •cached results for up to 24 hours •minutes to calculate for large customers •extremely complex to understand (1500 lines) •depends on temporary tables •joins across multiple tables 21
  • 72. Example Access Authorization User Access may be given directly or by inheritance Customer Account U Subscription U Inherit = true Inherit = false In C he rit = C C C tru e A A A A A S S S S S S S S S S
  • 73. 23
  • 75. ACL With Neo4j ๏ Faster than current solution ๏ Simpler to understand the logic ๏ Avoid large temporary tables ๏ Tailored for service (resource authorization) 23
  • 76.
  • 77. [C] Master of your Domain
  • 78. [C] MDM within Cisco master data management, sales compensation management, online customer support Description Benefits Real-time conflict detection in sales compensation management. Performance : “Minutes to Milliseconds” Business-critical “P1” system. Neo4j allows Cisco to model complex Outperforms Oracle RAC, serving complex queries in real time algorithms, which still maintaining high performance over a large Flexibility dataset. Allows for Cisco to model interconnected data and complex queries with ease Background Robustness Neo4j replaces Oracle RAC, which was not performant enough for the With 9+ years of production experience, Neo4j brings a solid product. use case. Architecture 3-node Enterprise cluster with mirrored disaster recovery cluster Dedicated hardware in own datacenter Embedded in custom webapp Sizing 35 million nodes 50 million relationships 600 million properties
  • 79. 26
  • 80. Really, once you start thinking in graphs it's hard to stop Recommendations MDM Business intelligence Geospatial catalogs Systems access control Social computingManagement your brain Biotechnology routing genealogy linguistics Making Sense of all that compensation data market vectors 26
  • 81. Really, once you start thinking in graphs it's hard to stop What will you MDM Recommendations build? Business intelligence Geospatial catalogs Systems access control Social computingManagement your brain Biotechnology routing genealogy linguistics Making Sense of all that compensation data market vectors 26
  • 82. 27

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. Much richer data than flat history\nCan replay a user’s browsing session step-by-step\nExperimental features examples: recommendations, which pages to omit, etc.\n
  81. Much richer data than flat history\nCan replay a user’s browsing session step-by-step\nExperimental features examples: recommendations, which pages to omit, etc.\n
  82. Visualization done with GraphViz\nA user will have many such “stacks”\n
  83. Search ranking weighs inbound and outbound node connections as part of search score calculation\n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n