Dice 🎲 is an extremely simple Golang-based in-memory KV store that speaks the Redis dialect.
This is not production ready
Building a database from scratch has its own thrill, and you can leverage this to
- build a database from scratch
- learn database internals, starting with Redis
- learn about advanced data structures, algorithms, and event loops
- collaborate with other engineers and contribute back to Open Source
To run DiceDB locally, you will need
- Golang
- Any of the below supported platform environment:
$ git clone https://github.com/dicedb/dice
$ cd dice
$ go run main.go
Because Dice speaks Redis' dialect, you can connect to it with any Redis Client and the simplest way it to use a Redis CLI. Programmatically, depending on the language you prefer, you can use your favourite Redis library to connect.
To run all the unit tests fire the following command
$ go test ./...
$ go test -timeout 30s -run <pattern> <package path>
$ go test -timeout 30s -run ^TestByteList$ ./...
$ go test -test.bench <pattern>
$ go test -test.bench BenchmarkListRedis
To get started with building and contributing to DiceDB, please refer to the issues created in this repository.
DiceDB started as a re-implementation of Redis in Golang and the idea was to - build a DB from scratch and understand the micro-nuances that comes with its implementation. The database does not aim to replace Redis, instead it will fit in and optimize itself for multi-core computations running on a single-threaded event loop.
The Code Contribution Guidelines are published at CONTRIBUTING.md; please read them before you start making any changes. This would allow us to have a consistent standard of coding practices and developer experience.
Contributors can join the Discord Server for quick collaboration.
DiceDB is open-sourced under Apache License, Version 2.0.