
GoWire
Built a Redis-like in-memory key-value database from scratch using Golang, focusing on understanding the internals of database servers and their request-processing architecture.
Implemented TCP-based client communication, RESP protocol parsing and serialization, command validation and dispatching, and core string and hash operations.
Added concurrent client handling using goroutines, thread-safe storage with sync.RWMutex, and AOF (Append-Only File) persistence for data recovery across server restarts.
The project provided hands-on experience with network programming, protocol design, concurrency, storage management, and persistence mechanisms.
Industry
Software & Tech
Client
Independent
Timeline
October 2026 to October 2026
Live Product
Visit WebsiteThe Challenge
AOF Persistence: Implementing Append-Only File persistence while ensuring write operations are reliably recorded and replayed during server recovery without introducing excessive performance overhead.
Efficient Command Processing: Designing a streamlined execution pipeline for RESP parsing, command validation, and dispatching to minimize processing overhead and maintain low latency.
Concurrency & Thread Safety: Handling multiple simultaneous TCP clients using goroutines while ensuring safe access to shared storage.
Performance Optimization: Balancing persistence overhead, concurrent request handling, and command-processing efficiency to maintain consistent performance under concurrent workloads.
The Solution
TCP Networking: Handles multiple client connections over TCP.
RESP Protocol: Implements RESP parsing and serialization for client-server communication.
Command Execution: Supports command validation and dispatching.
Data Operations: Implements string operations (
SET,GET,DEL,EXISTS) and hash operations (HSET,HGET,HDEL,HEXISTS).Concurrent Clients: Uses Go goroutines to handle multiple client connections.
Thread-Safe Storage: Uses
sync.RWMutexto protect shared data.AOF Persistence: Records write operations and replays them during server startup for data recovery.
Summary
Designed and implemented the server architecture with a focus on maintaining an efficient request-processing pipeline, covering everything from TCP connection handling and RESP parsing to command validation, dispatching, and storage execution.
A key focus was balancing AOF persistence and data durability with request-processing latency, while keeping the parsing, validation, and dispatching stages streamlined to minimize processing overhead.
Benchmarked 80,000 commands across 50 concurrent TCP clients, achieving 7,858 commands/sec with AOF enabled. Evaluated p50, p95, and p99 latency to assess response-time distribution and performance under concurrent workloads.
This project strengthened my understanding of how Redis-like database servers handle networking, command execution, concurrency, and persistence internally.