SlideShare a Scribd company logo
Graph Distribution
Graph Database
SRC DEST
Relation
Graph Database
Use cases:
Fraud detection
Recommendation engine
Social networks...
● Property graph
● Labeled entities
● Schema less
● Cypher query language
● Aggregations, Arithmetic expressions, Sort...
● Tabular resultset
RedisGraph
Structure
Tables
Name Age Height
Roi 33 187
Hila 33 170
Shany 23 167
Amit 31 180
Name Population
Israel 8.5M
Japan 127M
Italy 60M
SRC DEST
1 2
2 2
2 3
4 1
4 3
Person CountryVisit
Documents
ID: 1,
Name: ‘Roi’,
Age: 33,
Height: 187,
Visited: [6]
ID: 6,
Name: ‘Japan’,
Population: 127M
Graph structure 101
Adjacency list
12
3
4
1 2 3 4
Adjacency matrix
1 0 1 0 1 0 0 0
0 1 0 0 1 1 0 1
0 0 1 0 1 0 0 0
1 1 0 1 1 0 1 1
1 0 1 0 1 1 0 0
Node i is connected to node j If A[i,j] = 1
Hexastore
SPO OSP
SOP PSO
OPS POS
S
Subject
P
Predicate
O
Object
6
Graph structure Hexastore
Triplets
SPO:Michael:Boss:Jim
SOP:Michael:Jim:Boss
OPS:Jim:Boss:Michael
OSP:Jim:Michael:Boss
PSO:Boss:Michael:Jim
POS:Boss:Jim:Michael
Michael
S
Jim
O
Boss
P
Node property set
Entities - Key value store.
Person node with attributes:
{
‘name’: ‘Bruce Buffer’,
‘age’: 60,
‘gender’: ‘male’
}
2 billion users
338 average friends for user
676 billion edges
152 terabytes ~= 1024*32 bytes per user + 64 * 2 bytes per edge
Problem
Redis Day TLV 2018 - Graph Distribution
Partitioning
Entities distribution
Property set 1 Property set 2 Graph index
Query
Find friends of mine who’ve visited places I’ve been to and are
older than me.
Match (ME:person)-[friend]->(F:person)-[visited]->(C:country)<-[visit]-(ME)
WHERE ME.ID = 33 AND F.age > ME.age
RETURN F.name, C.name
(ME:person)
ME.ID = 33
Graph traversal
Graph index
Graph traversal
(ME:person)-[friend]->(F:person)
Graph index
(F:person)-[visited]->(C:country)
Graph traversal
Graph index
(C:country)<-[visit]-(ME)
Graph traversal
Graph index
Resultset
Friend ID Friend name Country ID Country name
70 ? 25 ?
92 ? 55 ?
56 ? 4 ?
Query
WHERE F.age > ME.age RETURN F.name, C.name
NETWORK!
Index
Entities
Fetch age for ID 33
Query example continued
WHERE F.age > ME.age RETURN F.name, C.name
NETWORK!
Index
Entities
Fetch name of every entity in (IDs)
Entity’s age > 29
Resultset
Friend ID Friend name Country ID Country name
70 Noam 25 Japan
Index distribution
Friend relation Visit relation Graph index
Query
Find all posts liked by friends of friends of mine, written by author X.
MATCH
(ME:person)-[friend]->(:person)-[friend]->(F:person)-[like]->(post)<-[author]-(A:author)
WHERE ME.ID=46 AND A.ID=71070
RETURN A.name, F.name
1. Node X contains FRIEND relations.
2. Seek to my ID in Node X (1 RPC). Retrieve a list of friend uids.
3. Do multiple seeks for each of the friend uids, to generate a list of friends of
friends uids. result set 1
Query
Friend
Index
Query
executor
(ME:person)-[friend]->(:person)-[friend]->(F:person)
Resultset 1
Friends of friends
Friend ID Friend name
70 ?
92 ?
56 ?
1. Node Y contains posting list for predicate LIKE.
2. Ship result set 1 to Node Y (1 RPC), and do seeks to generate a list of all posts
liked by result set 1. result set 2
Query
Like
Index
Query
executor
(F:person)-[like]->(post)
Resultset 1
Resultset 2
Liked posts
Friend ID Friend name Post ID
70 ? 534
70 ? 431
92 ? 8964
56 ? 12
56 ? 5356
Query
Node Z contains relations for predicate AUTHOR.
Ship result set 2 to Node Z (1 RPC).
Seek to author X, and generate a list of posts authored by X. result set 3
Author
Index
Query
executor
(post)<-[author]-(A:author)
Resultset 2
Resultset 4
Intersected resultset 2 and 3
Friend ID Friend name Post ID Author ID Author
name
70 ? 534 71070 ?
92 ? 8964 71070 ?
Node N contains names for all uids, ship result set 4 to Node N (1 RPC), and convert
uids to names by doing multiple seeks.
Query
Author
Index
Query
executor
RETURN A.name, F.name
Resultset 4
Resultset 4
Intersected resultset 2 and 3
Friend ID Friend name Post ID Author ID Author
name
70 Ailon 534 71070 Omri
92 Boaz 8964 71070 Omri
RedisGraph
Not distributed,
Yet,
Work in progress:
Compact distributed index
Concurrent fast independent traversals
(you)-[ask]->(question)
@roilipman
JanusGraph successor of Titan
● Relays on a storage backend e.g. Casandar.
● Provides a graph interface on top of a table.
● Delegates storing, replicating, distributing and persisting a graph to the
underline storage backend.
Takes a mature application from a similar domain and introduce a new data type API
on top of existing data structure. (not optimal)
Solutions
Solutions
DGraph
Uses the concept of RDF NQuad to represents connections and badger as its key
value store.
Both the graph index and the entities are distributed.
Solutions
Arangodb
From my understanding this multi model database uses documents to represent all
three data types: Documents, key value store and graph.
Not sure about how it distributes its data but it’s using RAFT to ensure consistency
It is ACID.

More Related Content

PDF
PDF
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
PPTX
TextMining with R
PPT
RFS Search Lang Spec
PPTX
Shape Expressions: An RDF validation and transformation language
PPTX
R Intro Workshop
PDF
TermPicker: Enabling the Reuse of Vocabulary Terms by Exploiting Data from th...
PDF
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
TextMining with R
RFS Search Lang Spec
Shape Expressions: An RDF validation and transformation language
R Intro Workshop
TermPicker: Enabling the Reuse of Vocabulary Terms by Exploiting Data from th...

What's hot (13)

PPTX
File-Data structure
PDF
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
PPTX
Set Similarity Search using a Distributed Prefix Tree Index
PDF
R packages
PPTX
Priamry data type
ODP
Information Extraction from the Web - Algorithms and Tools
PDF
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: SPARQL 1.1 Query Language
PPT
Class 10 Arrays
PPT
Slides
PDF
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
PPTX
Validating and Describing Linked Data Portals using RDF Shape Expressions
PPTX
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
PDF
Two graph data models : RDF and Property Graphs
File-Data structure
Search Engine-Building with Lucene and Solr, Part 1 (SoCal Code Camp LA 2013)
Set Similarity Search using a Distributed Prefix Tree Index
R packages
Priamry data type
Information Extraction from the Web - Algorithms and Tools
ESWC SS 2012 - Monday Tutorial 2 Barry Norton: SPARQL 1.1 Query Language
Class 10 Arrays
Slides
Introduction to R for Data Science :: Session 8 [Intro to Text Mining in R, M...
Validating and Describing Linked Data Portals using RDF Shape Expressions
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
Two graph data models : RDF and Property Graphs
Ad

Similar to Redis Day TLV 2018 - Graph Distribution (20)

PDF
Introducción a Neo4j
PPT
analysis of a real online social network using semantic web frameworks
PPTX
Mapping Graph Queries to PostgreSQL
PPTX
Deduplication on large amounts of code
PDF
The Curious Clojurist - Neal Ford (Thoughtworks)
PDF
Neo4j Introduction (Basics, Cypher, RDBMS to GRAPH)
PDF
Efficient blocking method for a large scale citation matching
PDF
Graph technology meetup slides
PDF
Gradoop: Scalable Graph Analytics with Apache Flink @ FOSDEM 2016
PDF
Introduction to Graphs with Neo4j
PPTX
Learning the Semantics of Structured Data Sources
PDF
Graph Database Use Cases - StampedeCon 2015
PDF
Graph database Use Cases
PPTX
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
PDF
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
PPTX
Ggplot2 v3
PDF
Relationship Counselling with Neo4j
PPTX
Neo4j - graph database for recommendations
PDF
Introduction to data analysis using R
PDF
League of Graphs
Introducción a Neo4j
analysis of a real online social network using semantic web frameworks
Mapping Graph Queries to PostgreSQL
Deduplication on large amounts of code
The Curious Clojurist - Neal Ford (Thoughtworks)
Neo4j Introduction (Basics, Cypher, RDBMS to GRAPH)
Efficient blocking method for a large scale citation matching
Graph technology meetup slides
Gradoop: Scalable Graph Analytics with Apache Flink @ FOSDEM 2016
Introduction to Graphs with Neo4j
Learning the Semantics of Structured Data Sources
Graph Database Use Cases - StampedeCon 2015
Graph database Use Cases
Neo4j graphdatabaseforrecommendations-130531021030-phpapp02-converted
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
Ggplot2 v3
Relationship Counselling with Neo4j
Neo4j - graph database for recommendations
Introduction to data analysis using R
League of Graphs
Ad

More from Redis Labs (20)

PPTX
Redis Day Bangalore 2020 - Session state caching with redis
PPTX
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
PPTX
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
PPTX
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
PPTX
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
PPTX
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
PPTX
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
PPTX
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
PPTX
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
PPTX
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
PPTX
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
PPTX
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
PPTX
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
PPTX
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
PPTX
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
PDF
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
PPTX
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Redis Day Bangalore 2020 - Session state caching with redis
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Getting Started with Data Integration: FME Form 101
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
1. Introduction to Computer Programming.pptx
A comparative analysis of optical character recognition models for extracting...
SOPHOS-XG Firewall Administrator PPT.pptx
Spectral efficient network and resource selection model in 5G networks
Getting Started with Data Integration: FME Form 101
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Per capita expenditure prediction using model stacking based on satellite ima...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
MIND Revenue Release Quarter 2 2025 Press Release

Redis Day TLV 2018 - Graph Distribution