$ redis-cli -p 6379127.0.0.1:6379> PINGPONG127.0.0.1:6379> SET mykey "Hello Redis" EX 60OK127.0.0.1:6379> TTL mykey(integer) 60127.0.0.1:6379> GET mykey"Hello Redis"C++ · Systems
ForgeDB
A Redis-compatible in-memory database written from scratch in C++17. It speaks the RESP2 protocol, so the standard redis-cli works against it.
- Single-threaded, non-blocking event loop on kqueue that serves many clients without locks, with per-client buffers for partial frames.
- Strings, lists, hashes and sets in a std::variant store, with TTLs expired both lazily and by an active sweep, plus Pub/Sub.
- Durable through fork() copy-on-write RDB snapshots (temp file, fsync, atomic rename) and an append-only log replayed on startup.
- C++17
- POSIX sockets
- kqueue
- RESP2
- GoogleTest
- CMake
