SlideShare a Scribd company logo
1 of 183
Download to read offline
Realtime
                       Recommendations
                            with a
                        Graph Database
       Andreas Kollegger
       #neo4j @akollegger
Wednesday, August 24, 11
What’s the plan?

                           ๏Graph Database 101
                           ๏Case Study: Viadeo
                           ๏Finding new Friends
                           ๏Recommending new Sites


                                                                                                     2
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
3
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Obey!




                                                                                                     3
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Obey!

                           ๏tweet using #neo4j




                                                                                                      3
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Obey!

                           ๏tweet using #neo4j
                           ๏I am @akollegger




                                                                                                      3
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
NOSQL Categories
               Size




                                       Data Complexity


                                                         4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store
               Size




                                                   Data Complexity


                                                                     4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store
               Size




                                          BigTable
                                           Clones




                                                     Data Complexity


                                                                       4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store
               Size




                                          BigTable
                                           Clones
                                                     Document
                                                     Databases




                                                            Data Complexity


                                                                              4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store
               Size




                                          BigTable
                                           Clones
                                                     Document
                                                     Databases
                                                                     Graph
                                                                   Databases




                                                            Data Complexity


                                                                               4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store
               Size




                                          BigTable
                                           Clones
                                                     Document
                                                     Databases
                                                                     Graph
                                                                   Databases




                                                            Data Complexity


                                                                               4

Wednesday, August 24, 11
NOSQL Categories

                           Key-Value
                             Store                                             (this is still billions
               Size




                                          BigTable                                  of nodes &
                                           Clones                                 relationships)
                                                     Document
                                                     Databases
                                                                     Graph
               90%
                                                                   Databases
                of
               use
              cases




                                                            Data Complexity


                                                                                          4

Wednesday, August 24, 11
Graph DB 101
                                (Reading a graph)


                                                                                                     5
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?




                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork




                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork
        ๏ yes: for storing data that is structured as a graph




                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork
        ๏ yes: for storing data that is structured as a graph
                • remember linked-list, tree?




                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork
        ๏ yes: for storing data that is structured as a graph
                • remember linked-list, tree?
                • graphs are the generalized connected data structure



                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork
        ๏ yes: for storing data that is structured as a graph
                • remember linked-list, tree?
                • graphs are the generalized connected data structure
        ๏ whiteboard friendly - no data mangling required




                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A graph database?
        ๏ no: not for storing charts & graphs, or vector artwork
        ๏ yes: for storing data that is structured as a graph
                • remember linked-list, tree?
                • graphs are the generalized connected data structure
        ๏ whiteboard friendly - no data mangling required
        ๏ “A traditional relational database may tell you the average
                   salary of everyone in this conference,
             but a graph database will tell you who is most likely to buy
               you a beer.”

                                                                                                     6
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Q: What are graphs good for?




                                                                                                     7
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Q: What are graphs good for?
       A: highly-connected data
        ๏ Recommendations                                     ๏ Time series data
        ๏ Business intelligence                               ๏ Product catalogue
        ๏ Social computing                                    ๏ Web analytics
        ๏ Geospatial                                          ๏ Scientific computing (especially
                                                                      bioinformatics)
        ๏ MDM
        ๏ Systems management                                  ๏ Indexing your slow RDBMS
        ๏ Genealogy
                                                              ๏ And much more!
                                                                                                     7
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
G=(V,E)
        ๏ A (Graph) -records data in- (Nodes)                                                             Graph




        ๏ A (Graph) -records data in- (Relationships)
                                                                                        records data in           records data in

                                                                                                    organized by



        ๏ (Nodes) are -organized by- (Relationships)
                                                                                        Nodes                         Relationships


                                                                                          have                             have


        ๏ (Nodes & Relationships) -have- (Properties)                                                 Properties




        ๏ Instead of a Data Model, you have a Data Graph
        ๏ Structure is defined by the Relationships you create

                                                                                                                       8
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query a graph with a traversal
        ๏ A (Traversal) -navigates- a (Graph)
                                                                        Traversal



                                                                         identifies    navigates

        ๏ A (Traversal) -identifies- (Paths)                               Paths
                                                                                                               Graph




        ๏ (Paths) -order- (Nodes)                                                                 records data in      records data in

                                                                              order
                                                                                                            organized by

                                                                                           Nodes                                Relationships



        ๏ Traversals reveal localized data
        ๏ Find data that is relevant to other data



                                                                                                                            9
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Indexes look-up Nodes or Relationships
        ๏ An (Index) -maps to either-                                                 Index           special            Traversal




             (Nodes or Relationships)                                             maps to either     maps to either




        ๏ An (Index) is a -special- (Traversal)
                                                                                                   organized by

                                                                                     Nodes                             Relationships
                                                                      maps from


                                                                                          have                        have



        ๏ Indexes find starting points for a traversal
                                                                                                   Properties




        ๏ Can be queried with simple constraints



                                                                                                                       10
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Neo4j is a Graph Database
        ๏ A (Graph Database) -manages-                                                         Graph
                                                                                              Database


             a (Graph) and related (Indexes)                                        manages              manages




        ๏ A Graph Database:
                                                                                               lookup
                                                                                Graph                       Indexes




                • Full ACID Transactions
                • High-Availability (read scaling)
                • 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties
                • Server with REST API
                • Or, Embeddable as a Java Library
                                                                                                            11
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Neo4j Features
        ๏ Neo4j is stable
                • In 24/7 operation since 2003
        ๏ Neo4j is under active development
                • open source, with a vibrant community
        ๏ High performance graph operations
                • high performance? like what? ...

                                                                                                     12
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Example: Social Network “path exists”
        ๏ ~1,000 persons
                                                                                              Madeline




        ๏ average 50 friends per person
                                                                                Andreas            Emil              Joanne




        ๏ pathExists(a,b) limited to depth 4                                    Gabriella     Marcus              Peter




        ๏ caches warmed up to eliminate disk I/O                                                          Jacob




                                                          # persons                         query time

                           Relational database 1,000                               2000ms

                                        Neo4j 1,000                                2ms

                                        Neo4j 1,000,000                            2ms

                                                                                                                   13
                               Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Example: Social Network “path exists”
        ๏ ~1,000 persons
                                                                                              Madeline




        ๏ average 50 friends per person
                                                                                Andreas            Emil              Joanne




        ๏ pathExists(a,b) limited to depth 4                                    Gabriella     Marcus              Peter




        ๏ caches warmed up to eliminate disk I/O                                                          Jacob




                                                          # persons                         query time

                           Relational database 1,000                               2000ms

                                        Neo4j 1,000                                2ms

                                        Neo4j 1,000,000                            2ms

                                                                                                                   13
                               Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Example: Social Network “path exists”
        ๏ ~1,000 persons
                                                                                              Madeline




        ๏ average 50 friends per person
                                                                                Andreas            Emil              Joanne




        ๏ pathExists(a,b) limited to depth 4                                    Gabriella     Marcus              Peter




        ๏ caches warmed up to eliminate disk I/O                                                          Jacob




                                                          # persons                         query time

                           Relational database 1,000                               2000ms

                                        Neo4j 1,000                                2ms

                                        Neo4j 1,000,000                            2ms

                                                                                                                   13
                               Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Example: Social Network “path exists”
        ๏ ~1,000 persons
                                                                                              Madeline




        ๏ average 50 friends per person
                                                                                Andreas            Emil              Joanne




        ๏ pathExists(a,b) limited to depth 4                                    Gabriella     Marcus              Peter




        ๏ caches warmed up to eliminate disk I/O                                                          Jacob




                                                          # persons                         query time

                           Relational database 1,000                               2000ms

                                        Neo4j 1,000                                2ms

                                        Neo4j 1,000,000                            2ms

                                                                                                                   13
                               Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo




                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network




                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech




                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job




                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days



                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days
        ๏ now using Neo4j




                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days
        ๏ now using Neo4j
                • recommendations run in real-time


                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days
        ๏ now using Neo4j
                • recommendations run in real-time
                • what does a recommendation look like?

                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days
        ๏ now using Neo4j
                • recommendations run in real-time
                • what does a recommendation look like?

                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Viadeo
        ๏ Viadeo - 35 million user professional network
        ๏ the past tech
                • recommendations running on MySQL as a batch job
                • took an hour, then success happened.. and it took two days
        ๏ now using Neo4j
                • recommendations run in real-time
                • what does a recommendation look like?
        ๏ Check out: http://www.youtube.com/watch?v=sLlbtoCfciE
                                                                                                     14
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
A closer look at
                           recommendations

                                                                                                      15
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...




                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting




                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting
                           •   an algorithmic approach




                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting
                           •   an algorithmic approach
                     ๏Cypher - declarative querying



                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting
                           •   an algorithmic approach
                     ๏Cypher - declarative querying
                           •   a “pattern matching” approach



                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting
                           •   an algorithmic approach
                     ๏Cypher - declarative querying
                           •   a “pattern matching” approach
                     ๏Stig - functional graph query
                                                                                                     16
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Recommendations 2 ways...
                     ๏Gremlin - graph scripting
                           •   an algorithmic approach
                     ๏Cypher - declarative querying
                           •   a “pattern matching” approach
                     ๏Stig - functional graph query
                           •   ok, not yet...
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
                                                                                                     16

Wednesday, August 24, 11
Gremlin




                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL




                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack




                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:




                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself



                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself
                • g.v(0) - node 0



                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself
                • g.v(0) - node 0
                • g.v(0).in - nodes connected to Node 0


                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself
                • g.v(0) - node 0
                • g.v(0).in - nodes connected to Node 0
                • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS”

                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself
                • g.v(0) - node 0
                • g.v(0).in - nodes connected to Node 0
                • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS”
        ๏ details about Gremlin: https://github.com/tinkerpop/gremlin

                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Gremlin
        ๏ a graph scripting DSL
        ๏ part of the TinkerPop stack
        ๏ try it out:
                • g - the graph itself
                • g.v(0) - node 0
                • g.v(0).in - nodes connected to Node 0
                • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS”
        ๏ details about Gremlin: https://github.com/tinkerpop/gremlin
        ๏ props to @twarko for creating it
                                                                                                     17
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher




                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)




                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house




                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:




                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:
                • start a=(0) return a - get node 0



                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:
                • start a=(0) return a - get node 0
                • start a=(1) match (a)-->(b) return b - traverse from node 1



                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:
                • start a=(0) return a - get node 0
                • start a=(1) match (a)-->(b) return b - traverse from node 1
                • start a=(1) match (a)--()--(c) return c - friends of friends


                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:
                • start a=(0) return a - get node 0
                • start a=(1) match (a)-->(b) return b - traverse from node 1
                • start a=(1) match (a)--()--(c) return c - friends of friends
        ๏ details about Cypher:


                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Cypher
        ๏ a pattern-matching query language (SQL-ish)
        ๏ developed in-house
        ๏ try it out:
                • start a=(0) return a - get node 0
                • start a=(1) match (a)-->(b) return b - traverse from node 1
                • start a=(1) match (a)--()--(c) return c - friends of friends
        ๏ details about Cypher:
                • http://docs.neo4j.org/chunked/stable/cypher-query-lang.html
                                                                                                     18
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
The Social Graph
                           as a Data Graph

                                                                                                     19
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
The Usual Social Graph, is also data

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           20
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
The Usual Social Graph, is also data

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
               me                                      knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           20
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
with the Usual “status tweets”

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           21
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
with the Usual “status tweets”

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           21
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Suspects

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           22
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Suspects

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           22
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Business

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           23
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Business

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           23
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Likes

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           24
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
and the Usual Likes

                                                                              status                         body: presenting at NoSQL
                                   name:Andreas
                                                                                                                Now! like right now!

                                                                                                                       status
                                                       knows                    name: Marko

                                                       knows                                                body: mocking up a simplified
                                                                                                                    social graph
                                           worked_at                             name: Peter




                                   likes
                                                               employer:Neo Technology                           employer:Xilinx
                           likes
                                                                                       worked_at



                                                         url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/




                                                                url: http://www.imdb.com/title/tt1475582/




                                                                                                                                           24
                            Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Making Friends


                                                                                                     25
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
My Expanded Ego Network
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              26
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Me & My Friends
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              27
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Me & My Friends
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              27
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friends of my Friends
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              28
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friends of my Friends
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              28
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friends of my Friends
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              28
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friend of a Friend of a Friend?
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              29
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friend of a Friend of a Friend?
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              29
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Friend of a Friend of a Friend?
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                        Whatever.
                                                                                                              29
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends
       start andreas=(1) match (andreas)-[:KNOWS]->(friends)




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends
       start andreas=(1) match (andreas)-[:KNOWS]->(friends)
                 -[:KNOWS]->(foafs) return foafs




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends
       start andreas=(1) match (andreas)-[:KNOWS]->(friends)
                 -[:KNOWS]->(foafs) return foafs




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends
       start andreas=(1) match (andreas)-[:KNOWS]->(friends)
                 -[:KNOWS]->(foafs) return foafs

       // result: Emil, Stephen, Allison (& Peter?)




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Friends of Friends
       // Gremlin - andreas to friends to their friends, counted
       andreas.out('KNOWS').out('KNOWS').name.groupCount(m)

       // Cypher - match from andreas to friends to their friends
       start andreas=(1) match (andreas)-[:KNOWS]->(friends)
                 -[:KNOWS]->(foafs) return foafs

       // result: Emil, Stephen, Allison (& Peter?)




                                               Is that good enough?




                                                                                                     30
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Ranking my Friends’ Friends (intuitively)
                            name:Andreas

                                                                                      knows
                                            knows               name: Marko

                                                knows                                     name: Stephen
                               knows                            knows


                                                                                                knows
                                                                name: Peter


                                  name: Delia                                             name: Tiberius
                                                                     knows


                                                                                                   knows
                                                knows           name: Emil


                                                                              knows           name: Allison


                                                        knows




                                                                                                              31
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Ranking my Friends’ Friends (intuitively)
                            name:Andreas

                                                                                          knows
                                            knows                   name: Marko

                                                knows                                         name: Stephen
                               knows                                knows


                                                                                                    knows
                                                                    name: Peter


                                  name: Delia                                                 name: Tiberius
                                                                         knows
                                                        1
                                                                                                       knows
                                                knows               name: Emil


                                                                                  knows           name: Allison


                                                            knows




                                                                                                                  31
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Ranking my Friends’ Friends (intuitively)
                            name:Andreas

                                                                                              knows
                                            knows                   name: Marko

                                                knows                                             name: Stephen
                               knows                                knows


                                                                                                        knows
                                                                    name: Peter


                                  name: Delia                                                     name: Tiberius
                                                                         knows
                                                        1
                                                                                                           knows
                                                knows               name: Emil
                                                                                          2

                                                                                  knows               name: Allison


                                                            knows




                                                                                                                      31
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Ranking my Friends’ Friends (intuitively)
                                                                                          3
                            name:Andreas

                                                                                                  knows
                                            knows                   name: Marko

                                                knows                                                 name: Stephen
                               knows                                knows


                                                                                                            knows
                                                                    name: Peter


                                  name: Delia                                                         name: Tiberius
                                                                         knows
                                                        1
                                                                                                               knows
                                                knows               name: Emil
                                                                                              2

                                                                                  knows                   name: Allison


                                                            knows




                                                                                                                          31
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Ranking my Friends’ Friends (intuitively)
                                                                                          3
                            name:Andreas

                                                                                                      knows
                                            knows                   name: Marko

                                                knows                                                     name: Stephen
                               knows                                knows


                                                                                                                knows
                                                                    name: Peter
                                                                                              ?
                                  name: Delia                                                             name: Tiberius
                                                                         knows
                                                        1
                                                                                                                   knows
                                                knows               name: Emil
                                                                                                  2

                                                                                  knows                       name: Allison


                                                            knows




                                                                                                                              31
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}

       ==>Emil=2.0




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}

       ==>Emil=2.0
       ==>Allison=2.0




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}

       ==>Emil=2.0
       ==>Allison=2.0
       ==>Stephen=1.0




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Ranked extended FoaF
       // Gremlin - a bit more complex
       //   - requiring “memory” and weights
       //   - weights decrease with each “hop” outward
       //   - extended hop, to include Stephen
       andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name
          .groupCount(m){it}{it+1.0}.back(2)
              .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5}

       ==>Emil=2.0
       ==>Allison=2.0
       ==>Stephen=1.0
       ==>Tiberius=0.5




                                                                                                     32
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Like, like this


                                                                                                     33
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
What else might I like?

                                                                                                                     url: http://theoatmeal.com/comics/
                                  name:Andreas
                                                                                                                             state_web_summer/
                                                                                                      likes:+1
                                                   knows                   name: Marko
                                                                                                      likes:+2    url: http://www.imdb.com/title/tt0133093/


                                                 knows

                                                                                                likes:+1

                                                             name: Peter                   likes:+1                  url: http://browsertoolkit.com/fault-
                                                                                                                                  tolerance.png
                                  likes:+1
                                                                                           likes:+2
                                                                                                                  url: http://www.imdb.com/title/tt0436992/
                       likes:+1
                                                                                         likes:+3
                                                                                                                 url: http://lensbaby.com/optics-pinhole.php




                                                    url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/



                                             url: http://www.imdb.com/title/tt1475582/




                                                                                                                                                               34
                                   Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
What else might I like?

                                                                                                                     url: http://theoatmeal.com/comics/
                                  name:Andreas
                                                                                                                             state_web_summer/
                                                                                                      likes:+1
                                                   knows                   name: Marko
                                                                                                      likes:+2    url: http://www.imdb.com/title/tt0133093/


                                                 knows

                                                                                                likes:+1

                                                             name: Peter                   likes:+1                  url: http://browsertoolkit.com/fault-
                                                                                                                                  tolerance.png
                                  likes:+1
                                                                                           likes:+2
                                                                                                                  url: http://www.imdb.com/title/tt0436992/
                       likes:+1
                                                                                         likes:+3
                                                                                                                 url: http://lensbaby.com/optics-pinhole.php




                                                    url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/



                                             url: http://www.imdb.com/title/tt1475582/




                                                                                                                                                               34
                                   Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)
          -[:LIKES]->(website) return website.url




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)
          -[:LIKES]->(website) return website.url




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)
          -[:LIKES]->(website) return website.url

       +------------------------------------------------+




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)
          -[:LIKES]->(website) return website.url

       +------------------------------------------------+
       | website.url                                    |




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Query for Things to Like
       // Cypher - websites my friends like
       start andreas=(1) match (andreas)-[:KNOWS]->(friend)
          -[:LIKES]->(website) return website.url

       +------------------------------------------------+
       | website.url                                    |
       +------------------------------------------------+




                                                                                                     35
                           Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j
Wednesday, August 24, 11
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database
Case Study: Real-time Recommendations with a Graph Database

More Related Content

Viewers also liked

NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph DatabasesInfiniteGraph
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendationsproksik
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDaysNeo4j
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jDebanjan Mahata
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4jNeo4j
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDataminingTools Inc
 

Viewers also liked (10)

NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Lju Lazarevic
Lju LazarevicLju Lazarevic
Lju Lazarevic
 
An Introduction to Graph Databases
An Introduction to Graph DatabasesAn Introduction to Graph Databases
An Introduction to Graph Databases
 
Neo4j - graph database for recommendations
Neo4j - graph database for recommendationsNeo4j - graph database for recommendations
Neo4j - graph database for recommendations
 
Graph databases
Graph databasesGraph databases
Graph databases
 
Introduction to graph databases GraphDays
Introduction to graph databases  GraphDaysIntroduction to graph databases  GraphDays
Introduction to graph databases GraphDays
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 

More from DATAVERSITY

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...DATAVERSITY
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceDATAVERSITY
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data LiteracyDATAVERSITY
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsDATAVERSITY
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for YouDATAVERSITY
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?DATAVERSITY
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?DATAVERSITY
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling FundamentalsDATAVERSITY
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectDATAVERSITY
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at ScaleDATAVERSITY
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?DATAVERSITY
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...DATAVERSITY
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?DATAVERSITY
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsDATAVERSITY
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayDATAVERSITY
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise AnalyticsDATAVERSITY
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best PracticesDATAVERSITY
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?DATAVERSITY
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best PracticesDATAVERSITY
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageDATAVERSITY
 

More from DATAVERSITY (20)

Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
Architecture, Products, and Total Cost of Ownership of the Leading Machine Le...
 
Data at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and GovernanceData at the Speed of Business with Data Mastering and Governance
Data at the Speed of Business with Data Mastering and Governance
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data Literacy
 
Building a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business GoalsBuilding a Data Strategy – Practical Steps for Aligning with Business Goals
Building a Data Strategy – Practical Steps for Aligning with Business Goals
 
Make Data Work for You
Make Data Work for YouMake Data Work for You
Make Data Work for You
 
Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?Data Catalogs Are the Answer – What is the Question?
Data Catalogs Are the Answer – What is the Question?
 
Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?Data Catalogs Are the Answer – What Is the Question?
Data Catalogs Are the Answer – What Is the Question?
 
Data Modeling Fundamentals
Data Modeling FundamentalsData Modeling Fundamentals
Data Modeling Fundamentals
 
Showing ROI for Your Analytic Project
Showing ROI for Your Analytic ProjectShowing ROI for Your Analytic Project
Showing ROI for Your Analytic Project
 
How a Semantic Layer Makes Data Mesh Work at Scale
How a Semantic Layer Makes  Data Mesh Work at ScaleHow a Semantic Layer Makes  Data Mesh Work at Scale
How a Semantic Layer Makes Data Mesh Work at Scale
 
Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?Is Enterprise Data Literacy Possible?
Is Enterprise Data Literacy Possible?
 
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
The Data Trifecta – Privacy, Security & Governance Race from Reactivity to Re...
 
Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?Emerging Trends in Data Architecture – What’s the Next Big Thing?
Emerging Trends in Data Architecture – What’s the Next Big Thing?
 
Data Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and ForwardsData Governance Trends - A Look Backwards and Forwards
Data Governance Trends - A Look Backwards and Forwards
 
Data Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement TodayData Governance Trends and Best Practices To Implement Today
Data Governance Trends and Best Practices To Implement Today
 
2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics2023 Trends in Enterprise Analytics
2023 Trends in Enterprise Analytics
 
Data Strategy Best Practices
Data Strategy Best PracticesData Strategy Best Practices
Data Strategy Best Practices
 
Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?Who Should Own Data Governance – IT or Business?
Who Should Own Data Governance – IT or Business?
 
Data Management Best Practices
Data Management Best PracticesData Management Best Practices
Data Management Best Practices
 
MLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive AdvantageMLOps – Applying DevOps to Competitive Advantage
MLOps – Applying DevOps to Competitive Advantage
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Case Study: Real-time Recommendations with a Graph Database

  • 1. Realtime Recommendations with a Graph Database Andreas Kollegger #neo4j @akollegger Wednesday, August 24, 11
  • 2. What’s the plan? ๏Graph Database 101 ๏Case Study: Viadeo ๏Finding new Friends ๏Recommending new Sites 2 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 3. 3 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 4. Obey! 3 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 5. Obey! ๏tweet using #neo4j 3 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 6. Obey! ๏tweet using #neo4j ๏I am @akollegger 3 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 7. NOSQL Categories Size Data Complexity 4 Wednesday, August 24, 11
  • 8. NOSQL Categories Key-Value Store Size Data Complexity 4 Wednesday, August 24, 11
  • 9. NOSQL Categories Key-Value Store Size BigTable Clones Data Complexity 4 Wednesday, August 24, 11
  • 10. NOSQL Categories Key-Value Store Size BigTable Clones Document Databases Data Complexity 4 Wednesday, August 24, 11
  • 11. NOSQL Categories Key-Value Store Size BigTable Clones Document Databases Graph Databases Data Complexity 4 Wednesday, August 24, 11
  • 12. NOSQL Categories Key-Value Store Size BigTable Clones Document Databases Graph Databases Data Complexity 4 Wednesday, August 24, 11
  • 13. NOSQL Categories Key-Value Store (this is still billions Size BigTable of nodes & Clones relationships) Document Databases Graph 90% Databases of use cases Data Complexity 4 Wednesday, August 24, 11
  • 14. Graph DB 101 (Reading a graph) 5 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 15. A graph database? 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 16. A graph database? ๏ no: not for storing charts & graphs, or vector artwork 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 17. A graph database? ๏ no: not for storing charts & graphs, or vector artwork ๏ yes: for storing data that is structured as a graph 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 18. A graph database? ๏ no: not for storing charts & graphs, or vector artwork ๏ yes: for storing data that is structured as a graph • remember linked-list, tree? 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 19. A graph database? ๏ no: not for storing charts & graphs, or vector artwork ๏ yes: for storing data that is structured as a graph • remember linked-list, tree? • graphs are the generalized connected data structure 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 20. A graph database? ๏ no: not for storing charts & graphs, or vector artwork ๏ yes: for storing data that is structured as a graph • remember linked-list, tree? • graphs are the generalized connected data structure ๏ whiteboard friendly - no data mangling required 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 21. A graph database? ๏ no: not for storing charts & graphs, or vector artwork ๏ yes: for storing data that is structured as a graph • remember linked-list, tree? • graphs are the generalized connected data structure ๏ whiteboard friendly - no data mangling required ๏ “A traditional relational database may tell you the average salary of everyone in this conference, but a graph database will tell you who is most likely to buy you a beer.” 6 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 22. Q: What are graphs good for? 7 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 23. Q: What are graphs good for? A: highly-connected data ๏ Recommendations ๏ Time series data ๏ Business intelligence ๏ Product catalogue ๏ Social computing ๏ Web analytics ๏ Geospatial ๏ Scientific computing (especially bioinformatics) ๏ MDM ๏ Systems management ๏ Indexing your slow RDBMS ๏ Genealogy ๏ And much more! 7 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 24. G=(V,E) ๏ A (Graph) -records data in- (Nodes) Graph ๏ A (Graph) -records data in- (Relationships) records data in records data in organized by ๏ (Nodes) are -organized by- (Relationships) Nodes Relationships have have ๏ (Nodes & Relationships) -have- (Properties) Properties ๏ Instead of a Data Model, you have a Data Graph ๏ Structure is defined by the Relationships you create 8 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 25. Query a graph with a traversal ๏ A (Traversal) -navigates- a (Graph) Traversal identifies navigates ๏ A (Traversal) -identifies- (Paths) Paths Graph ๏ (Paths) -order- (Nodes) records data in records data in order organized by Nodes Relationships ๏ Traversals reveal localized data ๏ Find data that is relevant to other data 9 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 26. Indexes look-up Nodes or Relationships ๏ An (Index) -maps to either- Index special Traversal (Nodes or Relationships) maps to either maps to either ๏ An (Index) is a -special- (Traversal) organized by Nodes Relationships maps from have have ๏ Indexes find starting points for a traversal Properties ๏ Can be queried with simple constraints 10 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 27. Neo4j is a Graph Database ๏ A (Graph Database) -manages- Graph Database a (Graph) and related (Indexes) manages manages ๏ A Graph Database: lookup Graph Indexes • Full ACID Transactions • High-Availability (read scaling) • 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties • Server with REST API • Or, Embeddable as a Java Library 11 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 28. Neo4j Features ๏ Neo4j is stable • In 24/7 operation since 2003 ๏ Neo4j is under active development • open source, with a vibrant community ๏ High performance graph operations • high performance? like what? ... 12 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 29. Example: Social Network “path exists” ๏ ~1,000 persons Madeline ๏ average 50 friends per person Andreas Emil Joanne ๏ pathExists(a,b) limited to depth 4 Gabriella Marcus Peter ๏ caches warmed up to eliminate disk I/O Jacob # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 13 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 30. Example: Social Network “path exists” ๏ ~1,000 persons Madeline ๏ average 50 friends per person Andreas Emil Joanne ๏ pathExists(a,b) limited to depth 4 Gabriella Marcus Peter ๏ caches warmed up to eliminate disk I/O Jacob # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 13 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 31. Example: Social Network “path exists” ๏ ~1,000 persons Madeline ๏ average 50 friends per person Andreas Emil Joanne ๏ pathExists(a,b) limited to depth 4 Gabriella Marcus Peter ๏ caches warmed up to eliminate disk I/O Jacob # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 13 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 32. Example: Social Network “path exists” ๏ ~1,000 persons Madeline ๏ average 50 friends per person Andreas Emil Joanne ๏ pathExists(a,b) limited to depth 4 Gabriella Marcus Peter ๏ caches warmed up to eliminate disk I/O Jacob # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 13 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 33. Case Study: Viadeo 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 34. Case Study: Viadeo ๏ Viadeo - 35 million user professional network 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 35. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 36. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 37. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 38. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days ๏ now using Neo4j 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 39. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days ๏ now using Neo4j • recommendations run in real-time 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 40. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days ๏ now using Neo4j • recommendations run in real-time • what does a recommendation look like? 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 41. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days ๏ now using Neo4j • recommendations run in real-time • what does a recommendation look like? 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 42. Case Study: Viadeo ๏ Viadeo - 35 million user professional network ๏ the past tech • recommendations running on MySQL as a batch job • took an hour, then success happened.. and it took two days ๏ now using Neo4j • recommendations run in real-time • what does a recommendation look like? ๏ Check out: http://www.youtube.com/watch?v=sLlbtoCfciE 14 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 43. A closer look at recommendations 15 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 44. Recommendations 2 ways... 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 45. Recommendations 2 ways... ๏Gremlin - graph scripting 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 46. Recommendations 2 ways... ๏Gremlin - graph scripting • an algorithmic approach 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 47. Recommendations 2 ways... ๏Gremlin - graph scripting • an algorithmic approach ๏Cypher - declarative querying 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 48. Recommendations 2 ways... ๏Gremlin - graph scripting • an algorithmic approach ๏Cypher - declarative querying • a “pattern matching” approach 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 49. Recommendations 2 ways... ๏Gremlin - graph scripting • an algorithmic approach ๏Cypher - declarative querying • a “pattern matching” approach ๏Stig - functional graph query 16 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 50. Recommendations 2 ways... ๏Gremlin - graph scripting • an algorithmic approach ๏Cypher - declarative querying • a “pattern matching” approach ๏Stig - functional graph query • ok, not yet... Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j 16 Wednesday, August 24, 11
  • 51. Gremlin 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 52. Gremlin ๏ a graph scripting DSL 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 53. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 54. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 55. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 56. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself • g.v(0) - node 0 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 57. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself • g.v(0) - node 0 • g.v(0).in - nodes connected to Node 0 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 58. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself • g.v(0) - node 0 • g.v(0).in - nodes connected to Node 0 • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS” 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 59. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself • g.v(0) - node 0 • g.v(0).in - nodes connected to Node 0 • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS” ๏ details about Gremlin: https://github.com/tinkerpop/gremlin 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 60. Gremlin ๏ a graph scripting DSL ๏ part of the TinkerPop stack ๏ try it out: • g - the graph itself • g.v(0) - node 0 • g.v(0).in - nodes connected to Node 0 • g.v(1).out(“KNOWS”) - nodes connected by “KNOWS” ๏ details about Gremlin: https://github.com/tinkerpop/gremlin ๏ props to @twarko for creating it 17 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 61. Cypher 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 62. Cypher ๏ a pattern-matching query language (SQL-ish) 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 63. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 64. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 65. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: • start a=(0) return a - get node 0 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 66. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: • start a=(0) return a - get node 0 • start a=(1) match (a)-->(b) return b - traverse from node 1 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 67. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: • start a=(0) return a - get node 0 • start a=(1) match (a)-->(b) return b - traverse from node 1 • start a=(1) match (a)--()--(c) return c - friends of friends 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 68. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: • start a=(0) return a - get node 0 • start a=(1) match (a)-->(b) return b - traverse from node 1 • start a=(1) match (a)--()--(c) return c - friends of friends ๏ details about Cypher: 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 69. Cypher ๏ a pattern-matching query language (SQL-ish) ๏ developed in-house ๏ try it out: • start a=(0) return a - get node 0 • start a=(1) match (a)-->(b) return b - traverse from node 1 • start a=(1) match (a)--()--(c) return c - friends of friends ๏ details about Cypher: • http://docs.neo4j.org/chunked/stable/cypher-query-lang.html 18 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 70. The Social Graph as a Data Graph 19 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 71. The Usual Social Graph, is also data status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 20 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 72. The Usual Social Graph, is also data status body: presenting at NoSQL name:Andreas Now! like right now! status me knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 20 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 73. with the Usual “status tweets” status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 21 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 74. with the Usual “status tweets” status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 21 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 75. and the Usual Suspects status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 22 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 76. and the Usual Suspects status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 22 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 77. and the Usual Business status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 23 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 78. and the Usual Business status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 23 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 79. and the Usual Likes status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 24 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 80. and the Usual Likes status body: presenting at NoSQL name:Andreas Now! like right now! status knows name: Marko knows body: mocking up a simplified social graph worked_at name: Peter likes employer:Neo Technology employer:Xilinx likes worked_at url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 24 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 81. Making Friends 25 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 82. My Expanded Ego Network name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 26 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 83. Me & My Friends name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 27 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 84. Me & My Friends name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 27 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 85. Friends of my Friends name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 28 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 86. Friends of my Friends name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 28 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 87. Friends of my Friends name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 28 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 88. Friend of a Friend of a Friend? name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 29 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 89. Friend of a Friend of a Friend? name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 29 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 90. Friend of a Friend of a Friend? name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows Whatever. 29 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 91. Query for Friends of Friends 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 92. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 93. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 94. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 95. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 96. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends start andreas=(1) match (andreas)-[:KNOWS]->(friends) 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 97. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends start andreas=(1) match (andreas)-[:KNOWS]->(friends) -[:KNOWS]->(foafs) return foafs 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 98. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends start andreas=(1) match (andreas)-[:KNOWS]->(friends) -[:KNOWS]->(foafs) return foafs 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 99. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends start andreas=(1) match (andreas)-[:KNOWS]->(friends) -[:KNOWS]->(foafs) return foafs // result: Emil, Stephen, Allison (& Peter?) 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 100. Query for Friends of Friends // Gremlin - andreas to friends to their friends, counted andreas.out('KNOWS').out('KNOWS').name.groupCount(m) // Cypher - match from andreas to friends to their friends start andreas=(1) match (andreas)-[:KNOWS]->(friends) -[:KNOWS]->(foafs) return foafs // result: Emil, Stephen, Allison (& Peter?) Is that good enough? 30 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 101. Ranking my Friends’ Friends (intuitively) name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows knows knows name: Emil knows name: Allison knows 31 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 102. Ranking my Friends’ Friends (intuitively) name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows 1 knows knows name: Emil knows name: Allison knows 31 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 103. Ranking my Friends’ Friends (intuitively) name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows 1 knows knows name: Emil 2 knows name: Allison knows 31 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 104. Ranking my Friends’ Friends (intuitively) 3 name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter name: Delia name: Tiberius knows 1 knows knows name: Emil 2 knows name: Allison knows 31 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 105. Ranking my Friends’ Friends (intuitively) 3 name:Andreas knows knows name: Marko knows name: Stephen knows knows knows name: Peter ? name: Delia name: Tiberius knows 1 knows knows name: Emil 2 knows name: Allison knows 31 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 106. Query for Ranked extended FoaF 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 107. Query for Ranked extended FoaF // Gremlin - a bit more complex 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 108. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 109. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 110. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 111. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 112. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 113. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 114. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 115. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} ==>Emil=2.0 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 116. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} ==>Emil=2.0 ==>Allison=2.0 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 117. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} ==>Emil=2.0 ==>Allison=2.0 ==>Stephen=1.0 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 118. Query for Ranked extended FoaF // Gremlin - a bit more complex // - requiring “memory” and weights // - weights decrease with each “hop” outward // - extended hop, to include Stephen andreas.out('KNOWS').aggregate(x).out('KNOWS').except(x).name .groupCount(m){it}{it+1.0}.back(2) .out('KNOWS').except(x).name.groupCount(m){it}{it+0.5} ==>Emil=2.0 ==>Allison=2.0 ==>Stephen=1.0 ==>Tiberius=0.5 32 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 119. Like, like this 33 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 120. What else might I like? url: http://theoatmeal.com/comics/ name:Andreas state_web_summer/ likes:+1 knows name: Marko likes:+2 url: http://www.imdb.com/title/tt0133093/ knows likes:+1 name: Peter likes:+1 url: http://browsertoolkit.com/fault- tolerance.png likes:+1 likes:+2 url: http://www.imdb.com/title/tt0436992/ likes:+1 likes:+3 url: http://lensbaby.com/optics-pinhole.php url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 34 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 121. What else might I like? url: http://theoatmeal.com/comics/ name:Andreas state_web_summer/ likes:+1 knows name: Marko likes:+2 url: http://www.imdb.com/title/tt0133093/ knows likes:+1 name: Peter likes:+1 url: http://browsertoolkit.com/fault- tolerance.png likes:+1 likes:+2 url: http://www.imdb.com/title/tt0436992/ likes:+1 likes:+3 url: http://lensbaby.com/optics-pinhole.php url: http://www.amazon.com/Nikon-14-24mm-2-8G-Nikkor-Angle/dp/B000VDCTCI/ url: http://www.imdb.com/title/tt1475582/ 34 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 122. Query for Things to Like 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 123. Query for Things to Like // Cypher - websites my friends like 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 124. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 125. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) -[:LIKES]->(website) return website.url 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 126. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) -[:LIKES]->(website) return website.url 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 127. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) -[:LIKES]->(website) return website.url +------------------------------------------------+ 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 128. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) -[:LIKES]->(website) return website.url +------------------------------------------------+ | website.url | 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11
  • 129. Query for Things to Like // Cypher - websites my friends like start andreas=(1) match (andreas)-[:KNOWS]->(friend) -[:LIKES]->(website) return website.url +------------------------------------------------+ | website.url | +------------------------------------------------+ 35 Andreas Kollegger --[known_as]--> @akollegger --[talks_about]--> #neo4j Wednesday, August 24, 11