0% found this document useful (0 votes)
93 views26 pages

Dgraph: An Open Source, Distributed, Transactional Graph Database

Dgraph is an open source, distributed, transactional graph database. It addresses the complexity of modern internet data by allowing efficient traversal of graph relationships in a scalable and performant manner. Dgraph shards and distributes data across multiple servers for horizontal scalability. It provides client-side transactions for consistency and replicates data using the Raft consensus algorithm to ensure strong consistency even during concurrent transactions.

Uploaded by

manasonnet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views26 pages

Dgraph: An Open Source, Distributed, Transactional Graph Database

Dgraph is an open source, distributed, transactional graph database. It addresses the complexity of modern internet data by allowing efficient traversal of graph relationships in a scalable and performant manner. Dgraph shards and distributes data across multiple servers for horizontal scalability. It provides client-side transactions for consistency and replicates data using the Raft consensus algorithm to ensure strong consistency even during concurrent transactions.

Uploaded by

manasonnet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Dgraph

An Open Source, Distributed,


Transactional Graph Database
Agenda
● Data in the internet Era
● Battling the Data Complexity
● Dgraph & Its Architecture
● Demo
● Questions

2
Hello!
I am Aman Mangal
Distributed Systems Engineer
Dgraph Labs
@mangalaman93
[email protected]

3
1.
Data in the Internet Era

Data is not just growing in size,
but also in its complexity and
connectedness.

5
Complex Dataset: Yelp (1)

6
Complex Dataset: Ecommerce (2)

7
Complex Dataset: GitHub (3)

8

Unearthing the complex
relationships in data could
reveal a lot of interesting facts.

9
Fraud Detection

10
2.
How does applications
deal with
such datasets?

11
SQL Database Customer ID Name Location

201 Aman Bengaluru

202 Karthik Mumbai


Order ID Customer ID Order Date

101 Order ID Status Timestamp


201 2019-10-15
101 New 1571144739
102 202 2019-10-16
101 Shipped 1571231139
103 201 2019-10-17
102 New 1571227539

103 New 1571313939

12
NoSQL Database

Key Value
Key Value
{“customer”: 201, “date”: 2019-10-15,
{“name”: “Aman”, 101 “new”: 1571144739,
201
“location”: “Bengaluru” “shipped”: 1571231139}

{“name”: “Karthik”, 102


{“customer”: 202, “date”: 2019-10-16,
202
“location”: “Mumbai”} “new”: 1571227539}

103
{“customer”: 201, “date”: 2019-10-17,
“new”: 1571313939}

13
Graph Database

Aman Karthik

1571144739 new

na

e
m
m

na
e
ed 101 ord
h i pp er
s
1571231139 order new
201 202 102 1571227539

er
ord

loc
on
new

ati
ati
1571313939 103

loc

on
Bengaluru Mumbai

14

But we need a Graph
Database that is scalable,
performant and resilient.

15
3.
Welcome to Dgraph
A State of the Art Graph Database

16
Dgraph (github.com/dgraph-io/dgraph)

An open source graph database built for web


scale production environments written in Go.
◎ Fast & horizontally scalable
◎ Highly available by design
◎ Fault tolerant
◎ Sharded and distributed ( joins, filters and sorts)
◎ Client side transactions
◎ Consistent replication with Raft

17
18
Distributed & Horizontally Scalable

Ratel Ratel: Web UI

Alpha Alpha Alpha Alpha: Data Storage

Zero Zero Zero Zero: Cluster Management

19
Data Sharding (1)

◎ Vertex cut partitioning Aman

◎ Data for one type of 1571144739 new

na
m
edge is stored together

e
ed 101 ord
pp er
shi
(i.e. order edges) 1571231139
201
er
ord

on
new

ati
1571313939 103

loc
Bengaluru

20
Data Sharding (2) 201
new
1571144739 101
name
◎ Allows efficient graph
new
traversal, single 1571313939 103 Aman
network call for one
hop traversal
201
order
101 201
shipped location
1571231139 101
order
103 201 Bengaluru

21
Client Side Transactions

◎ Dgraph provides a consistent


view of data for each client txn := client.NewTxn()
for the duration of transaction …
(snapshot isolation) // perform queries
◎ Ensures consistency using // or mutations
Raft consensus algorithm ...
when concurrent transactions txn.Commit()
are running // or txn.Abort()

22
Strong Consistency

◎ Dgraph supports
Linearizability
◎ Changes are immediately
reflected to majority of
replicas in the system
◎ Everyone sees consistent
view of the data

23
4.
Demo
Pray to Demo Gods!

24
25
Thanks!
Any questions?
You can find me at:
@mangalaman93
[email protected]

26

You might also like