In-Memory Key-Value Store with TCP Interface
A networked key-value store that accepts simple text commands (GET/SET/DEL) over TCP using Boost.Asio, backed by an in-memory hash map with optional periodic snapshotting to disk. Learners practice asynchronous networking with Boost.Asio, protocol design, and thread-safe data structures.
- Estimate
- ~9.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
Boost.Asio · std::unordered_map
Project roadmap
- 01
Set up the Boost.Asio TCP acceptor
~2hCreate an async TCP server that accepts incoming client connections.
- 02
Implement the command protocol parser
~2hParse newline-delimited GET/SET/DEL text commands from each client connection.
- 03
Implement the thread-safe store
~2hBack the store with std::unordered_map protected by a mutex, exposing get/set/delete operations.
- 04
Wire commands to store operations and responses
~1.5hExecute parsed commands against the store and write back a response line to the client.
- 05
Add periodic snapshotting to disk
~2hAdd a background timer that serializes the current store to a file every N seconds for durability.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack