SlideShare une entreprise Scribd logo
1  sur  88
Télécharger pour lire hors ligne
Neo4j	
  in	
  Depth
Max	
  De	
  Marzi
About	
  Me
• Max	
  De	
  Marzi	
  -­‐	
  Neo4j	
  Field	
  Engineer	
  	
  
• My	
  Blog:	
  http://maxdemarzi.com	
  
• Find	
  me	
  on	
  Twitter:	
  @maxdemarzi	
  
• Email	
  me:	
  maxdemarzi@gmail.com	
  
• GitHub:	
  http://github.com/maxdemarzi
TLDR:
Property	
  Graph	
  Data	
  Model
What	
  you	
  already	
  know
The	
  Problem
• all JOINs are executed every time you query
(traverse) the relationship
•  executing a JOIN means to search for a key in
another table
•  with Indices executing a JOIN means to lookup a key
•  B-Tree Index: O(log(n))
•  more entries => more lookups => slower JOINs
People ConferencesAttend
143 Max
326
Big Data Tech Con
725
NoSQL Now
981 Chariot Data IO143 981
143 725
143 326
Max
Big Data Tech Con
NoSQL Now
Chariot Data IO
143
326
725
981
143 981
143 725
143 326
uid: MDM
name: Max
uid: BDTC
where: Burlinggame
uid: NSN
where: San Francisco
uid: CDIO
where: Philadelphia
Nodes
Relationships
member
member
member
A Property Graph
Neo4j	
  Secret	
  Sauce
• Pointers instead of look-ups
• Fixed sized records for fast access
• Do all your “Joining” on creation
• Spin spin spin through this data
structure
Relational	
  Databases	
  Can’t	
  Handle	
  Relationships	
  Well
• Cannot	
  model	
  or	
  store	
  data	
  and	
  relationships	
  
without	
  complexity	
  
• Performance	
  degrades	
  with	
  number	
  &	
  levels	
  of	
  
relationships,	
  and	
  database	
  size	
  
• Query	
  complexity	
  grows	
  with	
  need	
  for	
  JOINs	
  
• Adding	
  new	
  types	
  of	
  	
  data	
  and	
  relationships	
  
requires	
  schema	
  redesign,	
  increasing	
  time	
  to	
  
market	
  
…	
  making	
  traditional	
  databases	
  inappropriate	
  when	
  
relationships	
  are	
  valuable	
  in	
  real-­‐time
Slow	
  development

Poor	
  performance

Low	
  scalability

Hard	
  to	
  maintain
NoSQL	
  Databases	
  Don’t	
  Handle	
  Relationships
• No	
  data	
  structures	
  to	
  model	
  or	
  store	
  
relationships	
  
• No	
  query	
  constructs	
  to	
  support	
  
relationships	
  
• Relating	
  data	
  requires	
  “JOIN	
  logic”	
  in	
  the	
  
application	
  
• No	
  ACID	
  support	
  for	
  transactions	
  
…	
  making	
  NoSQL	
  databases	
  inappropriate	
  when	
  
relationships	
  are	
  valuable	
  in	
  real-­‐time
Real-­‐Time	
  Query	
  Performance

Performance	
  must	
  hold	
  steady	
  with	
  scale
Connectedness	
  and	
  Size	
  of	
  Data	
  Set
Response	
  Time
0	
  to	
  2	
  hops

0	
  to	
  3	
  degrees

Thousands	
  of	
  connections
Tens	
  to	
  hundreds	
  of	
  hops

Thousands	
  of	
  degrees

Billions	
  	
  of	
  connections
Relational	
  and

Other	
  NoSQL

Databases
Neo4j
Neo4j	
  is	
  

1000x	
  faster

Reduces	
  minutes	
  

to	
  milliseconds
Re-­‐Imagine	
  Your	
  Data	
  as	
  a	
  Graph
Neo4j	
  is	
  an	
  enterprise-­‐grade	
  graph	
  
database	
  that	
  enables	
  you	
  to:	
  
• Model	
  and	
  store	
  your	
  data	
  as	
  a	
  
graph	
  
• Query	
  relationships	
  with	
  ease	
  
and	
  in	
  real-­‐time	
  
• Seamlessly	
  evolve	
  applications	
  
to	
  support	
  new	
  requirements	
  by	
  

adding	
  new	
  kinds	
  of	
  data	
  and	
  
relationships
Agile	
  development

High	
  performance

Vertical	
  and	
  horizontal	
  scale

Seamless	
  evolution
Neo4j	
  Overview
Product	
  
• Neo4j	
  -­‐	
  World’s	
  leading	
  graph	
  
database	
  
• 1M+	
  downloads,	
  adding	
  50k+	
  

per	
  month	
  
• 150+	
  enterprise	
  subscription	
  
customers	
  including	
  over	
  

50	
  of	
  the	
  Global	
  2000
Company	
  
• Neo	
  Technology,	
  Creator	
  of	
  Neo4j	
  
• 80	
  employees	
  with	
  HQ	
  in	
  Silicon	
  
Valley,	
  London,	
  Munich,	
  Paris	
  and	
  
Malmö	
  
• $45M	
  in	
  funding	
  from	
  Fidelity,	
  
Sunstone,	
  Conor,	
  Creandum,	
  
Dawn	
  Capital
 	
  	
  2000	
  	
  	
  	
  	
  	
  	
  	
  	
  2003	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  2007	
  	
  	
  2009	
   2011 2013 2014 2015
Neo4j:	
  The	
  Graph	
  Database	
  Leader
GraphConnect,	
  

first	
  conference	
  
for	
  graph	
  DBs
First	
  Global	
  2000	
  	
  

Customer	
  
Introduced	
  Cypher	
  
a	
  declarative	
  query	
  
language	
  for	
  
property	
  graphs
Published	
  
O’Reilly	
  book

on	
  Graph	
  
Databases
$11M	
  Series	
  A	
  

from	
  Fidelity,	
  
Sunstone

and	
  Conor	
  
$11M	
  Series	
  B	
  

from	
  Fidelity,	
  
Sunstone

and	
  Conor	
  
Commercial

Leadership
First	
  

native	
  

graph	
  DB	
  

in	
  24/7	
  
production
Invented	
  
property	
  
graph	
  
model
Contributed	
  
first	
  graph	
  
DB	
  to	
  open	
  
source
$2.5M	
  Seed

Round	
  from	
  
Sunstone	
  

and	
  Conor
Funding
Technical

Leadership
Extended	
  

graph	
  data	
  
model	
  to	
  

labeled	
  
property	
  graph
150+	
  customers	
  
50K+	
  monthly

downloads	
  
500+	
  graph	
  

DB	
  events

worldwide	
  

$20M	
  Series	
  C	
  

led	
  by	
  
Creandum,	
  with	
  
Dawn	
  and	
  
existing	
  investors
“Forrester	
  estimates	
  that	
  over	
  25%	
  of	
  enterprises	
  will	
  be	
  using	
  
graph	
  databases	
  by	
  2017”
Neo4j	
  Leads	
  the	
  Graph	
  Database	
  Revolution
“Neo4j	
  is	
  the	
  current	
  market	
  leader	
  in	
  graph	
  databases.”
“Graph	
  analysis	
  is	
  possibly	
  the	
  single	
  most	
  effective	
  competitive	
  
differentiator	
  for	
  organizations	
  pursuing	
  data-­‐driven	
  operations	
  
and	
  decisions	
  after	
  the	
  design	
  of	
  data	
  capture.”
1.	
  IT	
  Market	
  Clock	
  for	
  Database	
  Management	
  Systems,	
  2014	
  
2.	
  TechRadar™:	
  Enterprise	
  DBMS,	
  Q1	
  2014	
  
3.Graph	
  Databases	
  –	
  and	
  Their	
  Potential	
  to	
  Transform	
  How	
  We	
  Capture	
  Interdependencies	
  (Enterprise	
  Management	
  Associates)
Building	
  a	
  Recommendation	
  Engine	
  in	
  2	
  Minutes	
  with	
  Neo4j	
  

Developer	
  Experience:	
  Neo4j	
  UI	
  with	
  Cypher	
  Query	
  Language
Two-­‐Minute	
  Video	
  Demo
https://www.youtube.com/watch?v=qbZ_Q-­‐YnHYo
Neo4j	
  –	
  Key	
  Product	
  Features
Native	
  Graph	
  Storage

Ensures	
  data	
  consistency	
  and	
  
performance	
  
Native	
  Graph	
  Processing

Millions	
  of	
  hops	
  per	
  second,	
  in	
  real	
  time	
  
“Whiteboard	
  Friendly”	
  Data	
  Modeling

Model	
  data	
  as	
  it	
  naturally	
  occurs	
  
High	
  Data	
  Integrity

Fully	
  ACID	
  transactions
The	
  Graph	
  Query	
  Language:	
  Cypher

Requires	
  10x	
  to	
  100x	
  less	
  code	
  than	
  SQL	
  
Scalability	
  and	
  High	
  Availability

Vertical	
  and	
  horizontal	
  scaling	
  optimized	
  
for	
  graphs	
  
Built-­‐in	
  ETL

Seamless	
  import	
  from	
  other	
  databases	
  
Integration

Drivers	
  and	
  APIs	
  for	
  popular	
  languages
MATCH

(A)
CAR
DRIVES
name:	
  “Dan”	
  
born:	
  May	
  29,	
  1970	
  
twitter:	
  “@dan”
name:	
  “Ann”	
  
born:	
  	
  Dec	
  5,	
  1975
since:	
  

Jan	
  10,	
  2011
brand:	
  “Volvo”	
  
model:	
  “V70”
Property	
  Graph	
  Model	
  Components
Nodes	
  
• The	
  objects	
  in	
  the	
  graph	
  
• Can	
  have	
  properties	
  
• Can	
  be	
  labeled	
  
Relationships	
  
• Relate	
  nodes	
  by	
  type	
  and	
  direction	
  
• Can	
  have	
  properties
LOVES
LOVES
LIVES	
  WITH
OW
NS
PERSON PERSON
Triple	
  Store/RDF	
  Model
• Resource	
  Description	
  Framework	
  
• Subject,	
  Predicate,	
  Object	
  
• Standard	
  Data	
  Model	
  
• Names	
  for	
  subjects,	
  predicates,	
  
objects	
  must	
  be	
  URIs	
  
• Names	
  must	
  be	
  Global	
  
• No	
  properties	
  on	
  the	
  Relationships	
  
• Like	
  “3rd	
  Normal	
  Form”	
  for	
  Relational	
  
Databases	
  (but	
  really	
  more	
  like	
  5/6th)
Property	
  Graph	
  Data	
  Model	
  (Movies)
RDF	
  Data	
  Model	
  (Movies)
Property	
  Graph	
  Vs	
  Triple	
  Store
• Property	
  Graph	
  is	
  a	
  more	
  generic	
  case	
  of	
  the	
  Triple	
  Store	
  
• Lack	
  of	
  properties	
  on	
  relationships	
  for	
  Triple	
  Stores	
  reduce	
  (	
  or	
  
complicate)	
  their	
  expressive	
  power
Query	
  Languages
• Graph	
  Databases:	
  
• Cypher	
  -­‐	
  declarative,	
  pattern	
  
matching,	
  easy	
  to	
  understand	
  
• Gremlin	
  -­‐	
  imperative,	
  step	
  
driven,	
  math	
  inspired	
  
• Native	
  APIs	
  (Java,	
  REST)
• Triple	
  Stores:	
  
• SPARQL	
  (standard)	
  
• PROLOG	
  (or	
  prolog-­‐like	
  
languages)
General	
  Use	
  Cases
• Graph	
  Databases:	
  
• Local	
  Queries	
  (anchor	
  on	
  a	
  
node	
  or	
  set	
  of	
  nodes	
  then	
  
traverse)	
  
• Realtime	
  (<20ms)	
  requirements	
  
• Complex,	
  deep	
  traversals	
  
• Flexible	
  graph	
  models
• Triple	
  Stores:	
  
• Global	
  Queries	
  (find	
  pattern	
  in	
  
large	
  volume	
  of	
  information)	
  
• Browsing	
  Content	
  
• Inference	
  Discovery
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Flight	
  Data?
How	
  do	
  you	
  model	
  Comic	
  Books?
How	
  do	
  you	
  model	
  a	
  world	
  where	
  anything	
  can	
  happen?
Graph	
  Databases	
  allow	
  Model	
  Flexibility
https://vimeo.com/79399404
Watch	
  the	
  presentation	
  at:
Java	
  CORE	
  API
Direct	
  access	
  to	
  Nodes	
  and	
  
Relationships
Java	
  Core	
  API
• Step	
  by	
  Step	
  from	
  GraphDatabaseService	
  
• Start	
  a	
  transaction	
  (reads	
  and	
  writes)	
  
• findNode(Label,	
  Property,	
  Value)	
  
• findNodes(Label,	
  Property,	
  Value)	
  
• findNodes(Label)	
  
• getNodeById(Long)	
  	
  
• getRelationships(Direction,	
  Type)	
  
• getProperty(Property,	
  (optional)	
  Default	
  Value)
Example	
  (get	
  the	
  friends	
  of	
  a	
  user)
Traversal	
  API
Describe	
  Traversals
Traversal	
  API
• Start	
  with	
  the	
  Simple	
  Defaults	
  (order,	
  relationships,	
  
depth,	
  uniqueness,	
  etc)	
  
• Custom	
  Expanders	
  
• Where	
  should	
  I	
  go	
  next	
  
• Custom	
  Evaluators	
  
• I’ve	
  gone	
  there…	
  should	
  I	
  accept	
  this	
  path?
Traversal	
  API	
  Example
Cypher	
  Query	
  Language
ASCII	
  Art	
  Pattern	
  Matching
Cypher:	
  Powerful	
  and	
  Expressive	
  Query	
  Language
MATCH	
  (:Person	
  {	
  name:“Dan”}	
  )	
  -­‐[:LOVES]-­‐>	
  (:Person	
  {	
  name:“Ann”}	
  )	
  
LOVES
Dan Ann
Label Property Label Property
Node Node
MATCH	
  (boss)-­‐[:MANAGES*0..3]-­‐>(sub),	
  
	
  	
  	
  	
  	
  	
  (sub)-­‐[:MANAGES*1..3]-­‐>(report)	
  
WHERE	
  boss.name	
  =	
  “John	
  Doe”	
  
RETURN	
  sub.name	
  AS	
  Subordinate,	
  

	
  	
  count(report)	
  AS	
  Total
Express	
  Complex	
  Queries	
  Easily	
  with	
  Cypher
Find	
  all	
  direct	
  reports	
  and	
  

how	
  many	
  people	
  they	
  manage,	
  

up	
  to	
  3	
  levels	
  down
Cypher	
  QuerySQL	
  Query
Hello	
  World	
  Recommendation
Hello	
  World	
  Recommendation
Movie	
  Data	
  Model
Cypher	
  Query:	
  Movie	
  Recommendation
MATCH	
  (watched:Movie	
  {title:"Toy	
  Story”})	
  <-­‐[r1:RATED]-­‐	
  ()	
  -­‐[r2:RATED]-­‐>	
  (unseen:Movie)	
  
WHERE	
  r1.rating	
  >	
  7	
  AND	
  r2.rating	
  >	
  7	
  
AND	
  watched.genres	
  =	
  unseen.genres	
  
AND	
  NOT(	
  (:Person	
  {username:”maxdemarzi"})	
  -­‐[:RATED|WATCHED]-­‐>	
  (unseen)	
  )	
  
RETURN	
  unseen.title,	
  COUNT(*)	
  
ORDER	
  BY	
  COUNT(*)	
  DESC	
  
LIMIT	
  25
What	
  are	
  the	
  Top	
  25	
  Movies	
  
• that	
  I	
  haven't	
  seen	
  
• with	
  the	
  same	
  genres	
  as	
  Toy	
  Story	
  	
  
• given	
  high	
  ratings	
  
• by	
  people	
  who	
  liked	
  Toy	
  Story
Movie	
  Data	
  Model
Cypher	
  Query:	
  k-­‐NN	
  Recommendation
MATCH	
  (m:Movie)	
  <-­‐[r:RATED]-­‐	
  (b:Person)	
  -­‐[s:SIMILARITY]-­‐	
  (p:Person	
  {name:'Zoltan	
  Varju'})	
  
WHERE	
  NOT(	
  (p)	
  -­‐[:RATED|WATCHED]-­‐>	
  (m)	
  )	
  
WITH	
  m,	
  s.similarity	
  AS	
  similarity,	
  r.rating	
  AS	
  rating	
  
ORDER	
  BY	
  m.name,	
  similarity	
  DESC	
  
WITH	
  m.name	
  AS	
  movie,	
  COLLECT(rating)[0..3]	
  AS	
  ratings	
  
WITH	
  movie,	
  REDUCE(s	
  =	
  0,	
  i	
  IN	
  ratings	
  |	
  s	
  +	
  i)*1.0	
  /	
  LENGTH(ratings)	
  AS	
  recommendation	
  
ORDER	
  BY	
  recommendation	
  DESC	
  
RETURN	
  movie,	
  recommendation

LIMIT	
  25
What	
  are	
  the	
  Top	
  25	
  Movies	
  
• that	
  Zoltan	
  Varju	
  has	
  not	
  seen	
  
• using	
  the	
  average	
  rating	
  
• by	
  my	
  top	
  3	
  neighbors	
  
Neo4j	
  Interface
Server,	
  Service,	
  Library
High	
  Speed	
  Fraud	
  -­‐	
  1000	
  R/S
http://maxdemarzi.com/2014/02/12/online-­‐payment-­‐risk-­‐management-­‐with-­‐neo4j/	
  
High	
  Speed	
  Fraud	
  -­‐	
  8000	
  R/S
http://maxdemarzi.com/2014/02/27/neo4j-­‐at-­‐ludicrous-­‐speed/
High	
  Speed	
  Fraud	
  -­‐	
  28000	
  R/S
http://maxdemarzi.com/2014/03/10/its-­‐over-­‐9000-­‐neo4j-­‐on-­‐websockets/
Neo4j
Additional	
  Features
Neo4j	
  Clustering	
  

Architecture	
  Optimized	
  for	
  Speed	
  &	
  Availability	
  at	
  Scale
57
Performance	
  Benefits:	
  
• No	
  network	
  hops	
  within	
  queries	
  
• Real-­‐time	
  operations	
  with	
  fast	
  and	
  
consistent	
  response	
  times	
  	
  
• Cache	
  sharding	
  spreads	
  cache	
  across	
  
cluster	
  for	
  very	
  large	
  graphs
Clustering	
  Features:	
  
• Master-­‐slave	
  replication	
  with	
  

master	
  re-­‐election	
  and	
  failover	
  	
  
• Each	
  instance	
  has	
  its	
  own	
  local	
  cache	
  
• Horizontal	
  scaling	
  &	
  disaster	
  recovery
Load	
  Balancer
Neo4jNeo4jNeo4j
Getting	
  Data	
  into	
  Neo4j
Cypher-­‐Based	
  “LOAD	
  CSV”	
  Capability	
  
• Transactional	
  (ACID)	
  writes	
  
• Initial	
  and	
  incremental	
  loads	
  of	
  up	
  to	
  

10	
  million	
  nodes	
  and	
  relationships	
  
Command-­‐Line	
  Bulk	
  Loader	
  	
  	
  	
  neo4j-­‐import	
  
• For	
  initial	
  database	
  population	
  
• For	
  loads	
  with	
  10B+	
  records	
  
• Up	
  to	
  1M	
  records	
  per	
  second
	
  4.58	
  million	
  things	
  
and	
  their	
  relationships…	
  
Loads	
  in	
  100	
  seconds!
Databases
Data	
  Storage	
  and

Business	
  Rules	
  Execution
Data	
  Mining	
  

and	
  Aggregation
Neo4j	
  Fits	
  into	
  Your	
  Enterprise	
  Environment
Application
Graph	
  Database	
  Cluster
Neo4j Neo4j Neo4j
Ad	
  Hoc

Analysis
ETL
Bulk	
  Analytic

Infrastructure

Graph	
  Compute	
  Engine

Hadoop	
  	
  	
  EDW	
  	
  	
  …
ETL
Data	
  
Scientist
End	
  User
Value	
  from	
  Relationships	
  –	
  Common	
  Use	
  Cases
Internal	
  Applications	
  
Master	
  Data	
  Management	
  	
  
Network	
  and	
  IT	
  

Operations	
  
Fraud	
  Detection
Customer-­‐Facing	
  Applications	
  
Real-­‐time	
  Recommendations	
  
Graph-­‐based	
  Search	
  
Identity	
  and	
  

Access	
  Management
Open	
  Corporates
Uses	
  Neo4j
Open	
  Corporates
Open	
  Corporates
Uses	
  Neo4j
https://skillsmatter.com/skillscasts/4097-­‐case-­‐study-­‐how-­‐opencorporates-­‐uses-­‐neo4j-­‐to-­‐provide-­‐insight
Open	
  Source	
  Examples
http://maxdemarzi.com/2012/10/18/matches-
are-the-new-hotness/
What	
  are	
  the	
  Top	
  10	
  Jobs	
  for	
  me	
  
• that	
  are	
  in	
  the	
  same	
  location	
  I’m	
  in	
  
• for	
  which	
  I	
  have	
  the	
  necessary	
  qualifications
Partial	
  Subgraph	
  Search
Recommend	
  Love
Find	
  your	
  soulmate	
  in	
  the	
  graph	
  	
  
• Are	
  they	
  energetic?	
  
• Do	
  they	
  like	
  dogs?	
  
• Have	
  a	
  good	
  sense	
  of	
  humor?	
  
• Neat	
  and	
  tidy,	
  but	
  not	
  crazy	
  about	
  it?
What	
  are	
  the	
  Top	
  10	
  Potential	
  Mates	
  for	
  me	
  
• that	
  are	
  in	
  the	
  same	
  location	
  
• are	
  sexually	
  compatible	
  
• have	
  traits	
  I	
  want	
  	
  
• want	
  traits	
  I	
  have
Love	
  Recommendation
Two	
  Party	
  Partial	
  Subgraph	
  Search
http://maxdemarzi.com/2013/04/19/match-making-with-neo4j/
Real-­‐Time	
  Recommendations	
  with	
  Neo4j
Social

Recommendations
Products	
  

and	
  Services
Content Routing
Walmart	
  	
  	
  	
  BUSINESS	
  CASE
World’s	
  largest	
  company

by	
  revenue	
  
World’s	
  largest	
  retailer	
  and	
  
private	
  employer	
  
SF-­‐based	
  global	
  

e-­‐commerce	
  division	
  
manages	
  several	
  websites	
  
Found	
  in	
  1969

Bentonville,	
  Arkansas	
  
• Needed	
  online	
  customer	
  recommendations	
  to	
  
keep	
  pace	
  with	
  competition	
  
• Data	
  connections	
  provided	
  predictive	
  context,	
  but	
  
were	
  not	
  in	
  a	
  usable	
  format	
  
• Solution	
  had	
  to	
  serve	
  many	
  millions	
  of	
  customers	
  
and	
  products	
  while	
  maintaining	
  superior	
  
scalability	
  and	
  performance
Walmart	
  	
  	
  	
  SOLUTION
• Brings	
  customers,	
  preferences,	
  purchases,	
  
products	
  and	
  locations	
  into	
  a	
  graph	
  model	
  
• Uses	
  connections	
  to	
  make	
  product	
  
recommendations	
  
• Solution	
  deployed	
  across	
  WalMart	
  

divisions	
  and	
  websites
Global	
  Courier	
  	
  	
  	
  BUSINESS	
  CASE
World’s	
  largest	
  courier	
  
480,000	
  employees

€55	
  billion	
  in	
  revenue	
  	
  
Needed	
  new	
  

B2C	
  and	
  B2B	
  parcel	
  routing	
  
system	
  for	
  its	
  logistics	
  
practice	
  
Legacy	
  system	
  neither	
  
supported	
  the	
  full	
  network	
  
nor	
  the	
  shift	
  to	
  online	
  
demands
Needed	
  to	
  replace	
  aging	
  B2B	
  and	
  B2C	
  parcel	
  routing	
  
system	
  whose	
  requirements	
  include:	
  
• 24x7	
  availability	
  
• Peak	
  loads	
  of	
  5M	
  parcels	
  per	
  day,	
  3K	
  per	
  second	
  
• Support	
  for	
  complex	
  and	
  diverse	
  software	
  stack	
  
• Predictable	
  performance	
  with	
  linear	
  scalability	
  
• Daily	
  changes	
  to	
  logistics	
  networks	
  
• Route	
  from	
  any	
  point	
  to	
  any	
  point	
  
• Single	
  point	
  of	
  truth	
  for	
  entire	
  network
Global	
  Courier	
  	
  	
  	
  SOLUTION
Neo4j	
  provides	
  the	
  ideal	
  domain	
  fit	
  since	
  

a	
  logistics	
  network	
  is	
  a	
  graph	
  
• High	
  availability	
  and	
  performance	
  via	
  Neo4j	
  
clustering	
  
• Greatly	
  simplified	
  Cypher	
  queries	
  for	
  routing	
  
versus	
  relational	
  SQL	
  queries	
  
• Flexible	
  data	
  model	
  that	
  reflects	
  the	
  real	
  
logistics	
  world	
  far	
  better	
  than	
  relational	
  
• Easy-­‐to-­‐grasp	
  whiteboard-­‐friendly	
  model
eBay	
  	
  	
  	
  BUSINESS	
  CASE
C2C	
  and	
  B2C

retail	
  network	
  
Full	
  e-­‐commerce	
  
functionality	
  for	
  individuals	
  
and	
  businesses	
  
Integrated	
  with	
  logistics	
  
vendors	
  for	
  product	
  
deliveries
• Needed	
  an	
  offering	
  to	
  compete	
  with	
  

Amazon	
  Prime	
  
• Enable	
  customer-­‐selected	
  delivery	
  inside	
  

90	
  minutes	
  
• Calculate	
  best	
  route	
  option	
  in	
  real-­‐time	
  
• Scale	
  to	
  enable	
  a	
  variety	
  of	
  services	
  
• Offer	
  more	
  predictable	
  delivery	
  times
eBay	
  Now	
  	
  	
  	
  	
  SOLUTION
• Acquired	
  UK-­‐based	
  Shutl.	
  a	
  leader	
  
in	
  same-­‐day	
  delivery	
  
• Used	
  Neo4j	
  to	
  create	
  eBay	
  Now	
  
• 1000	
  times	
  faster	
  than	
  the	
  prior	
  

MySQL-­‐based	
  solution	
  
• Faster	
  time-­‐to-­‐market	
  
• Improved	
  code	
  quality	
  with	
  

10	
  to	
  100	
  times	
  less	
  query	
  code
Classmates	
  	
  	
  	
  BUSINESS	
  CASE
Online	
  yearbook	
  
connecting	
  friends	
  from	
  
school,	
  work	
  and	
  military	
  
in	
  US	
  and	
  Canada	
  
Founded	
  as	
  

Memory	
  Lane	
  in	
  Seattle	
  
Develop	
  new	
  social	
  networking	
  capabilities	
  to	
  
monetize	
  yearbook-­‐related	
  offerings	
  
• Show	
  all	
  the	
  people	
  I	
  know	
  in	
  a	
  yearbook	
  
• Show	
  yearbooks	
  my	
  friends	
  appear	
  in	
  most	
  often	
  
• Show	
  sections	
  of	
  a	
  yearbook	
  that	
  my	
  friends	
  
appear	
  most	
  in	
  
• Show	
  me	
  other	
  schools	
  my	
  friends	
  attended
Classmates	
  	
  	
  	
  SOLUTION
Neo4j	
  provides	
  a	
  robust	
  and	
  scalable	
  graph	
  
database	
  solution	
  
• 3-­‐instance	
  cluster	
  with	
  cache	
  sharding	
  and	
  
disaster-­‐recovery	
  
• 18ms	
  response	
  time	
  for	
  top	
  4	
  queries	
  
• 100M	
  nodes	
  and	
  600M	
  relationships	
  in	
  
initial	
  graph—including	
  people,	
  images,	
  
schools,	
  yearbooks	
  and	
  pages	
  
• Projected	
  to	
  grow	
  to	
  1B	
  nodes	
  and	
  6B	
  
relationships
National	
  Geographic	
  	
  	
  	
  BUSINESS	
  CASE
Non-­‐profit	
  scientific	
  and	
  
educational	
  institution	
  
founded	
  in	
  1888	
  
Covers	
  geography,	
  
archaeology,	
  natural	
  science,	
  
environment	
  and	
  historical	
  
conservation	
  
Journals,	
  online	
  media,	
  

radio,	
  TV,	
  documentaries,	
  

live	
  events	
  and	
  consumer	
  
content	
  and	
  goods
• Improve	
  poor	
  performance	
  of	
  PostgreSQL	
  app	
  
• Increase	
  user	
  engagement	
  by	
  linking	
  to	
  100+	
  years	
  
of	
  multimedia	
  content	
  	
  
• Improve	
  targeting	
  by	
  understand	
  subscribers’	
  
interests	
  better	
  
• Recommend	
  content	
  and	
  services	
  to	
  users	
  based	
  
on	
  their	
  interests
National	
  Geographic	
  	
  	
  	
  SOLUTION
• Enabled	
  complex	
  real-­‐time	
  analytics	
  across	
  
eight	
  million	
  users	
  and	
  a	
  century	
  of	
  content	
  
• Delivered	
  robust	
  performance	
  by	
  eliminating	
  
triple-­‐nested	
  SQL	
  joins	
  	
  
• Cross-­‐refers	
  users	
  among	
  content,	
  live	
  events,	
  
travel,	
  goods	
  and	
  causes	
  
• Neo4j	
  solution	
  much	
  less	
  cumbersome	
  

and	
  easier	
  to	
  maintain	
  than	
  previous	
  

SQL	
  system
Curaspan	
  	
  	
  	
  BUSINESS	
  CASE
Leader	
  in	
  patient	
  
management	
  for	
  discharges	
  
and	
  referrals	
  
Manages	
  patient	
  referrals	
  
4600+	
  health	
  care	
  facilities	
  
Connects	
  providers,	
  payers	
  
via	
  web-­‐based	
  patient	
  
management	
  platform	
  
Founded	
  in	
  1999	
  in	
  
Newton,	
  Massachusetts
• Improve	
  poor	
  performance	
  of	
  Oracle	
  solution	
  
• Support	
  more	
  complexity	
  including	
  granular,	
  

role-­‐based	
  access	
  control	
  
• Satisfy	
  complex	
  Graph	
  Search	
  queries	
  by	
  discharge	
  
nurses	
  and	
  intake	
  coordinators	
  
Find	
  a	
  skilled	
  nursing	
  facility	
  within	
  n	
  miles	
  of	
  a	
  
given	
  location,	
  belonging	
  to	
  health	
  care	
  group	
  
XYZ,	
  offering	
  speech	
  therapy	
  and	
  cardiac	
  care,	
  
and	
  optionally	
  Italian	
  language	
  services
Curaspan	
  	
  	
  	
  SOLUTION
• Met	
  fast,	
  real-­‐time	
  performance	
  demands	
  
• Supported	
  queries	
  span	
  multiple	
  hierarchies	
  
including	
  provider	
  and	
  employee-­‐permissions	
  
graphs	
  
• Improved	
  data	
  model	
  to	
  handle	
  adding	
  more	
  
dimensions	
  to	
  the	
  data	
  such	
  as	
  insurance	
  
networks,	
  service	
  areas	
  and	
  care	
  organizations	
  
• Greatly	
  simplified	
  queries,	
  simplifying	
  

multi-­‐page	
  SQL	
  statements	
  into	
  one	
  

Neo4j	
  function
FiftyThree	
  	
  	
  BUSINESS	
  CASE
Maker	
  of	
  Paper,	
  

one	
  of	
  the	
  top	
  apps	
  

in	
  Apple’s	
  App	
  Store,	
  with	
  
millions	
  of	
  users	
  
Based	
  in	
  New	
  York	
  City
• Add	
  social	
  capabilities	
  to	
  digital-­‐paper	
  app	
  
• Support	
  social	
  collaboration	
  across	
  millions	
  of	
  
users	
  in	
  new	
  Mix	
  app	
  
• Enable	
  seamless	
  interaction	
  between	
  social	
  
and	
  content-­‐asset	
  networks	
  
• Ensure	
  new	
  apps	
  are	
  robust,	
  scalable	
  and	
  fast
FiftyThree	
  	
  	
  	
  SOLUTION
• Neo4j	
  data	
  model	
  ideal	
  for	
  social	
  network,	
  content	
  
management	
  and	
  access	
  control	
  
• Users	
  create,	
  publish	
  and	
  share	
  designs	
  simply	
  
• Easy	
  to	
  develop	
  and	
  evolve	
  Neo4j-­‐based	
  app	
  
• Integrates	
  well	
  with	
  FiftyThree	
  EC2	
  architecture	
  
See	
  the	
  Neo4j	
  solution	
  in	
  action	
  
Betting	
  the	
  Company	
  (Literally)	
  on	
  a	
  Graph	
  Database

http://aseemk.com/talks/neo4j-­‐lessons-­‐learned#/
App	
  Store	
  Editor’s	
  Choice

2012	
  iPad	
  App	
  of	
  Year

Apple	
  Best	
  Apps	
  of	
  2014
Users	
  Love	
  Neo4j
jQuery	
  Inventor Heroku	
  Founder
THANK	
  YOU

Contenu connexe

Tendances

Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j
 
Base de données graphe et Neo4j
Base de données graphe et Neo4jBase de données graphe et Neo4j
Base de données graphe et Neo4jBoris Guarisma
 
RDBMS to Graph
RDBMS to GraphRDBMS to Graph
RDBMS to GraphNeo4j
 
Neo4j 4.1 overview
Neo4j 4.1 overviewNeo4j 4.1 overview
Neo4j 4.1 overviewNeo4j
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewNeo4j
 
The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfNeo4j
 
Neo4j 4 Overview
Neo4j 4 OverviewNeo4j 4 Overview
Neo4j 4 OverviewNeo4j
 
Intro to Cypher
Intro to CypherIntro to Cypher
Intro to CypherNeo4j
 
Introduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainIntroduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainNeo4j
 
Neo4j Popular use case
Neo4j Popular use case Neo4j Popular use case
Neo4j Popular use case Neo4j
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j PresentationMax De Marzi
 
Introducing Change Data Capture with Debezium
Introducing Change Data Capture with DebeziumIntroducing Change Data Capture with Debezium
Introducing Change Data Capture with DebeziumChengKuan Gan
 
Data Science Across Data Sources with Apache Arrow
Data Science Across Data Sources with Apache ArrowData Science Across Data Sources with Apache Arrow
Data Science Across Data Sources with Apache ArrowDatabricks
 
NoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereNoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereEugene Hanikblum
 
Introduction to Neo4j
Introduction to Neo4jIntroduction to Neo4j
Introduction to Neo4jNeo4j
 
Democratizing Data at Airbnb
Democratizing Data at AirbnbDemocratizing Data at Airbnb
Democratizing Data at AirbnbNeo4j
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j FundamentalsMax De Marzi
 
Neo4j Graph Use Cases, Bruno Ungermann, Neo4j
Neo4j Graph Use Cases, Bruno Ungermann, Neo4jNeo4j Graph Use Cases, Bruno Ungermann, Neo4j
Neo4j Graph Use Cases, Bruno Ungermann, Neo4jNeo4j
 

Tendances (20)

Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
 
Base de données graphe et Neo4j
Base de données graphe et Neo4jBase de données graphe et Neo4j
Base de données graphe et Neo4j
 
RDBMS to Graph
RDBMS to GraphRDBMS to Graph
RDBMS to Graph
 
Neo4j 4.1 overview
Neo4j 4.1 overviewNeo4j 4.1 overview
Neo4j 4.1 overview
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j Overview
 
The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
 
Neo4j 4 Overview
Neo4j 4 OverviewNeo4j 4 Overview
Neo4j 4 Overview
 
Intro to Cypher
Intro to CypherIntro to Cypher
Intro to Cypher
 
Introduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & BahrainIntroduction to Neo4j for the Emirates & Bahrain
Introduction to Neo4j for the Emirates & Bahrain
 
Neo4j Popular use case
Neo4j Popular use case Neo4j Popular use case
Neo4j Popular use case
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 
Graph databases
Graph databasesGraph databases
Graph databases
 
Introducing Change Data Capture with Debezium
Introducing Change Data Capture with DebeziumIntroducing Change Data Capture with Debezium
Introducing Change Data Capture with Debezium
 
Data Science Across Data Sources with Apache Arrow
Data Science Across Data Sources with Apache ArrowData Science Across Data Sources with Apache Arrow
Data Science Across Data Sources with Apache Arrow
 
NoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and WhereNoSQL Graph Databases - Why, When and Where
NoSQL Graph Databases - Why, When and Where
 
Nifi workshop
Nifi workshopNifi workshop
Nifi workshop
 
Introduction to Neo4j
Introduction to Neo4jIntroduction to Neo4j
Introduction to Neo4j
 
Democratizing Data at Airbnb
Democratizing Data at AirbnbDemocratizing Data at Airbnb
Democratizing Data at Airbnb
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
Neo4j Graph Use Cases, Bruno Ungermann, Neo4j
Neo4j Graph Use Cases, Bruno Ungermann, Neo4jNeo4j Graph Use Cases, Bruno Ungermann, Neo4j
Neo4j Graph Use Cases, Bruno Ungermann, Neo4j
 

Similaire à Neo4j in Depth

Neo4j GraphDay Seattle- Sept19- in the enterprise
Neo4j GraphDay Seattle- Sept19-  in the enterpriseNeo4j GraphDay Seattle- Sept19-  in the enterprise
Neo4j GraphDay Seattle- Sept19- in the enterpriseNeo4j
 
Graphs fun vjug2
Graphs fun vjug2Graphs fun vjug2
Graphs fun vjug2Neo4j
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to GraphsNeo4j
 
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4j
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4jNeo4j GraphTalks - Introduction to GraphDatabases and Neo4j
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4jNeo4j
 
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4j
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4jNeo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4j
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4jNeo4j
 
Neo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperativeNeo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperativeNeo4j
 
GraphTour 2020 - Neo4j: What's New?
GraphTour 2020 - Neo4j: What's New?GraphTour 2020 - Neo4j: What's New?
GraphTour 2020 - Neo4j: What's New?Neo4j
 
The Connected Data Imperative: An Introduction to Neo4j
The Connected Data Imperative: An Introduction to Neo4jThe Connected Data Imperative: An Introduction to Neo4j
The Connected Data Imperative: An Introduction to Neo4jNeo4j
 
Digital Transformation in a Connected World
Digital Transformation in a Connected WorldDigital Transformation in a Connected World
Digital Transformation in a Connected WorldNeo4j
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)barcelonajug
 
GraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyGraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyNeo4j
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jNeo4j
 
Neo4j GraphTalk Oslo - Introduction to Graphs
Neo4j GraphTalk Oslo - Introduction to GraphsNeo4j GraphTalk Oslo - Introduction to Graphs
Neo4j GraphTalk Oslo - Introduction to GraphsNeo4j
 
A Connections-first Approach to Supply Chain Optimization
A Connections-first Approach to Supply Chain OptimizationA Connections-first Approach to Supply Chain Optimization
A Connections-first Approach to Supply Chain OptimizationNeo4j
 
Neo4j: What's Under the Hood & How Knowing This Can Help You
Neo4j: What's Under the Hood & How Knowing This Can Help You Neo4j: What's Under the Hood & How Knowing This Can Help You
Neo4j: What's Under the Hood & How Knowing This Can Help You Neo4j
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewNeo4j
 
Agile Data Rationalization for Operational Intelligence
Agile Data Rationalization for Operational IntelligenceAgile Data Rationalization for Operational Intelligence
Agile Data Rationalization for Operational IntelligenceInside Analysis
 
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...Perficient, Inc.
 
Mastering Customer Data on Apache Spark
Mastering Customer Data on Apache SparkMastering Customer Data on Apache Spark
Mastering Customer Data on Apache SparkCaserta
 

Similaire à Neo4j in Depth (20)

Neo4j GraphDay Seattle- Sept19- in the enterprise
Neo4j GraphDay Seattle- Sept19-  in the enterpriseNeo4j GraphDay Seattle- Sept19-  in the enterprise
Neo4j GraphDay Seattle- Sept19- in the enterprise
 
Graphs fun vjug2
Graphs fun vjug2Graphs fun vjug2
Graphs fun vjug2
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to Graphs
 
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4j
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4jNeo4j GraphTalks - Introduction to GraphDatabases and Neo4j
Neo4j GraphTalks - Introduction to GraphDatabases and Neo4j
 
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4j
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4jNeo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4j
Neo4j GraphTalks Oslo - Graph Your Business - Rik Van Bruggen, Neo4j
 
Neo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperativeNeo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperative
 
GraphTour 2020 - Neo4j: What's New?
GraphTour 2020 - Neo4j: What's New?GraphTour 2020 - Neo4j: What's New?
GraphTour 2020 - Neo4j: What's New?
 
The Connected Data Imperative: An Introduction to Neo4j
The Connected Data Imperative: An Introduction to Neo4jThe Connected Data Imperative: An Introduction to Neo4j
The Connected Data Imperative: An Introduction to Neo4j
 
Digital Transformation in a Connected World
Digital Transformation in a Connected WorldDigital Transformation in a Connected World
Digital Transformation in a Connected World
 
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)Introduction to Graph databases and Neo4j (by Stefan Armbruster)
Introduction to Graph databases and Neo4j (by Stefan Armbruster)
 
GraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right TechnologyGraphTalks Rome - Selecting the right Technology
GraphTalks Rome - Selecting the right Technology
 
GraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4jGraphTalks Rome - Introducing Neo4j
GraphTalks Rome - Introducing Neo4j
 
Neo4j GraphTalk Oslo - Introduction to Graphs
Neo4j GraphTalk Oslo - Introduction to GraphsNeo4j GraphTalk Oslo - Introduction to Graphs
Neo4j GraphTalk Oslo - Introduction to Graphs
 
A Connections-first Approach to Supply Chain Optimization
A Connections-first Approach to Supply Chain OptimizationA Connections-first Approach to Supply Chain Optimization
A Connections-first Approach to Supply Chain Optimization
 
Neo4j: What's Under the Hood & How Knowing This Can Help You
Neo4j: What's Under the Hood & How Knowing This Can Help You Neo4j: What's Under the Hood & How Knowing This Can Help You
Neo4j: What's Under the Hood & How Knowing This Can Help You
 
GraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform OverviewGraphTour - Neo4j Platform Overview
GraphTour - Neo4j Platform Overview
 
Agile Data Rationalization for Operational Intelligence
Agile Data Rationalization for Operational IntelligenceAgile Data Rationalization for Operational Intelligence
Agile Data Rationalization for Operational Intelligence
 
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...
Big Data Open Source Tools and Trends: Enable Real-Time Business Intelligence...
 
Semantics and Machine Learning
Semantics and Machine LearningSemantics and Machine Learning
Semantics and Machine Learning
 
Mastering Customer Data on Apache Spark
Mastering Customer Data on Apache SparkMastering Customer Data on Apache Spark
Mastering Customer Data on Apache Spark
 

Plus de Max De Marzi

DataDay 2023 Presentation
DataDay 2023 PresentationDataDay 2023 Presentation
DataDay 2023 PresentationMax De Marzi
 
DataDay 2023 Presentation - Notes
DataDay 2023 Presentation - NotesDataDay 2023 Presentation - Notes
DataDay 2023 Presentation - NotesMax De Marzi
 
Developer Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker NotesDeveloper Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker NotesMax De Marzi
 
Outrageous Ideas for Graph Databases
Outrageous Ideas for Graph DatabasesOutrageous Ideas for Graph Databases
Outrageous Ideas for Graph DatabasesMax De Marzi
 
Neo4j Training Cypher
Neo4j Training CypherNeo4j Training Cypher
Neo4j Training CypherMax De Marzi
 
Neo4j Training Modeling
Neo4j Training ModelingNeo4j Training Modeling
Neo4j Training ModelingMax De Marzi
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training IntroductionMax De Marzi
 
Detenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4jDetenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4jMax De Marzi
 
Data Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4jData Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4jMax De Marzi
 
Fraud Detection and Neo4j
Fraud Detection and Neo4j Fraud Detection and Neo4j
Fraud Detection and Neo4j Max De Marzi
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4jMax De Marzi
 
Neo4j Data Science Presentation
Neo4j Data Science PresentationNeo4j Data Science Presentation
Neo4j Data Science PresentationMax De Marzi
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Max De Marzi
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Max De Marzi
 
Decision Trees in Neo4j
Decision Trees in Neo4jDecision Trees in Neo4j
Decision Trees in Neo4jMax De Marzi
 
Neo4j y Fraude Spanish
Neo4j y Fraude SpanishNeo4j y Fraude Spanish
Neo4j y Fraude SpanishMax De Marzi
 
Data modeling with neo4j tutorial
Data modeling with neo4j tutorialData modeling with neo4j tutorial
Data modeling with neo4j tutorialMax De Marzi
 
Fraud Detection Class Slides
Fraud Detection Class SlidesFraud Detection Class Slides
Fraud Detection Class SlidesMax De Marzi
 
Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015Max De Marzi
 
What Finance can learn from Dating Sites
What Finance can learn from Dating SitesWhat Finance can learn from Dating Sites
What Finance can learn from Dating SitesMax De Marzi
 

Plus de Max De Marzi (20)

DataDay 2023 Presentation
DataDay 2023 PresentationDataDay 2023 Presentation
DataDay 2023 Presentation
 
DataDay 2023 Presentation - Notes
DataDay 2023 Presentation - NotesDataDay 2023 Presentation - Notes
DataDay 2023 Presentation - Notes
 
Developer Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker NotesDeveloper Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker Notes
 
Outrageous Ideas for Graph Databases
Outrageous Ideas for Graph DatabasesOutrageous Ideas for Graph Databases
Outrageous Ideas for Graph Databases
 
Neo4j Training Cypher
Neo4j Training CypherNeo4j Training Cypher
Neo4j Training Cypher
 
Neo4j Training Modeling
Neo4j Training ModelingNeo4j Training Modeling
Neo4j Training Modeling
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training Introduction
 
Detenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4jDetenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4j
 
Data Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4jData Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4j
 
Fraud Detection and Neo4j
Fraud Detection and Neo4j Fraud Detection and Neo4j
Fraud Detection and Neo4j
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4j
 
Neo4j Data Science Presentation
Neo4j Data Science PresentationNeo4j Data Science Presentation
Neo4j Data Science Presentation
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
Decision Trees in Neo4j
Decision Trees in Neo4jDecision Trees in Neo4j
Decision Trees in Neo4j
 
Neo4j y Fraude Spanish
Neo4j y Fraude SpanishNeo4j y Fraude Spanish
Neo4j y Fraude Spanish
 
Data modeling with neo4j tutorial
Data modeling with neo4j tutorialData modeling with neo4j tutorial
Data modeling with neo4j tutorial
 
Fraud Detection Class Slides
Fraud Detection Class SlidesFraud Detection Class Slides
Fraud Detection Class Slides
 
Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015
 
What Finance can learn from Dating Sites
What Finance can learn from Dating SitesWhat Finance can learn from Dating Sites
What Finance can learn from Dating Sites
 

Dernier

ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 

Dernier (20)

ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 

Neo4j in Depth

  • 1. Neo4j  in  Depth Max  De  Marzi
  • 2. About  Me • Max  De  Marzi  -­‐  Neo4j  Field  Engineer     • My  Blog:  http://maxdemarzi.com   • Find  me  on  Twitter:  @maxdemarzi   • Email  me:  maxdemarzi@gmail.com   • GitHub:  http://github.com/maxdemarzi
  • 6.
  • 7. The  Problem • all JOINs are executed every time you query (traverse) the relationship •  executing a JOIN means to search for a key in another table •  with Indices executing a JOIN means to lookup a key •  B-Tree Index: O(log(n)) •  more entries => more lookups => slower JOINs
  • 8. People ConferencesAttend 143 Max 326 Big Data Tech Con 725 NoSQL Now 981 Chariot Data IO143 981 143 725 143 326
  • 9. Max Big Data Tech Con NoSQL Now Chariot Data IO 143 326 725 981 143 981 143 725 143 326
  • 10. uid: MDM name: Max uid: BDTC where: Burlinggame uid: NSN where: San Francisco uid: CDIO where: Philadelphia Nodes Relationships member member member A Property Graph
  • 11. Neo4j  Secret  Sauce • Pointers instead of look-ups • Fixed sized records for fast access • Do all your “Joining” on creation • Spin spin spin through this data structure
  • 12. Relational  Databases  Can’t  Handle  Relationships  Well • Cannot  model  or  store  data  and  relationships   without  complexity   • Performance  degrades  with  number  &  levels  of   relationships,  and  database  size   • Query  complexity  grows  with  need  for  JOINs   • Adding  new  types  of    data  and  relationships   requires  schema  redesign,  increasing  time  to   market   …  making  traditional  databases  inappropriate  when   relationships  are  valuable  in  real-­‐time Slow  development
 Poor  performance
 Low  scalability
 Hard  to  maintain
  • 13. NoSQL  Databases  Don’t  Handle  Relationships • No  data  structures  to  model  or  store   relationships   • No  query  constructs  to  support   relationships   • Relating  data  requires  “JOIN  logic”  in  the   application   • No  ACID  support  for  transactions   …  making  NoSQL  databases  inappropriate  when   relationships  are  valuable  in  real-­‐time
  • 14. Real-­‐Time  Query  Performance
 Performance  must  hold  steady  with  scale Connectedness  and  Size  of  Data  Set Response  Time 0  to  2  hops
 0  to  3  degrees
 Thousands  of  connections Tens  to  hundreds  of  hops
 Thousands  of  degrees
 Billions    of  connections Relational  and
 Other  NoSQL
 Databases Neo4j Neo4j  is  
 1000x  faster
 Reduces  minutes  
 to  milliseconds
  • 15. Re-­‐Imagine  Your  Data  as  a  Graph Neo4j  is  an  enterprise-­‐grade  graph   database  that  enables  you  to:   • Model  and  store  your  data  as  a   graph   • Query  relationships  with  ease   and  in  real-­‐time   • Seamlessly  evolve  applications   to  support  new  requirements  by  
 adding  new  kinds  of  data  and   relationships Agile  development
 High  performance
 Vertical  and  horizontal  scale
 Seamless  evolution
  • 16. Neo4j  Overview Product   • Neo4j  -­‐  World’s  leading  graph   database   • 1M+  downloads,  adding  50k+  
 per  month   • 150+  enterprise  subscription   customers  including  over  
 50  of  the  Global  2000 Company   • Neo  Technology,  Creator  of  Neo4j   • 80  employees  with  HQ  in  Silicon   Valley,  London,  Munich,  Paris  and   Malmö   • $45M  in  funding  from  Fidelity,   Sunstone,  Conor,  Creandum,   Dawn  Capital
  • 17.      2000                  2003                                2007      2009   2011 2013 2014 2015 Neo4j:  The  Graph  Database  Leader GraphConnect,  
 first  conference   for  graph  DBs First  Global  2000    
 Customer   Introduced  Cypher   a  declarative  query   language  for   property  graphs Published   O’Reilly  book
 on  Graph   Databases $11M  Series  A  
 from  Fidelity,   Sunstone
 and  Conor   $11M  Series  B  
 from  Fidelity,   Sunstone
 and  Conor   Commercial
 Leadership First  
 native  
 graph  DB  
 in  24/7   production Invented   property   graph   model Contributed   first  graph   DB  to  open   source $2.5M  Seed
 Round  from   Sunstone  
 and  Conor Funding Technical
 Leadership Extended  
 graph  data   model  to  
 labeled   property  graph 150+  customers   50K+  monthly
 downloads   500+  graph  
 DB  events
 worldwide  
 $20M  Series  C  
 led  by   Creandum,  with   Dawn  and   existing  investors
  • 18. “Forrester  estimates  that  over  25%  of  enterprises  will  be  using   graph  databases  by  2017” Neo4j  Leads  the  Graph  Database  Revolution “Neo4j  is  the  current  market  leader  in  graph  databases.” “Graph  analysis  is  possibly  the  single  most  effective  competitive   differentiator  for  organizations  pursuing  data-­‐driven  operations   and  decisions  after  the  design  of  data  capture.” 1.  IT  Market  Clock  for  Database  Management  Systems,  2014   2.  TechRadar™:  Enterprise  DBMS,  Q1  2014   3.Graph  Databases  –  and  Their  Potential  to  Transform  How  We  Capture  Interdependencies  (Enterprise  Management  Associates)
  • 19. Building  a  Recommendation  Engine  in  2  Minutes  with  Neo4j  
 Developer  Experience:  Neo4j  UI  with  Cypher  Query  Language Two-­‐Minute  Video  Demo https://www.youtube.com/watch?v=qbZ_Q-­‐YnHYo
  • 20. Neo4j  –  Key  Product  Features Native  Graph  Storage
 Ensures  data  consistency  and   performance   Native  Graph  Processing
 Millions  of  hops  per  second,  in  real  time   “Whiteboard  Friendly”  Data  Modeling
 Model  data  as  it  naturally  occurs   High  Data  Integrity
 Fully  ACID  transactions The  Graph  Query  Language:  Cypher
 Requires  10x  to  100x  less  code  than  SQL   Scalability  and  High  Availability
 Vertical  and  horizontal  scaling  optimized   for  graphs   Built-­‐in  ETL
 Seamless  import  from  other  databases   Integration
 Drivers  and  APIs  for  popular  languages MATCH
 (A)
  • 21. CAR DRIVES name:  “Dan”   born:  May  29,  1970   twitter:  “@dan” name:  “Ann”   born:    Dec  5,  1975 since:  
 Jan  10,  2011 brand:  “Volvo”   model:  “V70” Property  Graph  Model  Components Nodes   • The  objects  in  the  graph   • Can  have  properties   • Can  be  labeled   Relationships   • Relate  nodes  by  type  and  direction   • Can  have  properties LOVES LOVES LIVES  WITH OW NS PERSON PERSON
  • 22. Triple  Store/RDF  Model • Resource  Description  Framework   • Subject,  Predicate,  Object   • Standard  Data  Model   • Names  for  subjects,  predicates,   objects  must  be  URIs   • Names  must  be  Global   • No  properties  on  the  Relationships   • Like  “3rd  Normal  Form”  for  Relational   Databases  (but  really  more  like  5/6th)
  • 23. Property  Graph  Data  Model  (Movies)
  • 24. RDF  Data  Model  (Movies)
  • 25. Property  Graph  Vs  Triple  Store • Property  Graph  is  a  more  generic  case  of  the  Triple  Store   • Lack  of  properties  on  relationships  for  Triple  Stores  reduce  (  or   complicate)  their  expressive  power
  • 26. Query  Languages • Graph  Databases:   • Cypher  -­‐  declarative,  pattern   matching,  easy  to  understand   • Gremlin  -­‐  imperative,  step   driven,  math  inspired   • Native  APIs  (Java,  REST) • Triple  Stores:   • SPARQL  (standard)   • PROLOG  (or  prolog-­‐like   languages)
  • 27. General  Use  Cases • Graph  Databases:   • Local  Queries  (anchor  on  a   node  or  set  of  nodes  then   traverse)   • Realtime  (<20ms)  requirements   • Complex,  deep  traversals   • Flexible  graph  models • Triple  Stores:   • Global  Queries  (find  pattern  in   large  volume  of  information)   • Browsing  Content   • Inference  Discovery
  • 28. How  do  you  model  Flight  Data?
  • 29. How  do  you  model  Flight  Data?
  • 30. How  do  you  model  Flight  Data?
  • 31. How  do  you  model  Flight  Data?
  • 32. How  do  you  model  Flight  Data?
  • 33. How  do  you  model  Flight  Data?
  • 34. How  do  you  model  Flight  Data?
  • 35. How  do  you  model  Comic  Books? How  do  you  model  a  world  where  anything  can  happen?
  • 36. Graph  Databases  allow  Model  Flexibility https://vimeo.com/79399404 Watch  the  presentation  at:
  • 37. Java  CORE  API Direct  access  to  Nodes  and   Relationships
  • 38. Java  Core  API • Step  by  Step  from  GraphDatabaseService   • Start  a  transaction  (reads  and  writes)   • findNode(Label,  Property,  Value)   • findNodes(Label,  Property,  Value)   • findNodes(Label)   • getNodeById(Long)     • getRelationships(Direction,  Type)   • getProperty(Property,  (optional)  Default  Value)
  • 39. Example  (get  the  friends  of  a  user)
  • 41. Traversal  API • Start  with  the  Simple  Defaults  (order,  relationships,   depth,  uniqueness,  etc)   • Custom  Expanders   • Where  should  I  go  next   • Custom  Evaluators   • I’ve  gone  there…  should  I  accept  this  path?
  • 43. Cypher  Query  Language ASCII  Art  Pattern  Matching
  • 44. Cypher:  Powerful  and  Expressive  Query  Language MATCH  (:Person  {  name:“Dan”}  )  -­‐[:LOVES]-­‐>  (:Person  {  name:“Ann”}  )   LOVES Dan Ann Label Property Label Property Node Node
  • 45. MATCH  (boss)-­‐[:MANAGES*0..3]-­‐>(sub),              (sub)-­‐[:MANAGES*1..3]-­‐>(report)   WHERE  boss.name  =  “John  Doe”   RETURN  sub.name  AS  Subordinate,  
    count(report)  AS  Total Express  Complex  Queries  Easily  with  Cypher Find  all  direct  reports  and  
 how  many  people  they  manage,  
 up  to  3  levels  down Cypher  QuerySQL  Query
  • 49. Cypher  Query:  Movie  Recommendation MATCH  (watched:Movie  {title:"Toy  Story”})  <-­‐[r1:RATED]-­‐  ()  -­‐[r2:RATED]-­‐>  (unseen:Movie)   WHERE  r1.rating  >  7  AND  r2.rating  >  7   AND  watched.genres  =  unseen.genres   AND  NOT(  (:Person  {username:”maxdemarzi"})  -­‐[:RATED|WATCHED]-­‐>  (unseen)  )   RETURN  unseen.title,  COUNT(*)   ORDER  BY  COUNT(*)  DESC   LIMIT  25 What  are  the  Top  25  Movies   • that  I  haven't  seen   • with  the  same  genres  as  Toy  Story     • given  high  ratings   • by  people  who  liked  Toy  Story
  • 51. Cypher  Query:  k-­‐NN  Recommendation MATCH  (m:Movie)  <-­‐[r:RATED]-­‐  (b:Person)  -­‐[s:SIMILARITY]-­‐  (p:Person  {name:'Zoltan  Varju'})   WHERE  NOT(  (p)  -­‐[:RATED|WATCHED]-­‐>  (m)  )   WITH  m,  s.similarity  AS  similarity,  r.rating  AS  rating   ORDER  BY  m.name,  similarity  DESC   WITH  m.name  AS  movie,  COLLECT(rating)[0..3]  AS  ratings   WITH  movie,  REDUCE(s  =  0,  i  IN  ratings  |  s  +  i)*1.0  /  LENGTH(ratings)  AS  recommendation   ORDER  BY  recommendation  DESC   RETURN  movie,  recommendation
 LIMIT  25 What  are  the  Top  25  Movies   • that  Zoltan  Varju  has  not  seen   • using  the  average  rating   • by  my  top  3  neighbors  
  • 53. High  Speed  Fraud  -­‐  1000  R/S http://maxdemarzi.com/2014/02/12/online-­‐payment-­‐risk-­‐management-­‐with-­‐neo4j/  
  • 54. High  Speed  Fraud  -­‐  8000  R/S http://maxdemarzi.com/2014/02/27/neo4j-­‐at-­‐ludicrous-­‐speed/
  • 55. High  Speed  Fraud  -­‐  28000  R/S http://maxdemarzi.com/2014/03/10/its-­‐over-­‐9000-­‐neo4j-­‐on-­‐websockets/
  • 57. Neo4j  Clustering  
 Architecture  Optimized  for  Speed  &  Availability  at  Scale 57 Performance  Benefits:   • No  network  hops  within  queries   • Real-­‐time  operations  with  fast  and   consistent  response  times     • Cache  sharding  spreads  cache  across   cluster  for  very  large  graphs Clustering  Features:   • Master-­‐slave  replication  with  
 master  re-­‐election  and  failover     • Each  instance  has  its  own  local  cache   • Horizontal  scaling  &  disaster  recovery Load  Balancer Neo4jNeo4jNeo4j
  • 58. Getting  Data  into  Neo4j Cypher-­‐Based  “LOAD  CSV”  Capability   • Transactional  (ACID)  writes   • Initial  and  incremental  loads  of  up  to  
 10  million  nodes  and  relationships   Command-­‐Line  Bulk  Loader        neo4j-­‐import   • For  initial  database  population   • For  loads  with  10B+  records   • Up  to  1M  records  per  second  4.58  million  things   and  their  relationships…   Loads  in  100  seconds!
  • 59. Databases Data  Storage  and
 Business  Rules  Execution Data  Mining  
 and  Aggregation Neo4j  Fits  into  Your  Enterprise  Environment Application Graph  Database  Cluster Neo4j Neo4j Neo4j Ad  Hoc
 Analysis ETL Bulk  Analytic
 Infrastructure
 Graph  Compute  Engine
 Hadoop      EDW      … ETL Data   Scientist End  User
  • 60. Value  from  Relationships  –  Common  Use  Cases Internal  Applications   Master  Data  Management     Network  and  IT  
 Operations   Fraud  Detection Customer-­‐Facing  Applications   Real-­‐time  Recommendations   Graph-­‐based  Search   Identity  and  
 Access  Management
  • 65. What  are  the  Top  10  Jobs  for  me   • that  are  in  the  same  location  I’m  in   • for  which  I  have  the  necessary  qualifications
  • 67.
  • 68.
  • 69. Recommend  Love Find  your  soulmate  in  the  graph     • Are  they  energetic?   • Do  they  like  dogs?   • Have  a  good  sense  of  humor?   • Neat  and  tidy,  but  not  crazy  about  it? What  are  the  Top  10  Potential  Mates  for  me   • that  are  in  the  same  location   • are  sexually  compatible   • have  traits  I  want     • want  traits  I  have
  • 71. Two  Party  Partial  Subgraph  Search http://maxdemarzi.com/2013/04/19/match-making-with-neo4j/
  • 72. Real-­‐Time  Recommendations  with  Neo4j Social
 Recommendations Products  
 and  Services Content Routing
  • 73. Walmart        BUSINESS  CASE World’s  largest  company
 by  revenue   World’s  largest  retailer  and   private  employer   SF-­‐based  global  
 e-­‐commerce  division   manages  several  websites   Found  in  1969
 Bentonville,  Arkansas   • Needed  online  customer  recommendations  to   keep  pace  with  competition   • Data  connections  provided  predictive  context,  but   were  not  in  a  usable  format   • Solution  had  to  serve  many  millions  of  customers   and  products  while  maintaining  superior   scalability  and  performance
  • 74. Walmart        SOLUTION • Brings  customers,  preferences,  purchases,   products  and  locations  into  a  graph  model   • Uses  connections  to  make  product   recommendations   • Solution  deployed  across  WalMart  
 divisions  and  websites
  • 75. Global  Courier        BUSINESS  CASE World’s  largest  courier   480,000  employees
 €55  billion  in  revenue     Needed  new  
 B2C  and  B2B  parcel  routing   system  for  its  logistics   practice   Legacy  system  neither   supported  the  full  network   nor  the  shift  to  online   demands Needed  to  replace  aging  B2B  and  B2C  parcel  routing   system  whose  requirements  include:   • 24x7  availability   • Peak  loads  of  5M  parcels  per  day,  3K  per  second   • Support  for  complex  and  diverse  software  stack   • Predictable  performance  with  linear  scalability   • Daily  changes  to  logistics  networks   • Route  from  any  point  to  any  point   • Single  point  of  truth  for  entire  network
  • 76. Global  Courier        SOLUTION Neo4j  provides  the  ideal  domain  fit  since  
 a  logistics  network  is  a  graph   • High  availability  and  performance  via  Neo4j   clustering   • Greatly  simplified  Cypher  queries  for  routing   versus  relational  SQL  queries   • Flexible  data  model  that  reflects  the  real   logistics  world  far  better  than  relational   • Easy-­‐to-­‐grasp  whiteboard-­‐friendly  model
  • 77. eBay        BUSINESS  CASE C2C  and  B2C
 retail  network   Full  e-­‐commerce   functionality  for  individuals   and  businesses   Integrated  with  logistics   vendors  for  product   deliveries • Needed  an  offering  to  compete  with  
 Amazon  Prime   • Enable  customer-­‐selected  delivery  inside  
 90  minutes   • Calculate  best  route  option  in  real-­‐time   • Scale  to  enable  a  variety  of  services   • Offer  more  predictable  delivery  times
  • 78. eBay  Now          SOLUTION • Acquired  UK-­‐based  Shutl.  a  leader   in  same-­‐day  delivery   • Used  Neo4j  to  create  eBay  Now   • 1000  times  faster  than  the  prior  
 MySQL-­‐based  solution   • Faster  time-­‐to-­‐market   • Improved  code  quality  with  
 10  to  100  times  less  query  code
  • 79. Classmates        BUSINESS  CASE Online  yearbook   connecting  friends  from   school,  work  and  military   in  US  and  Canada   Founded  as  
 Memory  Lane  in  Seattle   Develop  new  social  networking  capabilities  to   monetize  yearbook-­‐related  offerings   • Show  all  the  people  I  know  in  a  yearbook   • Show  yearbooks  my  friends  appear  in  most  often   • Show  sections  of  a  yearbook  that  my  friends   appear  most  in   • Show  me  other  schools  my  friends  attended
  • 80. Classmates        SOLUTION Neo4j  provides  a  robust  and  scalable  graph   database  solution   • 3-­‐instance  cluster  with  cache  sharding  and   disaster-­‐recovery   • 18ms  response  time  for  top  4  queries   • 100M  nodes  and  600M  relationships  in   initial  graph—including  people,  images,   schools,  yearbooks  and  pages   • Projected  to  grow  to  1B  nodes  and  6B   relationships
  • 81. National  Geographic        BUSINESS  CASE Non-­‐profit  scientific  and   educational  institution   founded  in  1888   Covers  geography,   archaeology,  natural  science,   environment  and  historical   conservation   Journals,  online  media,  
 radio,  TV,  documentaries,  
 live  events  and  consumer   content  and  goods • Improve  poor  performance  of  PostgreSQL  app   • Increase  user  engagement  by  linking  to  100+  years   of  multimedia  content     • Improve  targeting  by  understand  subscribers’   interests  better   • Recommend  content  and  services  to  users  based   on  their  interests
  • 82. National  Geographic        SOLUTION • Enabled  complex  real-­‐time  analytics  across   eight  million  users  and  a  century  of  content   • Delivered  robust  performance  by  eliminating   triple-­‐nested  SQL  joins     • Cross-­‐refers  users  among  content,  live  events,   travel,  goods  and  causes   • Neo4j  solution  much  less  cumbersome  
 and  easier  to  maintain  than  previous  
 SQL  system
  • 83. Curaspan        BUSINESS  CASE Leader  in  patient   management  for  discharges   and  referrals   Manages  patient  referrals   4600+  health  care  facilities   Connects  providers,  payers   via  web-­‐based  patient   management  platform   Founded  in  1999  in   Newton,  Massachusetts • Improve  poor  performance  of  Oracle  solution   • Support  more  complexity  including  granular,  
 role-­‐based  access  control   • Satisfy  complex  Graph  Search  queries  by  discharge   nurses  and  intake  coordinators   Find  a  skilled  nursing  facility  within  n  miles  of  a   given  location,  belonging  to  health  care  group   XYZ,  offering  speech  therapy  and  cardiac  care,   and  optionally  Italian  language  services
  • 84. Curaspan        SOLUTION • Met  fast,  real-­‐time  performance  demands   • Supported  queries  span  multiple  hierarchies   including  provider  and  employee-­‐permissions   graphs   • Improved  data  model  to  handle  adding  more   dimensions  to  the  data  such  as  insurance   networks,  service  areas  and  care  organizations   • Greatly  simplified  queries,  simplifying  
 multi-­‐page  SQL  statements  into  one  
 Neo4j  function
  • 85. FiftyThree      BUSINESS  CASE Maker  of  Paper,  
 one  of  the  top  apps  
 in  Apple’s  App  Store,  with   millions  of  users   Based  in  New  York  City • Add  social  capabilities  to  digital-­‐paper  app   • Support  social  collaboration  across  millions  of   users  in  new  Mix  app   • Enable  seamless  interaction  between  social   and  content-­‐asset  networks   • Ensure  new  apps  are  robust,  scalable  and  fast
  • 86. FiftyThree        SOLUTION • Neo4j  data  model  ideal  for  social  network,  content   management  and  access  control   • Users  create,  publish  and  share  designs  simply   • Easy  to  develop  and  evolve  Neo4j-­‐based  app   • Integrates  well  with  FiftyThree  EC2  architecture   See  the  Neo4j  solution  in  action   Betting  the  Company  (Literally)  on  a  Graph  Database
 http://aseemk.com/talks/neo4j-­‐lessons-­‐learned#/ App  Store  Editor’s  Choice
 2012  iPad  App  of  Year
 Apple  Best  Apps  of  2014
  • 87. Users  Love  Neo4j jQuery  Inventor Heroku  Founder