Explore projects
Gointermediatebackend
Key-Value Store with WAL
Persistent key-value store in Go with a Write-Ahead Log for durability, CRUD operations, and a simple TCP protocol.
5 steps
Project steps
- 01
In-memory storage
map[string][]byte protected with sync.RWMutex for Get/Set/Delete operations.
- 02
Write-Ahead Log
Before each mutation, write op+key+value to the WAL (append-only file).
- 03
Recovery
On startup, replay the WAL to reconstruct the in-memory state.
- 04
TCP Protocol
TCP server with text commands: SET key value, GET key, DEL key, KEYS *.
- 05
Compaction
Periodically, compact the WAL by writing a snapshot and truncating the old log.
Recommended resources
Ready to build this?
Fork the repo on GitHub and start building. A mentor will review your code when you open a PR.
5 steps
Tech stack
Goencoding/gobnetsync