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