Skip to main content

Module merge

Module merge 

Source
Expand description

Merge algorithms and CRDT implementations for conflict resolution.

This module provides merge strategies for resolving concurrent edits to the same resource when multiple clients make simultaneous mutations. The module includes built-in support for CRDT-based merge algorithms.

§Merge-Types in Braid-HTTP

Per Section 2.2 of draft-toomim-httpbis-braid-http-04, resources can declare a merge type to specify how concurrent edits should be reconciled:

Merge TypeDescription
//!"diamond"
"antimatter"Antimatter CRDT with pruning
CustomApplication-defined merge algorithms

§Key Types

TypeDescription
MergeTypeTrait for pluggable merge algorithms
//!AntimatterMergeType
DiamondCRDTHigh-performance text CRDT
MergeTypeRegistryFactory for creating merge type instances

Re-exports§

pub use antimatter_merge::AntimatterMergeType;
pub use merge_type::MergePatch;
pub use merge_type::MergeResult;
pub use merge_type::MergeType;
pub use merge_type::MergeTypeRegistry;
pub use diamond::DiamondCRDT;
pub use diamond::DiamondMergeType;

Modules§

antimatter_merge
Antimatter implementation of MergeType trait.
diamond
Diamond-Types CRDT integration for Braid-HTTP text synchronization.
merge_type
MergeType trait - Pluggable merge algorithm interface for Braid-HTTP.