Dgraph
Dgraph is a distributed, native graph database written in Go. Released as open-source in 2017, it stores graphs in a Pregel-style sharded layout with each predicate (edge type) potentially on a different node. Dgraph speaks GraphQL as its primary query language — a deliberate choice to give frontend engineers the same query syntax used in their REST replacement layer — and a more powerful internal language called DQL (Dgraph Query Language).
Key Features:
- Native Graph Storage. Vertices and edges are stored in BadgerDB (an embedded LSM KV store also developed by the Dgraph team).
- Predicate Sharding. Each predicate is assigned to a server group; queries that touch one predicate are local. Different shape from row-wise sharding.
- GraphQL Native. Generate a GraphQL endpoint directly from a schema; no separate API server.
- DQL Query Language. More expressive than GraphQL for deep traversals, recursion, and aggregations.
- ACID Transactions. Distributed Snapshot Isolation across the whole graph — rare among distributed graph DBs.
- Cluster Deployment. Raft for metadata, replicated groups for data, designed to scale to hundreds of nodes.
Dgraph vs. Neo4j vs. JanusGraph:
- Dgraph. Native graph storage, GraphQL-first, distributed transactions. Newer ecosystem.
- Neo4j. Single-node-scale strong traversals, Cypher, large mature ecosystem.
- JanusGraph. Built on Cassandra; Gremlin language; layers more components.
Use Cases:
- Frontend-first applications where GraphQL is already the API contract.
- Applications needing both deep graph traversal and ACID multi-edge transactions.
- Knowledge graphs where the schema is well-defined and GraphQL’s typing is helpful.
- Greenfield distributed-graph workloads picking a single product instead of assembling Cassandra + JanusGraph + Elasticsearch.