Raxol.Swarm.CRDT behaviour (Raxol v2.6.0)

View Source

Behaviour for convergent replicated data types (CRDTs).

All CRDTs must implement merge/2 which is required to be:

  • Commutative: merge(a, b) == merge(b, a)
  • Associative: merge(merge(a, b), c) == merge(a, merge(b, c))
  • Idempotent: merge(a, a) == a

Summary

Types

t()

@type t() :: term()

Callbacks

merge(t, t)

@callback merge(t(), t()) :: t()