Neo4j - 5 cool graph examples
-
Upload
peter-neubauer -
Category
Technology
-
view
120 -
download
0
description
Transcript of Neo4j - 5 cool graph examples
Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke
@kymerawand
First, a recap: NOSQL data models
Column Family
Key-value stores
Document databases
Graph databases
Data complexity
Dat
a si
ze
We are here
What makes a good DB?
Separate Logic and DataSupport Ad-Hoc queriesBe persistentScale good enough
The property graph modelCore abstractions:
NodesRelationships between nodesProperties on both
Traversal frameworkHigh performancequeries on connecteddata sets
Other bindingsLangs, REST, Gremlin, RDF
name = “Emil”age = 29sex = “yes”
type = KNOWStime = 4 years
type = carvendor = “SAAB”model = “95 Aero”
11 22
33
Social data (customer: brand-name social network)
name = “Mike”age = 29
11
disclosure = public
name = “Charlie”last_name = “Runkle”
name = “Dani”last_name = “California”age = 27
331313
KNOWS KNOWS
name = “Hank”last_name = “Moody”age = 42
age = 3 days
name = “Karen”
77
22
KNOWS
KNOWSKN
OW
S
name = “Marcy Runkle”
4242
KNOWS
Just a social graph?
Spatial data (customer: large telecom company)
name = “Omni Hotel”lat = 3492848long = 283823423
11
length = 7 miles
name = ...lat, long = ...
name = “Swedland”lat = 23410349long = 2342348852
331313
ROAD ROOOAD
name = “The Tavern”lat = 1295238237long = 234823492
length = 3 miles
name = ...
77
22
ROAD
ROADR
OAD
name = ...
4242
ROAD
Social? Spatial? … Social AND spatial!
Social AND spatial data (customer: LBS)
name = “Omni Hotel”lat = 3492848long = 283823423
11
weight = 10
name = “Emil”beer_qual = expert
name = “Maria”age = 30beer_qual = non-existant
331313
LIKES SIBLING
name = “The Tavern”lat = 1295238237long = 234823492
length = 3 miles
name = ...
77
22
ROAD
ROADR
OAD
name = “Peter”
4242
KNOWS
Financial data (customer: international bank)
name = “Mr Godfather”karma = veeeery-lowcash = more-than-you
11
amount = $1000
name = “Emil”cash = always-too-li'l
title = “ATM @ Wall St”id = 230918484233cash_left = 384204
331313
TRANSFER WITHDRAW
name = “The Tavern”lat = 1295238237long = 234823492
amount = $1000
name = ...
77
22
OWNS
DEPOSITTR
ANSF
ER
name = ...
4242
WITHDRAW
REST in Neo4jThe graph as an OODB – Roo, Grails Jruby, Jo4neoDeep graph algos – Routing with A*Multiple indexes in the graph – GISRecommendation systems – Gremlin and LinkedData
Use Cases
REST in Neo4j
Build on self describing JSONIndexingQueryingBindings to PHP, C#, JSOpenGraph APIJruby, Scala
The Graph for objectsKeep data clean!Annotation based
GrailsJo4neoRooJPA
Mixin basedDjangoJRuby
C# (REST)PHP (REST)
The Graph as an OODB
Routing with Neo4j and A*
Routing with Neo4j and A*
Multiple indexes - GISQuadTree (2D)HierarchyTime (1D)On-demand index
Multiple indexes - GIS
Multiple indexes - GIS
Recommendation - Gremlingremlin.tinkerpop.comXPath based “Perl for Graphs”Property Graph Model
Neo4j, RDF-SAIL, Tinkergraph, MongoDB, FSLinkedData SAIL
Recommendation - Gremlin
Recommendation - Gremlin
Activity streamsProcess automation
Life-filtering of event streamsWeb-of-Things data fl ows
Object oriented reportingJasper ReportsReportAnywhereScripting
Other use cases
Werner VogelsCTO, Amazon
“For anything with multiple relationships, multiple connections N e o4 j ab s ol u te l y R OCK S!”
http://bit.ly/dys4nx
Manager of an enterprise product for the Fortune 5000
“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.”
A web where the default is social → an explosion of graph-y data
Why graph databases?
How ego are you? (aka other impls?)Franz’ Al l e groGrap h (http://agraph.franz.com)
Proprietary, Lisp, RDF-oriented but real graphdb
Sones grap 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 nfi n i te Grap h (http://infinitegraph.com)
New, closed OODB with Graph Layer on top
Most widely deployed graph db in the worldRobust: 24/7 production since 2003Mature: lots of production deploymentsCommunity: ecosystem of tools, bindings, frameworks
Available NOW under AGPLv3 / commercial licenseAGPLv3: “if you’re open source, we’re open source”If you have proprietary software? Must buy a commercial licenseBut the fi rst one is free! For ALL use-cases.
Downloadhttp://neo4j.org
Feedbackhttp://lists.neo4j.org
Why Neo4j?
Th e Ne o4 j te ami s h i r i ng !
Do you see the Matrix? Apply now.
Questions?
Image credit: lost again! Sorry :(
http://neotechnology.com