SlideShare a Scribd company logo
1
Neo4j is Teh Awesome
Graph Database 101
Graph Database 101
1
@emileifrem
#neo4j
2
“So what’s a graph database?”
2
33
“A traditional relational database
may tell you the average age of
everyone in this room...”
44
“... but a graph database will tell
you who is most likely to
buy you a beer!”
5
No. Srsly.
๏ Nodes
๏ Relationships
๏ Properties
5
6
How fast is it?
6
7
How fast is it?
๏ a sample social graph
•with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
# persons query time
Relational database 1,000 2000ms
Neo4j 1,000 2ms
Neo4j 1,000,000
8
How fast is it?
๏ a sample social graph
•with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
# persons query time
Relational database 1,000 2000ms
Neo4j 1,000 2ms
Neo4j 1,000,000 2ms
9
So how do you query it?
9
1010
Cypher
(A) -[:LOVES]-> (B)
LOVES
AA BB
Graph Patterns
START A=node:person(name=“A”)
MATCH
RETURN B as lover
ASCII art
11
// step 1: find starting point
START andreas=node:persons(name = ‘Andreas’)
// step 2: describe pattern and results
START andreas=node:persons(name = ‘Andreas’)
MATCH (andreas)-->()-->(foaf) RETURN foaf
Example: Finding Friends of Friends
11
(andreas)
12
Neo4j is a Graph Database
๏ A Graph Database:
•a Property Graph with Nodes, Relationships
•and Properties on both
•perfect for complex, highly connected data
๏ A Graph Database:
•reliable with real ACID Transactions
•scalable: high availability clustering in Neo4j Enterprise
•server with HTTP API, or embeddable on the JVM
•high-performance with High-Availability (read scaling)
12
13
Who’s using graphs today?
13
Accenture
14
So how do you get your hands on Neo4j?
14
๏ Option A: Download and install locally...
•go to http://neo4j.org
•click the shiny “Download Neo4j Now” button
•expand the archive, read the readmes
๏ Or B...
15
Graphs In The Cloud (BETA)
// new to heroku? get help
$ heroku help
// create a new application
$ heroku create intro-to-neo4j
// add Neo4j
heroku addons:add neo4j --app intro-to-neo4j
// find out about the application
heroku info --app intro-to-neo4j
// find the Neo4j Webadmin
heroku config --app intro-to-neo4j
// done trying it out? remove the application
heroku destroy --app intro-to-neo4j
15
16
I needs thy help
๏ Cloud Devops Engineer (San Mateo, London or Malmö, SE)
•Come help us build a world class graph database cloud platform!
๏ Director of Community North America (San Mateo)
•Head up our developer outreach and evangelism in NA
๏ Developer Evangelist (San Mateo)
•Preach graphs to silicon valley and the world
16
1717
thank you!
stay connected
Core IndustriesCore Industries
& Use Cases:& Use Cases:
Web / ISVWeb / ISV
Finance &Finance &
InsuranceInsurance
Datacom /Datacom /
TelecomTelecom
Network /Cloud MgmtNetwork /Cloud Mgmt
MDMMDM
SocialSocial
GeoGeo
Early Adopter Graph Database Segments
Core IndustriesCore Industries
& Use Cases:& Use Cases:
Web / ISVWeb / ISV
Finance &Finance &
InsuranceInsurance
Datacom /Datacom /
TelecomTelecom
Network /Cloud MgmtNetwork /Cloud Mgmt
MDMMDM
SocialSocial
GeoGeo
Core IndustriesCore Industries
& Use Cases:& Use Cases:
Web / ISVWeb / ISV
Finance &Finance &
InsuranceInsurance
Datacom /Datacom /
TelecomTelecom
LogisticsLogistics
LifeLife
SciencesSciences
Media &Media &
PublishingPublishing
Education,Education,
Not-for-Not-for-
ProfitProfit
Government,Government,
Aerospace,Aerospace,
Gaming, ...Gaming, ...
Network /CloudNetwork /Cloud
MgmtMgmt
MDMMDM
SocialSocial
GeoGeo
Resource Auth &Resource Auth &
Access ControlAccess Control
ContentContent
ManagementManagement
Recommend-Recommend-
ationsations
Data CenterData Center
ManagementManagement
FraudFraud
Detection, ...Detection, ...
Early Adopter Graph Database SegmentsEarly Adopters Going Mainstream
21
Telenor
Resource authorization & Access Control in Telecommunications
Resource authorization & Access Control in Telecommunications
21
Background
• 10th largest Telco provider in the world, leading in
the Nordics
• Online self-serve system where large business
customers manage employee subscriptions and plans
• 24/7 availability critical to customer satisfaction
Business problem Solution & Benefits
22
Telenor
Resource authorization & Access Control in Telecommunications
Resource authorization & Access Control in Telecommunications
22
23
Telenor
Resource authorization & Access Control in Telecommunications
Resource authorization & Access Control in Telecommunications
23
Background
• 10th largest Telco provider in the world, leading in
the Nordics
• Online self-serve system where large business
customers manage employee subscriptions and plans
• 24/7 availability critical to customer satisfaction
Business problem Solution & Benefits
• Resource authorization and access control across
millions of plans, customers, administrators and
groups, all interconnected, becomes a challenge
• Used Sybase RDBMS for pre-computing access rights
daily
• Pre-computation time projected to reach 9 hours in
2014
• Users cannot log in until their rights are computed
• Resource graph easily modeled and queried in Neo4j
• 1500 lines of stored procedures => 10s of lines of
Neo4j code
• All requests computed in real time in milliseconds
• Changes to customer resources reflected
immediately
• Customer retention risks mitigated
24
SFR
Network Management in Telecommunications
Network Management in Telecommunications
24
Background
• Second largest Telco in France
• Part of Vivendi Group, partnering with Vodaphone
Business problem Solution & Benefits
RouterRouter
ServiceService
DEPENDS_O
N
SwitchSwitch SwitchSwitch
RouterRouter
Fiber
Link
Fiber
Link Fiber
Link
Fiber
Link
Fiber
Link
Fiber
Link
Oceanflo
or Cable
Oceanflo
or Cable
DEPENDS_ON
DEPENDS_ON
DEPEN
DS_O
N
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
LINKED
LINKED
LIN
KED
DEPENDS_ON
25
SFR
Network Management in Telecommunications
Network Management in Telecommunications
25
RouterRouter
ServiceService
DEPENDS_O
N
SwitchSwitch SwitchSwitch
RouterRouter
Fiber LinkFiber Link
Fiber LinkFiber Link
Fiber LinkFiber Link
Oceanfloor
Cable
Oceanfloor
Cable
DEPENDS_ON
DEPENDS_ON
DEPEN
DS_O
N
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
LINKED
LINKED
LIN
KED
DEPENDS_ON
26
SFR
Network Management in Telecommunications
Network Management in Telecommunications
26
Background
• Second largest Telco in France
• Part of Vivendi Group, partnering with Vodaphone
Business problem Solution & Benefits
• Need for flexible network inventory management,
aggregation, and troubleshooting
• Impact analysis of planned and unplanned network
outages, so that affected services can be notified or
receive increased redundancy
• Highly volatile network structure changing daily, with
business requirements changing as well
• Neo4j Enterprise with a highly available cluster
• Dynamic system allowing for new applications to tie
into network structure data
• Near 1:1 mapping of real world to graph, greatly
reducing modeling work
• High adaptability to changing business requirements
RouterRouter
ServiceService
DEPENDS_O
N
SwitchSwitch SwitchSwitch
RouterRouter
Fiber
Link
Fiber
Link Fiber
Link
Fiber
Link
Fiber
Link
Fiber
Link
Oceanflo
or Cable
Oceanflo
or Cable
DEPENDS_ON
DEPENDS_ON
DEPEN
DS_O
N
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
DEPENDS_ON
LINKED
LINKED
LIN
KED
DEPENDS_ON
27
Adobe
Content Management, Access Control & Collaboration
Content Management, Access Control & Collaboration
27
Background
• Creative Cloud, announced 2011, is a cloud-based
offering for professional users of Adobe’s creative
suiteCollaborative Cloud is the social element of the
Creative Cloud, connecting professional users
around the world
Business problem Solution & Benefits
2828
Domain GraphDeployment Architecture
AdobeContent Management, Access Control & Collaboration
Content Management, Access Control & Collaboration
29
Adobe
Content Management, Access Control & Collaboration
Content Management, Access Control & Collaboration
29
Background
• Creative Cloud, announced 2011, is a cloud-based
offering for professional users of Adobe’s creative
suiteCollaborative Cloud is the social element of the
Creative Cloud, connecting professional users
around the world
Business problem Solution & Benefits
• Identifies which collections a user has access toFinds
third-party assets that are like a user’s assetsInfers
professional relations based on user-generated
content
• Fit:
• Graph model is a natural fit for social network
• Collaborative user experience adds competitive
advantage to Adobe offering
• Flexibility: Data model can be easily evolved to
support permissions and more sophisticated
recommendation strategies
• Performance: Sub-second results for large,
densely-connected datasets
30
Viadeo
Recommendations in Social
Recommendations in Social๏ Customer: a professional social network
• 35 millions users, adding 30,000+ each day
๏ Goal: up-to-date recommendations
• Scalable solution with real-time end-user experience
• Low maintenance and reliable architecture
• 8-week implementation
30
๏ Problem:
• Real-time recommendation imperative to attract new users
and maintain positive user retentionClustered MySQL
solution not scalable or fast enough to support real-time
requirementsUpgrade from running a batch job
๏ initial hour-long batch job
• but then success happened, and it became a day
• then two days
• With Neo4j, real time recommendations
๏ With Neo4j, real time recommendations
32
First off: the name
๏ WE ALL HATES IT, M’KAY?
32
NOSQL is NOT...
๏ NO to SQL
๏ NEVER SQL
Not Only SQL
NOSQL is simply
But why now?
36
Trends in BigData & NOSQL
36
๏ 1. increasing data size (big data)
•“Every 2 days we create as much information as we did up to
2003” - Eric Schmidt
๏ 2. increasingly connected data (graph data)
•for example, text documents to html
๏ 3. semi-structured data
•individualization of data, with common sub-set
๏ 4. architecture - a facade over multiple services
•from monolithic to modular, distributed applications
37
4 Categories of NOSQL
37
38
Key-Value Category
๏ “Dynamo:Amazon’s Highly Available Key-Value Store” (2007)
๏ Data model:
•Global key-value mapping
•Big scalable HashMap
•Highly fault tolerant (typically)
๏ Examples:
•Riak, Redis,Voldemort
38
39
Key-Value: Pros & Cons
๏ Strengths
•Simple data model
•Great at scaling out horizontally
•Scalable
•Available
๏ Weaknesses:
•Simplistic data model
•Poor for complex data
39
40
Column-Family Category
๏ Google’s “Bigtable: A Distributed Storage System for Structured
Data” (2006)
•Column-Family are essentially Big Table clones
๏ Data model:
•A big table, with column families
•Map-reduce for querying/processing
๏ Examples:
•HBase, HyperTable, Cassandra
40
41
Column-Family: Pros & Cons
๏ Strengths
•Data model supports semi-structured data
•Naturally indexed (columns)
•Good at scaling out horizontally
๏ Weaknesses:
•Unsuited for connected data
41
42
Document Database Category
๏ Data model
•Collections of documents
•A document is a key-value collection
•Index-centric, lots of map-reduce
๏ Examples
•CouchDB, MongoDB
42
43
Document Database: Pros & Cons
๏ Strengths
•Simple, powerful data model
•Good scaling (especially if sharding supported)
๏ Weaknesses:
•Unsuited for connected data
•Query model limited to keys (and indexes)
43
44
Graph Database Category
๏ Data model:
•Nodes & Relationships
•Hypergraph, sometimes (edges with multiple endpoints)
๏ Examples:
•Neo4j (of course), OrientDB, InfiniteGraph,AllegroGraph
44
45
Graph Database: Pros & Cons
๏ Strengths
•Powerful data model, as general as RDBMS
•Fast, for connected data
•Easy to query
๏ Weaknesses:
•Requires conceptual shift
‣though graph-like thinking becomes addictive
45
46
Scaling to Size
Scaling to Complexity
Key/Value stores
ColumnFamily stores
Document databases
Graph databases
My subjective view: > 90% of use cases
100+ billion of nodes
and relationships
The NOSQL Space

More Related Content

PDF
Neo4j the Anti Crime Database
PPTX
GraphTalk Berlin - Einführung in Graphdatenbanken
PDF
Graphs in the Real World
PDF
GraphTalks Rome - Introducing Neo4j
PPTX
GraphTalk Berlin - Neo4j und FirstSpirit
PDF
RDBMS to Graphs
PPTX
Neo4j graphs in the real world - graph days d.c. - april 14, 2015
PDF
Neo4j GraphTalks - Einführung in Graphdatenbanken
Neo4j the Anti Crime Database
GraphTalk Berlin - Einführung in Graphdatenbanken
Graphs in the Real World
GraphTalks Rome - Introducing Neo4j
GraphTalk Berlin - Neo4j und FirstSpirit
RDBMS to Graphs
Neo4j graphs in the real world - graph days d.c. - april 14, 2015
Neo4j GraphTalks - Einführung in Graphdatenbanken

What's hot (20)

PDF
Intro to Neo4j Webinar
PDF
Neo4j in Production: A look at Neo4j in the Real World
PDF
Introduction to Neo4j
PDF
The Connected Data Imperative: An Introduction to Neo4j
PDF
Neo4j GraphTalk Düsseldorf - Einführung in Graphdatenbanken und Neo4j
PPTX
GraphTalks - Einführung in Graphdatenbanken
PPTX
Introduction to Neo4j
PPTX
Knowledge Architecture: Graphing Your Knowledge
PDF
Neo4j GraphDay - Graphs in the Real World: Tope Use Cases for Graph Databases...
PPTX
Graphdatenbank Neo4j: Konzept, Positionierung, Status Region DACH - Bruno Un...
PPTX
Neo4j Popular use case
PDF
Graphs for Enterprise Architects
PDF
Graphs & the Police: How Law Enforcement Analyze Connected Data at Scale
PPTX
GraphTour - Popular Use Cases (Tel Aviv)
PPTX
GraphTour - ING - Fighting insanity
PPTX
Neo4j GraphTalk Wien - Einführung
PPTX
GraphTalks - Einführung
PDF
Graph database Use Cases
PPTX
Neo4j Graph Use Cases, Bruno Ungermann, Neo4j
PDF
The Connected Data Imperative: Why Graphs at GraphDay LA
Intro to Neo4j Webinar
Neo4j in Production: A look at Neo4j in the Real World
Introduction to Neo4j
The Connected Data Imperative: An Introduction to Neo4j
Neo4j GraphTalk Düsseldorf - Einführung in Graphdatenbanken und Neo4j
GraphTalks - Einführung in Graphdatenbanken
Introduction to Neo4j
Knowledge Architecture: Graphing Your Knowledge
Neo4j GraphDay - Graphs in the Real World: Tope Use Cases for Graph Databases...
Graphdatenbank Neo4j: Konzept, Positionierung, Status Region DACH - Bruno Un...
Neo4j Popular use case
Graphs for Enterprise Architects
Graphs & the Police: How Law Enforcement Analyze Connected Data at Scale
GraphTour - Popular Use Cases (Tel Aviv)
GraphTour - ING - Fighting insanity
Neo4j GraphTalk Wien - Einführung
GraphTalks - Einführung
Graph database Use Cases
Neo4j Graph Use Cases, Bruno Ungermann, Neo4j
The Connected Data Imperative: Why Graphs at GraphDay LA
Ad

Similar to raph Databases with Neo4j – Emil Eifrem (20)

PDF
La bi, l'informatique décisionnelle et les graphes
PDF
Neo4j GraphTour Toronto Opening Keynote
PDF
Intro to Graphs and Neo4j
PDF
Intro to Graphs and Neo4j
PDF
Network and IT Ops Series: Build Production Solutions
PDF
An Overview of the Emerging Graph Landscape (Oct 2013)
PDF
State of the State: What’s Happening in the Database Market?
PDF
GraphConnect SF 2013 Keynote
PDF
New Opportunities for Connected Data - Emil Eifrem @ GraphConnect Boston + Ch...
PPTX
GraphTalks Rome - Selecting the right Technology
PPTX
State of the State: What’s Happening in the Database Market?
PPTX
GraphTour Boston - State of the State: Database Market
PDF
Neo4j: What's Under the Hood & How Knowing This Can Help You
PDF
Neo4j wp recommendations_en_bus
PPTX
Big data hadoop-no sql and graph db-final
PDF
Neo4j GraphDay Seattle- Sept19- in the enterprise
PPTX
Graph all the things - PRathle
PPTX
State of Florida Neo4j Graph Briefing - Cyber IAM
PDF
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
PPTX
State of the State: What’s Happening in the Database Market?
La bi, l'informatique décisionnelle et les graphes
Neo4j GraphTour Toronto Opening Keynote
Intro to Graphs and Neo4j
Intro to Graphs and Neo4j
Network and IT Ops Series: Build Production Solutions
An Overview of the Emerging Graph Landscape (Oct 2013)
State of the State: What’s Happening in the Database Market?
GraphConnect SF 2013 Keynote
New Opportunities for Connected Data - Emil Eifrem @ GraphConnect Boston + Ch...
GraphTalks Rome - Selecting the right Technology
State of the State: What’s Happening in the Database Market?
GraphTour Boston - State of the State: Database Market
Neo4j: What's Under the Hood & How Knowing This Can Help You
Neo4j wp recommendations_en_bus
Big data hadoop-no sql and graph db-final
Neo4j GraphDay Seattle- Sept19- in the enterprise
Graph all the things - PRathle
State of Florida Neo4j Graph Briefing - Cyber IAM
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
State of the State: What’s Happening in the Database Market?
Ad

More from buildacloud (20)

PDF
The Future of SDN in CloudStack by Chiradeep Vittal
PPTX
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
PDF
L4-L7 services for SDN and NVF by Youcef Laribi
POTX
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
PPTX
Intro to Zenoss by Andrew Kirch
ODP
Guaranteeing Storage Performance by Mike Tutkowski
PDF
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
PPT
Introduction to Apache CloudStack by David Nalley
PDF
Managing infrastructure with Application Policy by Mike Cohen
PPTX
Intro to Zenoss by Andrew Kirch
PPTX
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
PDF
Rest api design by george reese
PPTX
Enterprise grade firewall and ssl termination to ac by will stevens
PDF
State of the cloud by reuven cohen
PDF
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
PPTX
DevCloud - Setup and Demo on Apache CloudStack
PDF
Cloud Network Virtualization with Juniper Contrail
PPTX
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
PDF
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
PPT
CloudStack University by Sebastien Goasguen
The Future of SDN in CloudStack by Chiradeep Vittal
Policy Based SDN Solution for DC and Branch Office by Suresh Boddapati
L4-L7 services for SDN and NVF by Youcef Laribi
Jenkins, jclouds, CloudStack, and CentOS by David Nalley
Intro to Zenoss by Andrew Kirch
Guaranteeing Storage Performance by Mike Tutkowski
Cloud Application Blueprints with Apache Brooklyn by Alex Henevald
Introduction to Apache CloudStack by David Nalley
Managing infrastructure with Application Policy by Mike Cohen
Intro to Zenoss by Andrew Kirch
Monitoring CloudStack in context with Converged Infrastructure by Mike Turnlund
Rest api design by george reese
Enterprise grade firewall and ssl termination to ac by will stevens
State of the cloud by reuven cohen
Securing Your Cloud With the Xen Hypervisor by Russell Pavlicek
DevCloud - Setup and Demo on Apache CloudStack
Cloud Network Virtualization with Juniper Contrail
Ian rae panel cloud stack & cloud storage where are we at, and where do we ne...
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
CloudStack University by Sebastien Goasguen

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Modernizing your data center with Dell and AMD
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Modernizing your data center with Dell and AMD
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf

raph Databases with Neo4j – Emil Eifrem

  • 1. 1 Neo4j is Teh Awesome Graph Database 101 Graph Database 101 1 @emileifrem #neo4j
  • 2. 2 “So what’s a graph database?” 2
  • 3. 33 “A traditional relational database may tell you the average age of everyone in this room...”
  • 4. 44 “... but a graph database will tell you who is most likely to buy you a beer!”
  • 5. 5 No. Srsly. ๏ Nodes ๏ Relationships ๏ Properties 5
  • 7. 7 How fast is it? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000
  • 8. 8 How fast is it? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms
  • 9. 9 So how do you query it? 9
  • 10. 1010 Cypher (A) -[:LOVES]-> (B) LOVES AA BB Graph Patterns START A=node:person(name=“A”) MATCH RETURN B as lover ASCII art
  • 11. 11 // step 1: find starting point START andreas=node:persons(name = ‘Andreas’) // step 2: describe pattern and results START andreas=node:persons(name = ‘Andreas’) MATCH (andreas)-->()-->(foaf) RETURN foaf Example: Finding Friends of Friends 11 (andreas)
  • 12. 12 Neo4j is a Graph Database ๏ A Graph Database: •a Property Graph with Nodes, Relationships •and Properties on both •perfect for complex, highly connected data ๏ A Graph Database: •reliable with real ACID Transactions •scalable: high availability clustering in Neo4j Enterprise •server with HTTP API, or embeddable on the JVM •high-performance with High-Availability (read scaling) 12
  • 13. 13 Who’s using graphs today? 13 Accenture
  • 14. 14 So how do you get your hands on Neo4j? 14 ๏ Option A: Download and install locally... •go to http://neo4j.org •click the shiny “Download Neo4j Now” button •expand the archive, read the readmes ๏ Or B...
  • 15. 15 Graphs In The Cloud (BETA) // new to heroku? get help $ heroku help // create a new application $ heroku create intro-to-neo4j // add Neo4j heroku addons:add neo4j --app intro-to-neo4j // find out about the application heroku info --app intro-to-neo4j // find the Neo4j Webadmin heroku config --app intro-to-neo4j // done trying it out? remove the application heroku destroy --app intro-to-neo4j 15
  • 16. 16 I needs thy help ๏ Cloud Devops Engineer (San Mateo, London or Malmö, SE) •Come help us build a world class graph database cloud platform! ๏ Director of Community North America (San Mateo) •Head up our developer outreach and evangelism in NA ๏ Developer Evangelist (San Mateo) •Preach graphs to silicon valley and the world 16
  • 18. Core IndustriesCore Industries & Use Cases:& Use Cases: Web / ISVWeb / ISV Finance &Finance & InsuranceInsurance Datacom /Datacom / TelecomTelecom Network /Cloud MgmtNetwork /Cloud Mgmt MDMMDM SocialSocial GeoGeo Early Adopter Graph Database Segments
  • 19. Core IndustriesCore Industries & Use Cases:& Use Cases: Web / ISVWeb / ISV Finance &Finance & InsuranceInsurance Datacom /Datacom / TelecomTelecom Network /Cloud MgmtNetwork /Cloud Mgmt MDMMDM SocialSocial GeoGeo Core IndustriesCore Industries & Use Cases:& Use Cases: Web / ISVWeb / ISV Finance &Finance & InsuranceInsurance Datacom /Datacom / TelecomTelecom LogisticsLogistics LifeLife SciencesSciences Media &Media & PublishingPublishing Education,Education, Not-for-Not-for- ProfitProfit Government,Government, Aerospace,Aerospace, Gaming, ...Gaming, ... Network /CloudNetwork /Cloud MgmtMgmt MDMMDM SocialSocial GeoGeo Resource Auth &Resource Auth & Access ControlAccess Control ContentContent ManagementManagement Recommend-Recommend- ationsations Data CenterData Center ManagementManagement FraudFraud Detection, ...Detection, ... Early Adopter Graph Database SegmentsEarly Adopters Going Mainstream
  • 20. 21 Telenor Resource authorization & Access Control in Telecommunications Resource authorization & Access Control in Telecommunications 21 Background • 10th largest Telco provider in the world, leading in the Nordics • Online self-serve system where large business customers manage employee subscriptions and plans • 24/7 availability critical to customer satisfaction Business problem Solution & Benefits
  • 21. 22 Telenor Resource authorization & Access Control in Telecommunications Resource authorization & Access Control in Telecommunications 22
  • 22. 23 Telenor Resource authorization & Access Control in Telecommunications Resource authorization & Access Control in Telecommunications 23 Background • 10th largest Telco provider in the world, leading in the Nordics • Online self-serve system where large business customers manage employee subscriptions and plans • 24/7 availability critical to customer satisfaction Business problem Solution & Benefits • Resource authorization and access control across millions of plans, customers, administrators and groups, all interconnected, becomes a challenge • Used Sybase RDBMS for pre-computing access rights daily • Pre-computation time projected to reach 9 hours in 2014 • Users cannot log in until their rights are computed • Resource graph easily modeled and queried in Neo4j • 1500 lines of stored procedures => 10s of lines of Neo4j code • All requests computed in real time in milliseconds • Changes to customer resources reflected immediately • Customer retention risks mitigated
  • 23. 24 SFR Network Management in Telecommunications Network Management in Telecommunications 24 Background • Second largest Telco in France • Part of Vivendi Group, partnering with Vodaphone Business problem Solution & Benefits RouterRouter ServiceService DEPENDS_O N SwitchSwitch SwitchSwitch RouterRouter Fiber Link Fiber Link Fiber Link Fiber Link Fiber Link Fiber Link Oceanflo or Cable Oceanflo or Cable DEPENDS_ON DEPENDS_ON DEPEN DS_O N DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON LINKED LINKED LIN KED DEPENDS_ON
  • 24. 25 SFR Network Management in Telecommunications Network Management in Telecommunications 25 RouterRouter ServiceService DEPENDS_O N SwitchSwitch SwitchSwitch RouterRouter Fiber LinkFiber Link Fiber LinkFiber Link Fiber LinkFiber Link Oceanfloor Cable Oceanfloor Cable DEPENDS_ON DEPENDS_ON DEPEN DS_O N DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON LINKED LINKED LIN KED DEPENDS_ON
  • 25. 26 SFR Network Management in Telecommunications Network Management in Telecommunications 26 Background • Second largest Telco in France • Part of Vivendi Group, partnering with Vodaphone Business problem Solution & Benefits • Need for flexible network inventory management, aggregation, and troubleshooting • Impact analysis of planned and unplanned network outages, so that affected services can be notified or receive increased redundancy • Highly volatile network structure changing daily, with business requirements changing as well • Neo4j Enterprise with a highly available cluster • Dynamic system allowing for new applications to tie into network structure data • Near 1:1 mapping of real world to graph, greatly reducing modeling work • High adaptability to changing business requirements RouterRouter ServiceService DEPENDS_O N SwitchSwitch SwitchSwitch RouterRouter Fiber Link Fiber Link Fiber Link Fiber Link Fiber Link Fiber Link Oceanflo or Cable Oceanflo or Cable DEPENDS_ON DEPENDS_ON DEPEN DS_O N DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON DEPENDS_ON LINKED LINKED LIN KED DEPENDS_ON
  • 26. 27 Adobe Content Management, Access Control & Collaboration Content Management, Access Control & Collaboration 27 Background • Creative Cloud, announced 2011, is a cloud-based offering for professional users of Adobe’s creative suiteCollaborative Cloud is the social element of the Creative Cloud, connecting professional users around the world Business problem Solution & Benefits
  • 27. 2828 Domain GraphDeployment Architecture AdobeContent Management, Access Control & Collaboration Content Management, Access Control & Collaboration
  • 28. 29 Adobe Content Management, Access Control & Collaboration Content Management, Access Control & Collaboration 29 Background • Creative Cloud, announced 2011, is a cloud-based offering for professional users of Adobe’s creative suiteCollaborative Cloud is the social element of the Creative Cloud, connecting professional users around the world Business problem Solution & Benefits • Identifies which collections a user has access toFinds third-party assets that are like a user’s assetsInfers professional relations based on user-generated content • Fit: • Graph model is a natural fit for social network • Collaborative user experience adds competitive advantage to Adobe offering • Flexibility: Data model can be easily evolved to support permissions and more sophisticated recommendation strategies • Performance: Sub-second results for large, densely-connected datasets
  • 29. 30 Viadeo Recommendations in Social Recommendations in Social๏ Customer: a professional social network • 35 millions users, adding 30,000+ each day ๏ Goal: up-to-date recommendations • Scalable solution with real-time end-user experience • Low maintenance and reliable architecture • 8-week implementation 30 ๏ Problem: • Real-time recommendation imperative to attract new users and maintain positive user retentionClustered MySQL solution not scalable or fast enough to support real-time requirementsUpgrade from running a batch job ๏ initial hour-long batch job • but then success happened, and it became a day • then two days • With Neo4j, real time recommendations ๏ With Neo4j, real time recommendations
  • 30. 32 First off: the name ๏ WE ALL HATES IT, M’KAY? 32
  • 31. NOSQL is NOT... ๏ NO to SQL ๏ NEVER SQL
  • 32. Not Only SQL NOSQL is simply
  • 34. 36 Trends in BigData & NOSQL 36 ๏ 1. increasing data size (big data) •“Every 2 days we create as much information as we did up to 2003” - Eric Schmidt ๏ 2. increasingly connected data (graph data) •for example, text documents to html ๏ 3. semi-structured data •individualization of data, with common sub-set ๏ 4. architecture - a facade over multiple services •from monolithic to modular, distributed applications
  • 35. 37 4 Categories of NOSQL 37
  • 36. 38 Key-Value Category ๏ “Dynamo:Amazon’s Highly Available Key-Value Store” (2007) ๏ Data model: •Global key-value mapping •Big scalable HashMap •Highly fault tolerant (typically) ๏ Examples: •Riak, Redis,Voldemort 38
  • 37. 39 Key-Value: Pros & Cons ๏ Strengths •Simple data model •Great at scaling out horizontally •Scalable •Available ๏ Weaknesses: •Simplistic data model •Poor for complex data 39
  • 38. 40 Column-Family Category ๏ Google’s “Bigtable: A Distributed Storage System for Structured Data” (2006) •Column-Family are essentially Big Table clones ๏ Data model: •A big table, with column families •Map-reduce for querying/processing ๏ Examples: •HBase, HyperTable, Cassandra 40
  • 39. 41 Column-Family: Pros & Cons ๏ Strengths •Data model supports semi-structured data •Naturally indexed (columns) •Good at scaling out horizontally ๏ Weaknesses: •Unsuited for connected data 41
  • 40. 42 Document Database Category ๏ Data model •Collections of documents •A document is a key-value collection •Index-centric, lots of map-reduce ๏ Examples •CouchDB, MongoDB 42
  • 41. 43 Document Database: Pros & Cons ๏ Strengths •Simple, powerful data model •Good scaling (especially if sharding supported) ๏ Weaknesses: •Unsuited for connected data •Query model limited to keys (and indexes) 43
  • 42. 44 Graph Database Category ๏ Data model: •Nodes & Relationships •Hypergraph, sometimes (edges with multiple endpoints) ๏ Examples: •Neo4j (of course), OrientDB, InfiniteGraph,AllegroGraph 44
  • 43. 45 Graph Database: Pros & Cons ๏ Strengths •Powerful data model, as general as RDBMS •Fast, for connected data •Easy to query ๏ Weaknesses: •Requires conceptual shift ‣though graph-like thinking becomes addictive 45
  • 44. 46 Scaling to Size Scaling to Complexity Key/Value stores ColumnFamily stores Document databases Graph databases My subjective view: > 90% of use cases 100+ billion of nodes and relationships The NOSQL Space