• Stars
    star
    19,791
  • Rank 1,294 (Top 0.03 %)
  • Language
    Go
  • License
    Other
  • Created about 9 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The high-performance database for modern applications
Dgraph Logo

The Only Native GraphQL Database With A Graph Backend.

Wiki ci-dgraph-tests ci-dgraph-load-tests ci-golang-lint ci-aqua-security-trivy-tests Coverage Status Go Report Card TODOs

Dgraph is a horizontally scalable and distributed GraphQL database with a graph backend. It provides ACID transactions, consistent replication, and linearizable reads. It's built from the ground up to perform a rich set of queries. Being a native GraphQL database, it tightly controls how the data is arranged on disk to optimize for query performance and throughput, reducing disk seeks and network calls in a cluster.

Dgraph's goal is to provide Google production-level scale and throughput, with low enough latency to serve real-time user queries over terabytes of structured data. Dgraph supports GraphQL query syntax, and responds in JSON and Protocol Buffers over GRPC and HTTP. Dgraph is written using the Go Programming Language.

Status

Dgraph is at version v23.1.0 and is production-ready. Apart from the vast open source community, it is being used in production at multiple Fortune 500 companies, and by Intuit Katlas and VMware Purser. A hosted version of Dgraph is available at https://cloud.dgraph.io.

Supported Platforms

Dgraph officially supports the Linux/amd64 architecture. Support for Linux/arm64 is in development. In order to take advantage of memory performance gains and other architecture-specific advancements in Linux, we dropped official support Mac and Windows in 2021, see this blog post for more information. You can still build and use Dgraph on other platforms (for live or bulk loading for instance), but support for platforms other than Linux/amd64 is not available.

Running Dgraph in a Docker environment is the recommended testing and deployment method.

Install with Docker

If you're using Docker, you can use the official Dgraph image.

docker pull dgraph/dgraph:latest

For more information on a variety Docker deployment methods including Docker Compose and Kubernetes, see the docs.

Run a Quick Standalone Cluster

docker run -it -p 8080:8080 -p 9080:9080 -v ~/dgraph:/dgraph dgraph/standalone:latest

Install from Source

If you want to install from source, install Go 1.19+ or later and the following dependencies:

Ubuntu

sudo apt-get update
sudo apt-get install build-essential

Build and Install

Then clone the Dgraph repository and use make install to install the Dgraph binary in the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.

git clone https://github.com/dgraph-io/dgraph.git
cd dgraph
make install

Get Started

To get started with Dgraph, follow:

Is Dgraph the right choice for me?

  • Do you have more than 10 SQL tables connected via foreign keys?
  • Do you have sparse data, which doesn't elegantly fit into SQL tables?
  • Do you want a simple and flexible schema, which is readable and maintainable over time?
  • Do you care about speed and performance at scale?

If the answers to the above are YES, then Dgraph would be a great fit for your application. Dgraph provides NoSQL like scalability while providing SQL like transactions and the ability to select, filter, and aggregate data points. It combines that with distributed joins, traversals, and graph operations, which makes it easy to build applications with it.

Dgraph compared to other graph DBs

Features Dgraph Neo4j Janus Graph
Architecture Sharded and Distributed Single server (+ replicas in enterprise) Layer on top of other distributed DBs
Replication Consistent None in community edition (only available in enterprise) Via underlying DB
Data movement for shard rebalancing Automatic Not applicable (all data lies on each server) Via underlying DB
Language GraphQL inspired Cypher, Gremlin Gremlin
Protocols Grpc / HTTP + JSON / RDF Bolt + Cypher Websocket / HTTP
Transactions Distributed ACID transactions Single server ACID transactions Not typically ACID
Full-Text Search Native support Native support Via External Indexing System
Regular Expressions Native support Native support Via External Indexing System
Geo Search Native support External support only Via External Indexing System
License Apache 2.0 GPL v3 Apache 2.0

Users

Developers

Client Libraries

The Dgraph team maintains several officially supported client libraries. There are also libraries contributed by the community unofficial client libraries.

Contact

More Repositories

1

badger

Fast key-value DB in Go.
Go
12,961
star
2

ristretto

A high performance memory-bound Go cache
Go
5,088
star
3

dgo

Official Dgraph Go client
Go
347
star
4

dgraph-js

Official Dgraph JavaScript client
JavaScript
322
star
5

sroar

Serialized Roaring Bitmaps
Go
267
star
6

pydgraph

Official Dgraph Python client
Python
261
star
7

dgraph4j

Official Dgraph Java client
Java
157
star
8

travel

Starter Kit For Building Graph Database Go and Browser Apps Using Dgraph
Go
126
star
9

graphoverflow

Run the entire StackOverflow on Dgraph. Work in progress.
JavaScript
116
star
10

ratel

Dgraph Data Visualizer and Cluster Manager
JavaScript
114
star
11

wisemonk

Bot to move conversations from Slack to Discourse.
Go
106
star
12

benchmarks

Run benchmarks with RDF data
Go
97
star
13

badger-bench

Benchmarks of Badger
Go
92
star
14

graphql-sample-apps

This repository contains sample GraphQL applications powered by Dgraph.
JavaScript
73
star
15

dgraph-js-http

A JavaScript HTTP client for Dgraph
TypeScript
67
star
16

gru

Help identify the right minions
JavaScript
46
star
17

dgraph-lambda

TypeScript
39
star
18

tutorial

A Tour of Dgraph
HTML
38
star
19

dgraph-docs

A native GraphQL Database with a graph backend
Shell
35
star
20

charts

Helm charts for Dgraph
Shell
32
star
21

ingressutil

Utils for building an ingress controller
Go
31
star
22

flock

Twitter on Dgraph
Go
31
star
23

dgraph.net

Official Dgraph .NET Client
C#
28
star
24

dgraph-operator

Dgraph Operator creates/configures/manages Dgraph clusters atop Kubernetes
Go
23
star
25

hugo-dgraph-theme

Hugo theme used for our blog
CSS
22
star
26

typhoon-ui

🌀 typhoon-ui: Token-based React component library built using emotion.
TypeScript
14
star
27

hugo-docs

Theme for Dgraph documentation built via Hugo
HTML
13
star
28

experiments

Go
13
star
29

graphql-kanban

Project management app written with Dgraph and Apollo Client
TypeScript
13
star
30

mediawiki-dgraph-skin

Mediawiki skin used by Dgraph wiki.
CSS
13
star
31

svelte-urql-example

Svelte
12
star
32

slash-graphql-cli

Command Line Tools for Slash GraphQL
TypeScript
11
star
33

auth-webinar

Resources for Serverless Authentication + Authorization Webinar
JavaScript
9
star
34

discuss-tutorial

Discuss clone app built for a tutorial
CSS
8
star
35

tove

Crash vulnerability tests for Badger using the ALICE framework
Go
7
star
36

graphql-dgraph-web

GraphQL Web
SCSS
7
star
37

graphql-asia-workshop-2020

JavaScript
7
star
38

rails-graphoverflow

Showcase of using Dgraph in Ruby on Rails
Ruby
7
star
39

dgraph-react-todomvc

TodoMVC in React with GraphQL, Dgraph, NoSQL graph database
JavaScript
7
star
40

grpc-proxy

Go
6
star
41

webinar-1-twitter-graphql

JavaScript
5
star
42

react-slash-graphql-starter

JavaScript
4
star
43

gatsby-dgraph-graphql

A simple blog app with Gatsby and Dgraph's GraphQL API
JavaScript
4
star
44

auth0-integration

Slash GraphQL + Auth0 integration quick start
JavaScript
4
star
45

tweetsletter-workshop

JavaScript
4
star
46

dgraph-day

Learn graph database best practices from experts using Dgraph at scale in production and building the next generation of apps. Sign up for the FREE virtual event, April 15-16th.
4
star
47

hello

Dgraph's take on Go present
JavaScript
3
star
48

live-demo

JavaScript
3
star
49

dev-jokes

Slash powered DevJokes Application
JavaScript
3
star
50

Install-Dgraph

Dgraph installation scripts
Shell
2
star
51

workshop

Dgraph workshop: Build a Twitter graph with Dgraph!
2
star
52

video-tutorial-todo

JavaScript
2
star
53

vlg

Dgraph's Very Large Graph (WIP) Project
Go
2
star
54

website-old

Website code for dgraph.io
CSS
2
star
55

tudo-tutorial

Tutorial for building a GraphQL React app with Slash GraphQL
JavaScript
2
star
56

dgraph-io.github.io

Dgraph blog
HTML
2
star
57

cloud-docs

Documentation for Dgraph Cloud
Shell
1
star
58

discuss-tutorial-vue

CSS
1
star
59

developer-connect-sessions

1
star