SlideShare una empresa de Scribd logo
1 de 21
Neo4j
Graph Databases
Agenda
• Overview
• Main Features
• Neo4j Architecture
• Neo4j Storage Strategy
• Neo4j based Application Architecture
• Benchmarks & Datasets
What is Graph Database?
• A graph database stores data in a graph, the
most generic of data structures, capable of
elegantly representing any kind of data in a
highly accessible way.
Main features: Neo4j
• intuitive, using a graph model for data representation
• reliable, with full ACID transactions
• durable and fast, using a custom disk-based, native storage engine
• massively scalable, up to several billion
nodes/relationships/properties
• highly-available, when distributed across multiple machines
• expressive, with a powerful, human readable graph query
language.
• fast, with a powerful traversal framework for high-speed graph
queries
• embeddable, with a few small jars
• simple, accessible by a convenient REST interface or an object-
oriented Java API
Neo4j in graph
An overview of graph database space:
Neo4j Architecture
Store files
• Neo4j stores graph data in a number of different
store files.
• Each store file contains the data for a specific part
of the graph (e.g., nodes, relationships,
properties)
– neostore.nodestore.db
– neostore.relationshipstore.db
– neostore.propertystore.db
– neostore.propertystore.db.index
– neostore.propertystore.db.strings
– neostore.propertystore.db.arrays
Node store
• neostore.nodestore.db
• Size: 9 bytes
• 1st byte: in-use flag
• Next 4 bytes: ID of first relationship
• Last 4 bytes: ID of first property of node
• Fixed size records enable fast lookups
Relationship store
• neostore.relationshipstore.db
• Size: 33 bytes
– 1st byte: In use flag
– Next 8 bytes: IDs of the nodes at the start and end of
the relationship
– 4 bytes: Pointer to the relationship type
– 16 bytes: pointers for the next and previous
relationship records for each of the start and end
nodes. ( property chain)
– 4 bytes: next property id
Node/property record structure
How a graph is physically stored
Neo4j: Data Size
nodes 235 (∼ 34 billion)
relationships 235 (∼ 34 billion)
properties 236 to 238 depending on property
types (maximum ∼ 274 billion,
always at least ∼ 68 billion)
relationship types 215 (∼ 32 000)
Logical view of neo4j user API
Application Architecture
• Embedded Neo4j
– Low latency
– Choice of APIs
– Explicit transactions
– JVM only
– GC behavior
– Database life cycle
Application Architecture (contd..)
• Server Mode
– Using same embedded instance of neo4j
– REST API
– Platform independent
– Isolation from application GC behavior
– Network overhead
– Support for server extensions
Datasets
• Cineasts Movies & Actors
• Wordnet v:2.0
• Neo4j version 1.9 supports 10 of billions of
nodes/relationships/properties
• The Neo4j team has publicly expressed the
intention to support 100B+
nodes/relationships/properties in a single
graph as part of its 2013 roadmap
benchmarks
• https://code.google.com/p/orient/wiki/GraphDBComp
arison
• http://nosql.mypopescu.com/post/1451025794/neo4j-
and-orientdb-performance-compared
• https://groups.google.com/forum/#!msg/orient-
database/9J5s4q3WKxY/d5XrIpiVG6gJ
• https://baach.de/Members/jhb/neo4j-performance-
compared-to-mysql
• http://www.slideshare.net/thobe/nosqleu-graph-
databases-and-neo4j
• http://java.dzone.com/articles/get-full-neo4j-power-
using
Performance comparison: neo4j vs
RDBMS (table 2-1 pg:20)
Supports index-free adjacency

Más contenido relacionado

Más de Syed Ali Raza

E health Demystified
E health DemystifiedE health Demystified
E health DemystifiedSyed Ali Raza
 
What is a Software Module?
What is a Software Module?What is a Software Module?
What is a Software Module?Syed Ali Raza
 
Hl7 common terminology services
Hl7 common terminology servicesHl7 common terminology services
Hl7 common terminology servicesSyed Ali Raza
 
Electronic health records
Electronic health recordsElectronic health records
Electronic health recordsSyed Ali Raza
 
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3Syed Ali Raza
 

Más de Syed Ali Raza (8)

E health Demystified
E health DemystifiedE health Demystified
E health Demystified
 
FHIR REST API
FHIR REST APIFHIR REST API
FHIR REST API
 
O auth2.0 20141003
O auth2.0 20141003O auth2.0 20141003
O auth2.0 20141003
 
What is a Software Module?
What is a Software Module?What is a Software Module?
What is a Software Module?
 
Hl7 common terminology services
Hl7 common terminology servicesHl7 common terminology services
Hl7 common terminology services
 
Electronic health records
Electronic health recordsElectronic health records
Electronic health records
 
Chap 1
Chap 1Chap 1
Chap 1
 
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3
Resources assort urdu-shadi-al-shadi-047-nikah presentation - 3
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Neo4j Graph Storage

  • 2. Agenda • Overview • Main Features • Neo4j Architecture • Neo4j Storage Strategy • Neo4j based Application Architecture • Benchmarks & Datasets
  • 3. What is Graph Database? • A graph database stores data in a graph, the most generic of data structures, capable of elegantly representing any kind of data in a highly accessible way.
  • 4. Main features: Neo4j • intuitive, using a graph model for data representation • reliable, with full ACID transactions • durable and fast, using a custom disk-based, native storage engine • massively scalable, up to several billion nodes/relationships/properties • highly-available, when distributed across multiple machines • expressive, with a powerful, human readable graph query language. • fast, with a powerful traversal framework for high-speed graph queries • embeddable, with a few small jars • simple, accessible by a convenient REST interface or an object- oriented Java API
  • 6. An overview of graph database space:
  • 8. Store files • Neo4j stores graph data in a number of different store files. • Each store file contains the data for a specific part of the graph (e.g., nodes, relationships, properties) – neostore.nodestore.db – neostore.relationshipstore.db – neostore.propertystore.db – neostore.propertystore.db.index – neostore.propertystore.db.strings – neostore.propertystore.db.arrays
  • 9. Node store • neostore.nodestore.db • Size: 9 bytes • 1st byte: in-use flag • Next 4 bytes: ID of first relationship • Last 4 bytes: ID of first property of node • Fixed size records enable fast lookups
  • 10. Relationship store • neostore.relationshipstore.db • Size: 33 bytes – 1st byte: In use flag – Next 8 bytes: IDs of the nodes at the start and end of the relationship – 4 bytes: Pointer to the relationship type – 16 bytes: pointers for the next and previous relationship records for each of the start and end nodes. ( property chain) – 4 bytes: next property id
  • 12. How a graph is physically stored
  • 13. Neo4j: Data Size nodes 235 (∼ 34 billion) relationships 235 (∼ 34 billion) properties 236 to 238 depending on property types (maximum ∼ 274 billion, always at least ∼ 68 billion) relationship types 215 (∼ 32 000)
  • 14. Logical view of neo4j user API
  • 15. Application Architecture • Embedded Neo4j – Low latency – Choice of APIs – Explicit transactions – JVM only – GC behavior – Database life cycle
  • 16. Application Architecture (contd..) • Server Mode – Using same embedded instance of neo4j – REST API – Platform independent – Isolation from application GC behavior – Network overhead – Support for server extensions
  • 17.
  • 18.
  • 19. Datasets • Cineasts Movies & Actors • Wordnet v:2.0 • Neo4j version 1.9 supports 10 of billions of nodes/relationships/properties • The Neo4j team has publicly expressed the intention to support 100B+ nodes/relationships/properties in a single graph as part of its 2013 roadmap
  • 20. benchmarks • https://code.google.com/p/orient/wiki/GraphDBComp arison • http://nosql.mypopescu.com/post/1451025794/neo4j- and-orientdb-performance-compared • https://groups.google.com/forum/#!msg/orient- database/9J5s4q3WKxY/d5XrIpiVG6gJ • https://baach.de/Members/jhb/neo4j-performance- compared-to-mysql • http://www.slideshare.net/thobe/nosqleu-graph- databases-and-neo4j • http://java.dzone.com/articles/get-full-neo4j-power- using
  • 21. Performance comparison: neo4j vs RDBMS (table 2-1 pg:20) Supports index-free adjacency

Notas del editor

  1. String compression: http://docs.neo4j.org/chunked/stable/short-strings.html
  2. References: http://docs.neo4j.org/chunked/stable/capabilities-capacity.htmlData size is mainly limited by the address space of the primary keys of the nodes, relationships, property, relationship types.
  3. Kernel: transaction event handlersCore: graph primitivesTraverser: enables user to specify set of constraints that limit the parts of graph the traversal is allowed to visit.
  4. Access to Neo4j server is typically by way of its REST API, as discussed previously. TheREST API comprises JSON-formatted documents over HTTP. Using the REST API wecan submit Cypher queries, configure named indexes, and execute several of the built-in graph algorithms. We can also submit JSON-formatted traversal descriptions, andperform batch operations. For the majority of use cases the REST API is sufficient;however, if we need to do something we cannot currently accomplish using the RESTAPI, we should consider developing a server extension.
  5. References: http://java.dzone.com/articles/get-full-neo4j-power-using
  6. References: http://java.dzone.com/articles/get-full-neo4j-power-using
  7. References: oreilly graph databases