How tmz16th/mini-redis works
mini-redis is a small in-memory key-value server. A client connects over TCP, sends newline-delimited commands, and receives command responses; SET, GET, and DEL operate on the shared store, while PING and QUIT are handled by the server. The TCP listener starts one thread per client, and an Arc<RwLock<Store>> coordinates concurrent access. The graph reflects the two implemented layers; persistence, snapshots, and async execution are roadmap items, not current components.
Main entry points: main.rs TCP Listener · store.rs In-Memory Store
Components 6
TCP Server
- TCP Listener
src/main.rs - Client Session
src/main.rs - Command Handler
src/main.rs
Shared Storage
- Shared Store Lock
src/main.rs - In-Memory Store
src/store.rs
Other components
- TCP Client
Connections 8
- TCP Client → TCP Listener: connects
README.md - TCP Listener → Client Session: spawns per client
src/main.rs - Client Session → Command Handler: dispatches commands
src/main.rs - TCP Listener → Shared Store Lock: initializes
src/main.rs - Command Handler → Shared Store Lock: reads or writes
src/main.rs - Shared Store Lock → In-Memory Store: protects
src/main.rs - Client Session → TCP Client: writes responses
src/main.rs - Command Handler → In-Memory Store: calls CRUD methods
src/main.rs