Back to Projects
View on GitHub
My-Redis – A Lightweight, Redis-Inspired In-Memory Data Store
Java
Spring Boot
System Design
Concurrency
SOLID
Design Patterns
This project is a Redis-inspired in-memory key-value store, built from scratch using Java & Spring Boot. It explores system-level engineering concepts like concurrency, eviction policies, persistence, and design trade-offs. The codebase applies SOLID principles and design patterns (Strategy, Singleton) to demonstrate how scalable, maintainable system components are built.
Why This Project Matters
- Demonstrates concurrency control, eviction strategies, and memory management.
- Goes beyond frameworks to show low-level system design and performance trade-offs.
- Acts as a system design playground for building scalable infrastructure components.
Features
- GET / SET cache operations
- Pluggable eviction policies: LRU (Least Recently Used) & LFU (Least Frequently Used)
- Thread-safe operations for concurrency
- Spring Boot REST API for interaction
- Persistence manager (in-memory, pluggable for disk in future)
- Integration + Unit tests for reliability
How SOLID Principles & Patterns Apply
- Single Responsibility Principle: Each component has a single job (e.g., CacheStore, EvictionPolicy, PersistenceManager).
- Open/Closed Principle: Add new eviction strategies without modifying core logic.
- Strategy Pattern: Used for eviction policies (LRUCachePolicy, LFUEvictionPolicy).
- Singleton Pattern: Ensures only one global cache store instance.
- Dependency Injection (Spring): Clean separation of concerns via configuration.