SlideShare uma empresa Scribd logo
1 de 56
Baixar para ler offline
Drupal &
Graphs
• The “problem”
• Graph databases
• Neo4J
• Examples
• Drupal & graph
• Future
The problem
too many joins
query is unknown
tricks only graphs can
solve
1M nodes, ~50 rel/node
Depth RDBMS Neo4J
Returned
records
2 0.016 0.01 ~2’500
3 30.267 0.168 ~110’000
4 1543.505 1.359 ~600’000
5 unfinished 2.132 ~800’000
Such speed
So wow
Very graph
Examples
• Business Intelligence
• Content Management
• Fraud Detection
• Geo
• Graph Search
• Identity & Access
Management
• Impact Analysis
• Logistics
• Master Data Management
• Network and Data Center
Management
• Product Catalog
• Recommendation Engine
• Resource Authorization &
Access Control
• Social Network
http://gist.neo4j.org/
Graph databases
Node Node
Relationship
Jim Lisa
:COOK_FOR
Jim:PERSON Lisa:PERSON
:COOK_FOR
city: London
gender: male
city: San Francisco
gender: female
meal: Jalfrezi
score: 9.8
user_index::uid::3 user_index::uid::8
Jim:PERSON Lisa:PERSON
:COOK_FOR
city: London
gender: male
city: San Francisco
gender: female
meal: Jalfrezi
score: 9.8
:LOVE
user_index::uid::3 user_index::uid::8
hop
hop
hop
?
N hops
Start
designing graph db
John
Visit
Paris
Eiffel Louvre
VisitVisit
John
Visit
Paris
Eiffel Louvre
HasHas
John
Attended
ParisEiffel Louvre
Include
Travel
Include
City
1973
Jan JuneMarch
12 245
1986
3 11
Node
Term
Italy
Node!
{t:Italy}
vs
:HAS_TERM
:TERM_NAME
Neo4J
Server:
embedded - server mode
low latency network
low level API REST API
better control better scaling
JVM only languages
Backend
db
labels nodes
propsrels
Node
inUse nextRelId nextPropId
Relationship
inUse
firstNode
secondNode
relType
firstPrevRelId
firstNextRelId
secondPrevRelId
secondNextRelId
nextPropId
Disks
Record files
File system cache
Object cache
Traversal API Cypher
Transaction log
Transaction management
Core API
Core API
Traversal API
Cypher
MATCH (n)-[r]->(m)
• MATCH (n)-[r]->(m)
• MATCH (n:USER)-[:EAT]->(m:FOOD)
• MATCH p = (n)--(m)
• MATCH (n{name:’Jim’})-[r]->(m)
• MATCH (o)-->(n)<-[*1..3]-(m)
• MATCH [:TRAVEL{by:”bus”}]->(n)
START n=node(*)
• START n=node(12)
• START n=node({12, 3, 7})
• START n=node:user_index(uid=“12”)
• START n=node(3), m=node(12)
• WHERE n.name = ‘Jim’
• WHERE n.has(“name”)
• WITH count(n) AS all WHERE all > 10
• RETURN n
• RETURN collect(n), o.name
• RETURN length(p)
I want a good party this Friday.
Show me my foaf who has at least 20 close
friends - so I can avoid awkward parties.
And they don’t know my ex.
START n=node(12)
MATCH
p = (n)-[:FRIEND*]->(m),
(m)<-[:FRIEND*1..2]-(o)
WHERE
any(p IN collect(o) WHERE p.name != ‘Liz’)
WITH count(o) AS total
WHERE total >= 20
RETURN m.name, p, total, collect(o)
CREATE
(jim:USER{hair:’green’}),
(erica:USER{hair:’brown’}),
jim-[:REPORTS_TO{type:’TPS’}]->erica;
!
MATCH (n) SET n.name = ‘Walter’;
!
MATCH (n) DELETE n;
Drupal <3 Neo4J
https://drupal.org/
project/neo4j_connector
Neo4JNeo4J-PHP
Neo4J!
Drupal!
Connector
REST API
• Pluggable indexes
• Dynamic labels, properties and relationships
• “smart” indexing
DEMO
Future?
• Cypher builder
• Views integration
• More field support
• Embedded graph display
Thank You
Questions?

Mais conteúdo relacionado

Semelhante a Drupal and Neo4J

Couchbase Overview Nov 2013
Couchbase Overview Nov 2013Couchbase Overview Nov 2013
Couchbase Overview Nov 2013
Jeff Harris
 
Presentation
PresentationPresentation
Presentation
mmarchani
 

Semelhante a Drupal and Neo4J (20)

Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to Graphs
 
Neo4j GraphTalk Helsinki - Introduction and Graph Use Cases
Neo4j GraphTalk Helsinki - Introduction and Graph Use CasesNeo4j GraphTalk Helsinki - Introduction and Graph Use Cases
Neo4j GraphTalk Helsinki - Introduction and Graph Use Cases
 
Neo4j in Depth
Neo4j in DepthNeo4j in Depth
Neo4j in Depth
 
Betabit - syrwag 2018-03-28
Betabit - syrwag 2018-03-28Betabit - syrwag 2018-03-28
Betabit - syrwag 2018-03-28
 
Digital Transformation in a Connected World
Digital Transformation in a Connected WorldDigital Transformation in a Connected World
Digital Transformation in a Connected World
 
Integrating RDBMS with Big Data V3.0 now with SPARK!
Integrating RDBMS with Big Data V3.0 now with SPARK!Integrating RDBMS with Big Data V3.0 now with SPARK!
Integrating RDBMS with Big Data V3.0 now with SPARK!
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use Cases
 
Data Con LA 2018 - From the Panama Papers by Mark Quinsland
Data Con LA 2018 - From the Panama Papers by Mark QuinslandData Con LA 2018 - From the Panama Papers by Mark Quinsland
Data Con LA 2018 - From the Panama Papers by Mark Quinsland
 
Couchbase Overview Nov 2013
Couchbase Overview Nov 2013Couchbase Overview Nov 2013
Couchbase Overview Nov 2013
 
Connected data meetup group - introduction & scope
Connected data meetup group - introduction & scopeConnected data meetup group - introduction & scope
Connected data meetup group - introduction & scope
 
Introduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4jIntroduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4j
 
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
 
Graph databases and the #panamapapers
Graph databases and the #panamapapersGraph databases and the #panamapapers
Graph databases and the #panamapapers
 
Ketnote: GraphTour Boston
Ketnote: GraphTour BostonKetnote: GraphTour Boston
Ketnote: GraphTour Boston
 
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
Wanderu – Lessons from Building a Travel Site with Neo4j - Eddy Wong @ GraphC...
 
Presentation
PresentationPresentation
Presentation
 
Why Node, Express and Postgres - presented 23 Feb 15, Talkjs, Microsoft Audit...
Why Node, Express and Postgres - presented 23 Feb 15, Talkjs, Microsoft Audit...Why Node, Express and Postgres - presented 23 Feb 15, Talkjs, Microsoft Audit...
Why Node, Express and Postgres - presented 23 Feb 15, Talkjs, Microsoft Audit...
 
Content & Features Reno: Less Is More
Content & Features Reno: Less Is MoreContent & Features Reno: Less Is More
Content & Features Reno: Less Is More
 
Migrate all the things!
Migrate all the things!Migrate all the things!
Migrate all the things!
 

Mais de Peter Arato

Mais de Peter Arato (19)

Stat diary
Stat diaryStat diary
Stat diary
 
Less
LessLess
Less
 
Drupal and communication
Drupal and communicationDrupal and communication
Drupal and communication
 
Taste of flex
Taste of flexTaste of flex
Taste of flex
 
Drupal 7 Theme System
Drupal 7 Theme SystemDrupal 7 Theme System
Drupal 7 Theme System
 
Drupal troubleshooting
Drupal troubleshootingDrupal troubleshooting
Drupal troubleshooting
 
Drupal and testing (2010 - 2011 / 2)
Drupal and testing (2010 - 2011 / 2)Drupal and testing (2010 - 2011 / 2)
Drupal and testing (2010 - 2011 / 2)
 
Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)
 
Drupal Translation
Drupal TranslationDrupal Translation
Drupal Translation
 
Drupal Translation
Drupal TranslationDrupal Translation
Drupal Translation
 
Drupal Filters
Drupal FiltersDrupal Filters
Drupal Filters
 
Drupal Multisite
Drupal MultisiteDrupal Multisite
Drupal Multisite
 
I Love Techno - the site
I Love Techno - the siteI Love Techno - the site
I Love Techno - the site
 
Drupal Contributing
Drupal ContributingDrupal Contributing
Drupal Contributing
 
Drupal Contribution
Drupal ContributionDrupal Contribution
Drupal Contribution
 
How to build a Druplash site?
How to build a Druplash site?How to build a Druplash site?
How to build a Druplash site?
 
Flash And Drupal
Flash And DrupalFlash And Drupal
Flash And Drupal
 
Testing And Drupal
Testing And DrupalTesting And Drupal
Testing And Drupal
 
Drupal & Flash
Drupal & FlashDrupal & Flash
Drupal & Flash
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Drupal and Neo4J