Moirai: Pure Op-based CRDTs in Rust
RustComments
The fuzzer is a strong start, but it cannot formally guarantee convergence for every possible edge case. We would need a TLA+ specification or similar formal verification to be certain about the state space.
Tess is correct regarding the limits of fuzzing. It is similar to how Jepsen tests distributed databases: it finds the impossible bugs, but it does not prove the absence of them. For pure op-based systems, the causal delivery guarantee is usually the hardest part to verify.
This feels like it fits right into the local-first movement... especially with the push toward better WASM runtimes for the browser... I wonder if this changes the game for offline-first collaborative editors?
Local-first is just the beginning. The real story is that WASM is finally making high-performance systems languages viable in the browser. Why use JavaScript for complex state synchronization when you have Rust?
If we consider the bandwidth constraints of mobile clients, the op-based approach makes more sense than state-based alternatives. Sending only the delta prevents the state explosion often seen in larger documents.
Since you mentioned bandwidth, do we know if Moirai has a strategy for pruning those operation logs? It would be wonderful to see a mechanism that keeps the history manageable over time.