RediGo is a high-performance, concurrent, in-memory key-value store written from scratch in Go. It implements the Redis Serialization Protocol (RESP) and mimics the internal architecture of Redis.
Note: This project is currently a Work In Progress . I am actively building it to deepen my understanding of network programming, concurrency, and database internals.
- TCP Server: Handles multiple concurrent clients efficiently.
- Architecture: Implements the Command Dispatcher Pattern for clean, modular, and scalable command routing.
- Concurrency Control: Thread-safe data access using Mutex locks (
sync.RWMutex). - RESP Parser: Efficient encoding/decoding of Redis commands.
- Key-Value Store: Supports basic string operations with Expiry (TTL) logic (
SET EX/PX,GET,INCR). - Lists: Complete support for list operations including blocking pop with timeouts (
LPUSH,RPUSH,LRANGE,LPOP,BLPOP). - Streams (Message Queue): Implementation of Redis Streams including auto-generated IDs, range queries, and blocking reads with polling (
XADD,XRANGE,XREAD,XREAD BLOCK).
- Language: Go
- Concepts: Network/TCP Programming, Concurrency, Mutexes, Polling, Custom Parsers.
- Clone the repository:
git clone https://github.com/nadashaban11/RediGo.git- Run the server:
go run main.go- Connect using
redis-cli
redis-cli -p 6379
127.0.0.1:6379> PING
PONG