v1.0.0 - Core Engine, AOF Persistence & Graceful Shutdown
Initial release of tiny-redis, a lightweight in-memory key-value database written in Go implementing core Redis internals and protocol serialization.
Features
- Network & Concurrency: Multi-client TCP server utilizing a goroutine-per-connection model with thread-safe data access via
sync.RWMutex. - Wire Protocol: Handcrafted Redis Serialization Protocol (RESP) deserializer reading binary-safe bulk string arrays directly from buffered network streams (
bufio.Reader). - Storage & Operations: In-memory storage supporting
PING,ECHO,SET,GET,DEL,EXPIRE, andTTL. - Two-Tier Eviction:
- Passive: On-access validation during reads to evict stale entries immediately.
- Active: Probabilistic background sweeper running on a 100ms ticker with an adaptive 25ms execution cap.
- AOF Persistence: Mutating operations are logged to
appendonly.aofusing raw RESP format and deterministically replayed on server startup. - Graceful Shutdown: Traps
SIGINT/SIGTERMvia channels to cleanly exit the connection accept loop, flush unwritten kernel page buffers to disk viafsync, and close file descriptors.