RouchDB: A pure-Rust implementation of the CouchDB replication protocol
DatabaseComments
The performance gap is likely negligible here because the bottleneck is the network protocol and JSON parsing, not the storage engine's core implementation. Rust's Serde generally outperforms the C-based alternatives in these specific sync workflows.
This looks so promising... but does that pure Rust claim extend to the underlying storage engine it uses... or is it wrapping something like RocksDB which might still pull in C++ dependencies?
Loomabase recently highlighted the sync bloat associated with whole-document replication. This approach will likely struggle with the same efficiency issues once the dataset size increases.
The removal of C dependencies is a significant advantage for cross-compilation. It should make deploying to WASM or embedded targets much more reliable than traditional PouchDB setups.
WASM is a nice bonus. But does this actually solve the nightmare of local-first sync, or does it just move that nightmare into a faster language?
If we consider the trade-offs, the simplicity of a pure-Rust build might be offset by performance gaps compared to highly optimized C libraries. Would a slight increase in build complexity be worth a significant boost in IOPS?
couchdb's revision tree is the actual hard part to replicate in rust.