A custom in-memory database server built in C++, inspired by Redis.
It implements the Redis Serialization Protocol (RESP), socket-based communication, persistence storage, and is fully compatible with the official Redis CLI.
- RESP Protocol Parser β Fully supports Redis Serialization Protocol.
- In-Memory Data Store β Lightweight key-value database implementation.
- Persistence β Store data on disk and reload across sessions.
- Socket-Based Server β Handles multiple client connections.
- Redis CLI Compatible β Works seamlessly with the official
redis-cli. - Core Redis Commands β
SET,GET,DEL,EXISTS, and more list and hash commands.
- GNU Make
- g++ (or another modern C++ compiler)
- Redis CLI (install via package manager:
sudo apt-get install redis-toolsorbrew install redis)
git clone https://github.com/Satyam1923/inMemoryDB-server.git
cd inMemoryDb-Server
makeThis will build the my_redis_server binary.
Start the server (default port: 6379):
./my_redis_serverOpen another terminal and connect using the official Redis CLI:
redis-cli 127.0.0.1:6379> SET name "Satyam"
OK
127.0.0.1:6379> GET name
"Satyam"
127.0.0.1:6379> DEL name
(integer) 1
127.0.0.1:6379> EXISTS name
(integer) 0βββ src/ #contains server database and command handlder class
βββ include/ # all classes defined here
βββ Makefile # Build configuration
βββ README.md
βββ ...
Contributions, issues, and feature requests are welcome!
Feel free to open a PR or create an issue.
This project is licensed under the MIT License β see the LICENSE file for details.