Kedis is a lightweight Redis-inspired in-memory database built to explore core system design concepts such as data storage, command parsing, and performance optimization.
Modern systems rely heavily on fast, in-memory data stores like Redis. Kedis is built to understand how such systems work internally by implementing key components from scratch.
-
🔑 Basic key-value operations:
SET key valueGET keyDEL keyEXISTS key
-
⏳ Expiry support:
EXPIRE key secondsTTL key
-
🧩 Modular architecture:
- Command parsing layer
- Execution layer
- Storage layer
-
💾 Persistence (optional):
- Save and load data from disk
User Input → Parser → Command Handler → In-Memory Store → Response
kedis/
│
├── main.py # Entry point (CLI loop)
├── parser.py # Parses user commands
├── commands.py # Command implementations
├── store.py # In-memory data storage
├── utils.py # Helper functions
└── README.md
- Python 3.x
python main.pySET name Karthik
GET name
DEL name
EXISTS name
This project focuses on:
- Understanding in-memory data systems
- Designing modular software architecture
- Implementing command-driven interfaces
- Exploring performance trade-offs in system design
- 🔌 TCP server support for multiple clients
- ⚡ Concurrency handling
- 📊 Advanced data structures (lists, sets, etc.)
- 🧠 Optimizations inspired by Redis
This is a personal learning project, but suggestions and improvements are welcome.
V SS Karthik
“Built to understand systems, not just use them.”