How vikasjha2003/concurrent-kv works
Concurrent-KV is a single-node, multithreaded TCP key-value server. Its main workflow accepts newline-delimited client commands, parses and dispatches them, performs synchronized store operations, and returns protocol responses. The store also provides LRU eviction, TTL expiration, and manual binary snapshots; a separate benchmark client drives concurrent traffic. The source excerpts show the server-to-processor-to-store calls and snapshot operations. The README documents the benchmark and its connection to the server; internal benchmark implementation details were not sampled.
Main entry points: kv_store.cpp Key-Value Store · tcp_server.cpp TCP Server · main.cpp Startup · command_processor.cpp Command Processor
Components 10
Server Runtime
- Startup
src/main.cpp - TCP Server
src/server/tcp_server.cpp
Command Protocol
- Command Processor
src/command/command_processor.cpp
Store and Persistence
- Key-Value Store
src/store/kv_store.cpp - LRU Eviction
src/store/kv_store.cpp - TTL Expiration
src/store/kv_store.cpp - Snapshot Persistence
src/store/kv_store.cpp - Snapshot File
Load Testing
- Benchmark Client
src/bench/bench.cpp
Other components
- TCP Client
Connections 11
- Startup → Key-Value Store: creates and loads
src/main.cpp - Startup → Command Processor: creates
src/main.cpp - Startup → TCP Server: runs
src/main.cpp - TCP Client → TCP Server: sends commands
README.md - TCP Server → Command Processor: processes lines
src/server/tcp_server.cpp - Command Processor → Key-Value Store: dispatches operations
src/command/command_processor.cpp - Key-Value Store → LRU Eviction: maintains recency
src/store/kv_store.cpp - Key-Value Store → TTL Expiration: checks and sweeps
src/store/kv_store.cpp - Key-Value Store → Snapshot Persistence: loads and saves
src/store/kv_store.cpp - Snapshot Persistence → Snapshot File: reads and writes
src/store/kv_store.cpp - Benchmark Client → TCP Server: drives traffic
README.md