This repository is a playground where I implement ideas from the book Designing Data-Intensive Applications.
NOTE 2023-01-31: I've finished playing around with the project. In wrapping-up.md
you will find the conclusions and what I've learnt. It has been a very nice project. I strongly recommend it
to anyone 🚀
Implement Redis 1.0 command set (see commands.md
)
for educative purposes, without any external dependency (empty go.mod).
This project will implement a Redis Server using the Redis Serialization Protocol.
- Setup
- The server must be able to "talk" with original
redis-cli
andredis-benchmark
tools, behaving as a real server. - Gracefully shutdown of the server
- Do not close the connection on each command
- Store values in-memory in a key-value store (map + mutexes)
- Benchmark the key value store and compare it with Redis
- OOM management. Invalidate older keys or swap to disk
- The server must be able to "talk" with original
- Storage
- Persist using Append Only File
- Write to the WAL before sending OK confirmation to the client
- Be able to restart the server and keep the state (even after crash)
- Persist using point-in-time Snapshots
- Features
- Implement
expire
commands (set a TTL for a key)
- Implement
- Replication
- Read-Only replica support
- TTL: Implement expiration mechanism
See commands.md
to know what commands have been implemented and what's the progress.