Redis is an in-memory key-value NoSQL database.
This is a coding challenge from https://codingchallenges.fyi/challenges/challenge-redis/.
It aims to build a lite version of Redis with all the functionality of the first version of Redis.
The server was built using Python (but prefer C, Rust or Golang for performance) and test-driven development approach.
Run server : python redis_server.py
- RESP is the protocol used to communicate with a Redis server
- Clients send commands to a Redis Server as a RESP Array of Bulk Strings
- Server replies with one of the RESP type
- Need to implement a functionality to serialize and deserialize messages
- Create a server that listens on port
6379
- Sockets, Threads, Concurrency
- Use redis-cli to communicate with redis server
- PING
- ECHO
- SET (with expiration options)
- GET
- EXISTS
- DEL
- INCR
- DECR
- LPUSH
- RPUSH
- SAVE
- You can use redis-benchmark to check concurrency and performance
- The redis-benchmark utility simulates running commands done by N clients while at the same time sending M total queries.
I use https://try.redis.io/ to compare my lite version with Redis