SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
Kaiso	
  -­‐	
  an	
  object	
  persistence	
  framework	
  for	
  
Python	
  and	
  Neo4j
David	
  Szo>en

onefinestay	
  

!
!
!

@szo;en	
  
github.com/davidszo;en
1

©	
  Lifealike	
  Limited,	
  2013.
Overview
• About	
  onefinestay	
  
• We	
  care	
  about	
  homes	
  
• How	
  we	
  track	
  our	
  homes	
  using	
  Neo4j	
  
• Kaiso	
  demo

2

©	
  Lifealike	
  Limited,	
  2013.
onefinestay	
  -­‐	
  the	
  unhotel	
  
3

©	
  Lifealike	
  Limited,	
  2013.
onefinestay	
  -­‐	
  the	
  unhotel
• Guests	
  live	
  like	
  a	
  local	
  
– but	
  with	
  services	
  and	
  ameniNes	
  of	
  a	
  hotel	
  
!

• Members	
  with	
  disNncNve	
  homes	
  earn

hassle-­‐free	
  income	
  
!

• From	
  just	
  a	
  handful	
  of	
  homes	
  in	
  2010	
  to

over	
  1000	
  homes	
  in	
  4	
  ciNes	
  in	
  2013
4

©	
  Lifealike	
  Limited,	
  2013.
How	
  do	
  we	
  do	
  it?
• Provision:	
  Home	
   	
  Unhotel	
  
– Clean	
  
– Pack	
  away	
  certain	
  items	
  
• Make	
  wardrobe	
  space	
  

• Deprovision:	
  Unhotel	
   	
  Home	
  
– Clean	
  
– Put	
  everything	
  back
5

©	
  Lifealike	
  Limited,	
  2013.
We	
  care	
  about	
  our	
  homes.	
  A	
  lot.
• Every	
  home	
  is	
  different	
  
• We	
  require	
  inNmate	
  knowledge	
  
!

• For	
  guests:	
  “I	
  can’t	
  walk	
  up	
  stairs”,	
  “Where	
  is	
  the	
  iron?”	
  
• For	
  members:	
  “Please	
  put	
  my	
  fragile	
  vase	
  away	
  before	
  
the	
  guests	
  arrive”	
  
• For	
  us:	
  “How	
  much	
  bed	
  linen	
  do	
  I	
  need	
  to	
  take	
  to	
  this	
  
home	
  for	
  this	
  booking?”
6

©	
  Lifealike	
  Limited,	
  2013.
Previous	
  system
• Custom	
  storage	
  soluNon	
  
• Dates	
  back	
  to	
  when	
  we	
  were	
  much	
  smaller	
  
• Problems:	
  
– Siloed	
  
– Hard	
  to	
  query	
   	
  denormalised	
  copies

7

©	
  Lifealike	
  Limited,	
  2013.
New	
  system
• Want	
  to	
  model	
  our	
  homes	
  
– both	
  layout	
  and	
  contents	
  
!

• Need	
  flexibility	
  
– Our	
  needs	
  are	
  likely	
  to	
  grow	
  and	
  change	
  
!

• Track	
  not	
  only	
  objects,	
  but	
  their	
  classes	
  
– Ideally	
  treat	
  the	
  taxonomy	
  itself	
  as	
  data
8

©	
  Lifealike	
  Limited,	
  2013.
Enter	
  Neo4j
• Handle	
  complex	
  data	
  structures	
  
!

• Ensure	
  extensibility	
  for	
  future	
  needs	
  
!

• Easy	
  to	
  create	
  powerful	
  queries	
  
!

• Makes	
  for	
  a	
  nice	
  conceptual	
  model	
  of	
  our	
  data
9

©	
  Lifealike	
  Limited,	
  2013.
Flexibility	
  requirements
• We	
  want	
  to	
  associate	
  informaNon	
  with	
  classes	
  
as	
  well	
  as	
  objects	
  
– This	
  dishwasher	
  is	
  of	
  make	
  Electropool	
  
– (All)	
  appliances	
  need	
  PAT	
  tesNng	
  
!

• Unlike	
  convenNonal	
  object	
  mappers,	
  the	
  
taxonomy/class	
  hierarchy	
  needs	
  to	
  be	
  editable	
  
by	
  users,	
  and	
  so	
  should	
  be	
  part	
  of	
  the	
  data
10

©	
  Lifealike	
  Limited,	
  2013.
Kaiso	
  -­‐	
  an	
  object	
  persistence	
  framework
# (import some stuff)!

!

class Animal(Entity):!
id = Uuid(unique=True)!
name = String()!
friend_of = Outgoing(FriendOf)!

!

class Carnivore(Animal): pass!
class Herbivore(Animal): pass!

!

class Penguin(Herbivore):!
favourite_ice_cream = String()!

!

class Lion(Carnivore):!
n_siblings = Integer()!
11

©	
  Lifealike	
  Limited,	
  2013.
Kaiso:	
  Create	
  some	
  instances
# import types, connect to db!

!

manager = Manager("http://localhost:7474/db/data/")!

!

manager.save(Lion)!
manager.save(Penguin)!

!

# create some instances!
fred = Penguin(name="Fred")!
tom = Lion(name="Tom")!

!

relation = FriendOf(fred, tom)!

!

manager.save(fred)!
manager.save(tom)!
manager.save(relation)
12

©	
  Lifealike	
  Limited,	
  2013.
Instances	
  are	
  saved	
  in	
  the	
  graph...

FRIENDOF

[6]	
  Penguin:	
  Fred

13

[7]	
  Lion:	
  Tom

©	
  Lifealike	
  Limited,	
  2013.
...	
  and	
  so	
  is	
  the	
  class	
  hierarchy
[1]	
  Type:	
  Animal
ISA

ISA

[4]	
  Type:	
  Herbivore

[2]	
  Type:	
  Carnivore

ISA

ISA

[3]	
  Type:	
  Lion

[5]	
  Type:	
  Penguin

INSTANCEOF

INSTANCEOF
FRIENDOF

[6]	
  Penguin:	
  Fred
14

[7]	
  Lion:	
  Tom

©	
  Lifealike	
  Limited,	
  2013.
Kaiso:	
  Queries	
  based	
  on	
  the	
  type	
  hierarchy
START!
Herbivore=node:persistabletype(id="Herbivore"),!
Carnivore=node:persistabletype(id="Carnivore")!

!

MATCH!
Carnivore <-[:ISA*]-()<-[:INSTANCEOF]-(carnivore),!
Herbivore <-[:ISA*]-()<-[:INSTANCEOF]-(herbivore),!

!
!

(herbivore)-[:FRIENDOF]->(carnivore)!

RETURN!
"The herbivore",!
herbivore.name,!
“is a friend of the carnivore",!
carnivore.name;!

!

=> +--------------------------------------------------------------------+!
=> | "The herbivore" | "Fred" | "is a friend of the carnivore" | “Tom" |
=> +--------------------------------------------------------------------+
15

©	
  Lifealike	
  Limited,	
  2013.
Thank	
  you
QuesNons?	
  
!
!

Kaiso	
  
github.com/onefinestay/kaiso	
  
!
github.com/davidszo;en	
  
@davidszo;en
16

©	
  Lifealike	
  Limited,	
  2013.

Mais conteúdo relacionado

Semelhante a Kaiso: Modeling Complex Class Hierarchies with Neo4j - David Szotten @ GraphConnect London 2013

[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...Jessica Tai
 
Connecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondConnecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondDon Day
 
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J..."Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...Jeremy Jarvis
 
Building reusable components with generics and protocols
Building reusable components with generics and protocolsBuilding reusable components with generics and protocols
Building reusable components with generics and protocolsDonny Wals
 
Intro to iOS: Object Oriented Programming and Objective-C
Intro to iOS: Object Oriented Programming and Objective-CIntro to iOS: Object Oriented Programming and Objective-C
Intro to iOS: Object Oriented Programming and Objective-CAndrew Rohn
 
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)Bart Feenstra
 
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...Marion Kelt
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyondimoneytech
 
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Mozaic Works
 
Social dev camp_2011
Social dev camp_2011Social dev camp_2011
Social dev camp_2011Craig Ulliott
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 
Make Your Content Nimble - Sem Tech UK
Make Your Content Nimble - Sem Tech UKMake Your Content Nimble - Sem Tech UK
Make Your Content Nimble - Sem Tech UKRachel Lovinger
 
Think like a storage architect, in four questions
Think like a storage architect, in four questionsThink like a storage architect, in four questions
Think like a storage architect, in four questionsCheryl Hung
 
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017AWS Chicago
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...Severalnines
 
Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptxUmerUmer25
 
Capstone digital HI presentation
Capstone digital HI presentationCapstone digital HI presentation
Capstone digital HI presentationEric Fitzgerald
 
Neo4j Graph Data Modeling
Neo4j Graph Data ModelingNeo4j Graph Data Modeling
Neo4j Graph Data ModelingKenny Bastani
 
SMIRK presentation from ECIL2014
SMIRK presentation from ECIL2014SMIRK presentation from ECIL2014
SMIRK presentation from ECIL2014Marion Kelt
 

Semelhante a Kaiso: Modeling Complex Class Hierarchies with Neo4j - David Szotten @ GraphConnect London 2013 (20)

[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
[Annotated] QConSF 2018: Airbnb's Great Migration - From Monolith to Service-...
 
Connecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and BeyondConnecting Intelligent Content with Micropublishing and Beyond
Connecting Intelligent Content with Micropublishing and Beyond
 
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J..."Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...
"Building a Resilient Cloud Infrastructure. From Scratch." - Cloud East, 28 J...
 
Building reusable components with generics and protocols
Building reusable components with generics and protocolsBuilding reusable components with generics and protocols
Building reusable components with generics and protocols
 
Intro to iOS: Object Oriented Programming and Objective-C
Intro to iOS: Object Oriented Programming and Objective-CIntro to iOS: Object Oriented Programming and Objective-C
Intro to iOS: Object Oriented Programming and Objective-C
 
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
 
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...
SMIRK, developing a mobile SMILE - presentation to IFLA Information Literacy ...
 
Asist mit 2012
Asist mit 2012Asist mit 2012
Asist mit 2012
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyond
 
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
 
Social dev camp_2011
Social dev camp_2011Social dev camp_2011
Social dev camp_2011
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
Make Your Content Nimble - Sem Tech UK
Make Your Content Nimble - Sem Tech UKMake Your Content Nimble - Sem Tech UK
Make Your Content Nimble - Sem Tech UK
 
Think like a storage architect, in four questions
Think like a storage architect, in four questionsThink like a storage architect, in four questions
Think like a storage architect, in four questions
 
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017
Jeremy Engle's slides from Redshift / Big Data meetup on July 13, 2017
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
 
Capstone digital HI presentation
Capstone digital HI presentationCapstone digital HI presentation
Capstone digital HI presentation
 
Neo4j Graph Data Modeling
Neo4j Graph Data ModelingNeo4j Graph Data Modeling
Neo4j Graph Data Modeling
 
SMIRK presentation from ECIL2014
SMIRK presentation from ECIL2014SMIRK presentation from ECIL2014
SMIRK presentation from ECIL2014
 

Mais de Neo4j

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansQIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansNeo4j
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...Neo4j
 
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosBBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosNeo4j
 
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Neo4j
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j
 
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfRabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Neo4j
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsNeo4j
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j
 
Neo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with GraphNeo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with GraphNeo4j
 

Mais de Neo4j (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansQIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
QIAGEN: Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
ISDEFE - GraphSummit Madrid - ARETA: Aviation Real-Time Emissions Token Accre...
 
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafosBBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
BBVA - GraphSummit Madrid - Caso de éxito en BBVA: Optimizando con grafos
 
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
Graph Everywhere - Josep Taruella - Por qué Graph Data Science en tus modelos...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdfNeo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
Neo4j_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdfRabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
Rabobank_Exploring the Impact of Graph Technology on Financial Services.pdf
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)Neo4j: Data Engineering for RAG (retrieval augmented generation)
Neo4j: Data Engineering for RAG (retrieval augmented generation)
 
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
 
Neo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with GraphNeo4j Jesus Barrasa The Art of the Possible with Graph
Neo4j Jesus Barrasa The Art of the Possible with Graph
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Kaiso: Modeling Complex Class Hierarchies with Neo4j - David Szotten @ GraphConnect London 2013

  • 1. Kaiso  -­‐  an  object  persistence  framework  for   Python  and  Neo4j David  Szo>en
 onefinestay   ! ! ! @szo;en   github.com/davidszo;en 1 ©  Lifealike  Limited,  2013.
  • 2. Overview • About  onefinestay   • We  care  about  homes   • How  we  track  our  homes  using  Neo4j   • Kaiso  demo 2 ©  Lifealike  Limited,  2013.
  • 3. onefinestay  -­‐  the  unhotel   3 ©  Lifealike  Limited,  2013.
  • 4. onefinestay  -­‐  the  unhotel • Guests  live  like  a  local   – but  with  services  and  ameniNes  of  a  hotel   ! • Members  with  disNncNve  homes  earn
 hassle-­‐free  income   ! • From  just  a  handful  of  homes  in  2010  to
 over  1000  homes  in  4  ciNes  in  2013 4 ©  Lifealike  Limited,  2013.
  • 5. How  do  we  do  it? • Provision:  Home    Unhotel   – Clean   – Pack  away  certain  items   • Make  wardrobe  space   • Deprovision:  Unhotel    Home   – Clean   – Put  everything  back 5 ©  Lifealike  Limited,  2013.
  • 6. We  care  about  our  homes.  A  lot. • Every  home  is  different   • We  require  inNmate  knowledge   ! • For  guests:  “I  can’t  walk  up  stairs”,  “Where  is  the  iron?”   • For  members:  “Please  put  my  fragile  vase  away  before   the  guests  arrive”   • For  us:  “How  much  bed  linen  do  I  need  to  take  to  this   home  for  this  booking?” 6 ©  Lifealike  Limited,  2013.
  • 7. Previous  system • Custom  storage  soluNon   • Dates  back  to  when  we  were  much  smaller   • Problems:   – Siloed   – Hard  to  query    denormalised  copies 7 ©  Lifealike  Limited,  2013.
  • 8. New  system • Want  to  model  our  homes   – both  layout  and  contents   ! • Need  flexibility   – Our  needs  are  likely  to  grow  and  change   ! • Track  not  only  objects,  but  their  classes   – Ideally  treat  the  taxonomy  itself  as  data 8 ©  Lifealike  Limited,  2013.
  • 9. Enter  Neo4j • Handle  complex  data  structures   ! • Ensure  extensibility  for  future  needs   ! • Easy  to  create  powerful  queries   ! • Makes  for  a  nice  conceptual  model  of  our  data 9 ©  Lifealike  Limited,  2013.
  • 10. Flexibility  requirements • We  want  to  associate  informaNon  with  classes   as  well  as  objects   – This  dishwasher  is  of  make  Electropool   – (All)  appliances  need  PAT  tesNng   ! • Unlike  convenNonal  object  mappers,  the   taxonomy/class  hierarchy  needs  to  be  editable   by  users,  and  so  should  be  part  of  the  data 10 ©  Lifealike  Limited,  2013.
  • 11. Kaiso  -­‐  an  object  persistence  framework # (import some stuff)! ! class Animal(Entity):! id = Uuid(unique=True)! name = String()! friend_of = Outgoing(FriendOf)! ! class Carnivore(Animal): pass! class Herbivore(Animal): pass! ! class Penguin(Herbivore):! favourite_ice_cream = String()! ! class Lion(Carnivore):! n_siblings = Integer()! 11 ©  Lifealike  Limited,  2013.
  • 12. Kaiso:  Create  some  instances # import types, connect to db! ! manager = Manager("http://localhost:7474/db/data/")! ! manager.save(Lion)! manager.save(Penguin)! ! # create some instances! fred = Penguin(name="Fred")! tom = Lion(name="Tom")! ! relation = FriendOf(fred, tom)! ! manager.save(fred)! manager.save(tom)! manager.save(relation) 12 ©  Lifealike  Limited,  2013.
  • 13. Instances  are  saved  in  the  graph... FRIENDOF [6]  Penguin:  Fred 13 [7]  Lion:  Tom ©  Lifealike  Limited,  2013.
  • 14. ...  and  so  is  the  class  hierarchy [1]  Type:  Animal ISA ISA [4]  Type:  Herbivore [2]  Type:  Carnivore ISA ISA [3]  Type:  Lion [5]  Type:  Penguin INSTANCEOF INSTANCEOF FRIENDOF [6]  Penguin:  Fred 14 [7]  Lion:  Tom ©  Lifealike  Limited,  2013.
  • 15. Kaiso:  Queries  based  on  the  type  hierarchy START! Herbivore=node:persistabletype(id="Herbivore"),! Carnivore=node:persistabletype(id="Carnivore")! ! MATCH! Carnivore <-[:ISA*]-()<-[:INSTANCEOF]-(carnivore),! Herbivore <-[:ISA*]-()<-[:INSTANCEOF]-(herbivore),! ! ! (herbivore)-[:FRIENDOF]->(carnivore)! RETURN! "The herbivore",! herbivore.name,! “is a friend of the carnivore",! carnivore.name;! ! => +--------------------------------------------------------------------+! => | "The herbivore" | "Fred" | "is a friend of the carnivore" | “Tom" | => +--------------------------------------------------------------------+ 15 ©  Lifealike  Limited,  2013.
  • 16. Thank  you QuesNons?   ! ! Kaiso   github.com/onefinestay/kaiso   ! github.com/davidszo;en   @davidszo;en 16 ©  Lifealike  Limited,  2013.