Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hellomaxime/redis-server
lite version of redis
https://github.com/hellomaxime/redis-server
python redis redis-cli resp-protocol socket test-driven-development threads
Last synced: about 2 months ago
JSON representation
lite version of redis
- Host: GitHub
- URL: https://github.com/hellomaxime/redis-server
- Owner: hellomaxime
- Created: 2024-02-05T17:30:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-10T14:24:06.000Z (11 months ago)
- Last Synced: 2024-02-10T19:55:28.405Z (11 months ago)
- Topics: python, redis, redis-cli, resp-protocol, socket, test-driven-development, threads
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# redis-server
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`
### 1 - protocol
- 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### 2 - server
- Create a server that listens on port `6379`
- Sockets, Threads, Concurrency
- Use redis-cli to communicate with redis server### 3 - commands
- PING
- ECHO
- SET (with expiration options)
- GET
- EXISTS
- DEL
- INCR
- DECR
- LPUSH
- RPUSH
- SAVE### 4 - performance check
- 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.### Tips
I use https://try.redis.io/ to compare my lite version with Redis