conflict resolution powered by crdts

Fast & Reliable Conflict Resolution, Online or Off

Traditional conflict resolution forces mobile developers to choose between speed and correctness. Ditto delivers both.
Forward-thinking enterprises use Ditto everyday to enhance and simplify their edge strategies

The Problem

Traditional conflict resolution breaks mobile workflows
  • Document-level conflict resolution is inefficient
    Entire documents are processed even when only a single field has changed.
  • Last-write-wins discards legitimate changes in offline situations
    When two devices edit the same data offline, simplistic strategies will overwrite one user's work even though both edits are valid.
  • Many conflict resolution strategies require reliable networks
    This breaks down in real-world mobile environments where connections drop, messages arrive out of order, and devices reconnect unpredictably.
  • Traditional strategies create bottlenecks as you scale
    Edge devices must route data through central servers, creating latency, bandwidth costs, and single points of failure.
an icon of a double checkmark
The Solution

CRDTs merge changes correctly. Delta-state makes it fast.
  • Delta diffs deliver correctness at speed
    Ditto calculates just the data that changed. This keeps conflict resolution both correct and blazingly fast, even over Bluetooth LE and peer-to-peer WiFi.
  • Mathematical guarantees ensure correct convergence without overwriting
    Version vectors track changes on-device as intelligent timestamps, enabling mathematically proven merges that always converge correctly.
  • Robust resolution over unreliable networks
    Ditto's CRDTs resolve conflicts correctly even when messages arrive out of order, get duplicated, or drop entirely—guaranteeing eventual consistency without requiring perfect networks or user intervention
  • Scale horizontally without coordination overhead
    Resolve conflicts on-device at the edge. Cloud becomes eventual storage rather than a required intermediary.

CRDTs 101

Why Ditto uses them

Simple Data Structures
A CRDT is a data structure that simplifies distributed data storage and multi-user applications.
Automatic Conflict Resolution
They have built-in strategies for handling concurrency conflicts like last-write wins.
Eventual & Causal Consistency
Ditto strengthens CRDT's eventual consistency with causal consistency for logically correct order.

Version Vectors Guarantee Correctness
No confusion, no duplicates, just seamless synchronization.
Ditto's CRDTs use version vectors (think of them as intelligent timestamps) to track every change. Each device knows what changes it's made and what it's seen from others. When devices reconnect, they instantly determine what's new and what's old, merging updates in the right order even if changes happened simultaneously offline or across the globe.
Learn more in the docs
Learn more about Ditto's intelligent sync
Your mobile and edge devices are more powerful than you realize, capable of advanced offline networking and data transport without the need for hardware.
Learn More
Customer Story
Ditto brings Dnero to market twice as fast with 50% fewer developers
The Ditto ecosystem solves for networking and data syncing, so our developers don’t have to
John Komarkowski
Co-founder, dnero
Frequently Asked Questions

Both full-state and delta-state are types of state-based CRDTs. The difference is in how much data actually gets replicated when a merge occurs. Full-state CRDTs must replicate the entire document every time any field changes, which wastes bandwidth when only one property updates frequently.

Delta-state CRDTs replicate only the differences (deltas) between states, dramatically reducing bandwidth. However, most delta-state implementations require buffering deltas per peer until delivery is confirmed, which doesn't work in ad-hoc meshes (like Ditto's implementation) where devices join and leave unpredictably.

Ditto developed a unique approach using version vectors and "diffs." When devices sync, they exchange version vectors, summaries of what changes each device has seen. By comparing version vectors, Ditto calculates on-demand the minimal state (the diff) needed to bring each peer up-to-date, without requiring per-peer buffers. This combines the bandwidth efficiency of delta-state with the flexibility of full-state CRDTs, making sync efficient even over Bluetooth LE and peer-to-peer WiFi.

To learn more, read this blog from our software engineer behind the implementation.


Both deltas and diffs represent changes in state, but they differ in how they're managed. Traditional delta-state CRDTs buffer deltas (the changes since the last sync) for each peer until delivery is confirmed. This requires tracking which peers have received which deltas—impractical when devices constantly join, leave, and reconnect.

Ditto's diffs are calculated on-demand by comparing version vectors between peers. Instead of maintaining buffers, Ditto determines exactly what data each peer needs at the moment of sync by checking what changes they haven't seen yet. This approach combines the bandwidth efficiency of deltas with the robustness of full-state CRDTs, without requiring memory overhead or known peer sets.


CRDTs resolve conflicts at the data structure level with clear semantics that preserve user intent. Version vectors detect whether changes happened sequentially (one after another) or concurrently (at the same time).

For concurrent edits, different CRDT types use different resolution strategies: Registers use last-write-wins (the edit with the latest timestamp wins), Maps use add-wins (all concurrent changes to different fields are preserved), and Counters merge additively (both increments are kept). Unlike traditional "last write wins" which discards one user's work arbitrarily, CRDTs ensure predictable, meaningful outcomes that represent the original intent.

Learn more in the docs.


Operation-based CRDTs require exactly-once or causal delivery to every peer, meaning operations must be delivered in the exact order they occurred, without loss. This requires tracking which peers have received which operations and buffering them until confirmed. This is impractical in ad-hoc meshes where devices disconnect for arbitrary periods and the set of "all peers" constantly changes.

State-based CRDTs place minimal constraints on the network. They handle reordered messages, duplicate deliveries, and dropped packets gracefully. Devices can sync with any peer at any time, and changes propagate through the mesh even when devices never communicate directly. This makes them ideal for mobile environments with unreliable connectivity, frequent offline operation, and unpredictable peer membership.


Causal consistency ensures that if one change depends on or happens after another change, those changes are always observed in the correct order—but concurrent changes (happening independently) can be seen in any order.

This prevents confusing scenarios where effects appear before their causes, while still allowing maximum flexibility for concurrent operations.

Learn more in the docs.


Strong consistency requires all devices to agree in real-time which is impossible when offline. Eventual consistency allows devices to converge over time but changes can appear in any order. Causal consistency ensures cause-and-effect relationships are preserved without requiring coordination. Ditto chose causal consistency because it provides logical ordering guarantees while working offline and in mesh networks.


CRDTs use version vectors, intelligent timestamps that track every change on every device. When devices sync, they compare version vectors to determine what data each peer has already seen versus what's new.

The merge operations are mathematically proven to be idempotent (applying the same change multiple times has the same effect as once), commutative (changes can be applied in any order), and associative (grouping changes differently produces the same result). This means messages can arrive out of order, get duplicated, or be dropped and devices will still be able to converge to identical states without requiring coordination between peers.


Each device maintains its own metadata database, a lightweight storage layer containing version vectors, sync state, and update history. When devices connect, they compare metadata to instantly determine what's new and calculate the minimal diff needed. This enables efficient sync without requiring per-peer buffers or centralized coordination.

Learn more in the docs.


Many CRDT systems maintain separate buffers for each peer, storing changes until they confirm receipt. This works for systems with known, stable peer sets, but breaks down in ad-hoc meshes where devices constantly join, leave, and reconnect. You'd need unlimited buffers for peers that might never return.

Ditto avoids this by calculating diffs on-demand from version vectors. Instead of remembering "what we sent to peer X," devices simply compare version vectors when they connect to determine what data each peer needs right now.


Devices don’t wait for connection to WiFi, servers, or the cloud. They create a localized mesh network and sync directly with each other over Peer-to-Peer Wi-Fi (think Airdrop), Bluetooth Low Energy, or Local Area Network. If one connection drops, Ditto automatically reroutes through another channel or device within the network.


Encrypted at the transport layer using version 1.3 of the Transport Layer Protocol (TLS), clients and servers are mutually authenticated prior to transmission of API and peer-to-peer access credentials. The use of mutually authenticated TLS (mTLS) mitigates potential risks posed by outside attackers attempting to masquerade as a valid API endpoint or peer in the mesh network to steal information.

Additionally, Ditto workloads and services are tightly controlled in a containerized Kubernetes environment.


Ditto's Multiplexing technology seamlessly switches between active transports such as WiFi, Bluetooth LE, peer-to-peer WiFi connections, and cellular networks in real-time. Instead of hoping one network stays reliable, Ditto maintains multiple simultaneous connections and automatically selects the optimal path for every data transfer.

Learn more on the peer-to-peer mesh networking page.