Core benefits that make Dgraph unique
Dgraph vs other graph databases
Enterprises testing Dgraph for production
The only native GraphQL graph database built for the cloud.
Turn your siloed data into real-time insights.
#1 graph database on GitHub.
Docs for Dgraph and Dgraph Cloud
From GraphQL basics to building an app
Updates from Dgraph Labs
An interactive Dgraph demo
Dgraph database in a nutshell
Solving real problems with Dgraph
Built for performance, Badger is everything you are looking for in a Key-Value store.
Insert data at the speed of 160 MB/s
The Write Ahead Log ensures your data is safe and sound
Separation of Key-Value enables faster reads
Supports Compression, Encryption, TTL and more
Step 1. Open a new Badger instance
func main() {
// Open the Badger database located in the /tmp/badger directory.
// It will be created if it doesn't exist.
db, err := badger.Open(badger.DefaultOptions("/tmp/badger"))
if err != nil {
log.Fatal(err)
}
defer db.Close()
}
Step 2. Create a read-write transaction
err := db.Update(func(txn *badger.Txn) error {
// Your code here.
return nil
})
Step 3. Insert a key using the Set operation
err := db.Update(func(txn *badger.Txn) error {
return txn.Set([]byte("answer"), []byte("42"))
})
Step 4. Fetch the inserted key using the Get operation
err := db.View(func(txn *badger.Txn) error {
item, err := txn.Get([]byte("answer"))
// Use item here.
})
Badger was built for performance. Writing data at the speed of 160 MB/s and reading it at 80 MB/s, Badger is the fastest LSM Tree-based Key-Value Store written in Go.
Badger supports concurrent ACID transactions with serializable snapshot isolation (SSI) guarantees. The Write Ahead Log ensures you never lose data.
Building systems on top of Badger is easy with the Stream framework which allows bulk reading and writing of data by leveraging the power of Goroutines. The managed mode allows systems to take control of the transactions while Badger takes care of everything else.
A LRU Cache and support for Compression, Encryption, Time To Live (TTL), Badger comes with everything that you need from a Key-Value store.