Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flashkv

A multi-threaded, persistent key-value store in C++17, inspired by Redis.

Features

  • GET, SET, DEL, PING over a plain-text TCP protocol
  • LRU eviction with a configurable key cap (default: 1000 keys)
  • Append-only file (AOF) persistence — replays on restart
  • Thread pool (default: 4 workers) for concurrent client handling
  • No external dependencies

Build

make

Run

./kvstore

Listens on port 6379. Test with netcat:

nc localhost 6379
PING
SET name Atharv
GET name
DEL name

Benchmark

./kvstore &
python3 bench.py
python3 bench.py --ops 50000

Test

make test

Protocol

Plain text, newline-delimited:

SET <key> <value>  →  +OK
GET <key>          →  +<value>  |  -ERR not found
DEL <key>          →  +OK       |  -ERR not found
PING [msg]         →  +PONG     |  +<msg>

About

A Redis-inspired KV store in C++

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages