Building applications that can reliably synchronise data in peer-to-peer, multi-hop edge networks is a significant challenge. These environments are often characterised by high latency, low bandwidth, and intermittent, opportunistic connectivity. Today, we are excited to open-source dson, a Rust crate that provides a robust foundation for exactly these scenarios.
dson is a low-level, space-efficient (both in memory and on the wire), and composable implementation of a đż-state (delta-state) Conflict-Free Replicated Datatype (CRDT) for JSON-like data structures. It is based on the principles from the research paper DSON: JSON CRDT Using Delta-Mutations For Document Stores and began as a Rust port of the original authorsâ JavaScript implementation.
CRDTs offer a principled approach to optimistic replication. At their core, they are a tool for building AP (Availability + Partition Tolerance) systems, as defined by the CAP Theorem. In environments where network partitions are a given, CRDTs allow us to choose availability over strong consistency. This means applications can remain fully operational for both reads and writes, even when disconnected.