9 karma · joined April 19, 2020
• rockraft (https://github.com/lichuang/rockraft) — a strongly consistent distributed key-value store built on Raft consensus and RocksDB • coredb (https://github.com/lichuang/coredb) — a Redis-compatible distributed KV database with strong consistency, built on rockraft • docq (https://github.com/lichuang/docq) — a local-first document search and question-answering tool I also authored Distributed System Illustrated (https://www.codedump.info/dist-system-en/), a tutorial on distributed systems.
I'm looking for a senior or staff backend / distributed systems role at a company building database infrastructure, real-time data platforms, or data-intensive systems. Remote-first with APAC-friendly hours is ideal.
Blog: https://www.codedump.info/
Recently, I've been building two open-source projects: rockraft (https://github.com/lichuang/rockraft) and coredb (https://github.com/lichuang/coredb).
coredb is a strongly consistent Key-Value database built on top of openraft and RocksDB, offering full compatibility with the Redis protocol. In my opinion, the Redis protocol has become the de facto standard in the KV storage domain, and its ecosystem value should not be confined to traditional in-memory caching. By backing it with strongly consistent persistent storage, we can unlock entirely new possibilities and application scenarios—much like how HTTP evolved from a simple web page transfer protocol into a ubiquitous communication cornerstone.
Initially, I only intended to build coredb. However, during development, I realized that the "Raft + RocksDB" architectural combination possesses tremendous general-purpose value. Recognizing that other developers might also need such a reliable underlying foundation to build their own strongly consistent storage systems, I decoupled this core logic and extracted it into an independent foundational framework: rockraft.
Wiring openraft with RocksDB and decoupling the state machine replication logic wasn't trivial. If you're curious about the nitty-gritty implementation details, the architectural decisions, and the challenges I faced along the way, I've documented the whole journey in my blog here: https://www.codedump.info/en/post/20260412-rockraft/
I would love to hear your thoughts on this architecture, the code, or my take on the Redis protocol. Any feedback, questions, or harsh critiques are highly welcome!
In addition, after the litestream author went to fly.io, the project maintenance is very little, as far as I read down the feeling, there are still a lot of details can be optimised and polished, which need to continue to spend time later.