Skip to main content
A CRDTMap is a collaborative map where each key holds its own independent CRDT (GCounter, PNCounter, ORSet, LwwRegister, or Presence). The type of each key is fixed at first write. Merge is performed per-key — keys are independent and never conflict with each other. Use this when you need a structured document with multiple independent fields, each with their own conflict resolution semantics.

Basic usage

Per-key CRDT types

Each key is permanently bound to its CRDT type at first write. Sending an operation of the wrong type to an existing key is rejected by the server.

LWW-Register key

GCounter key

PNCounter key

ORSet key

API

Merge semantics

Each key is merged independently using its inner CRDT’s lattice join. Two replicas that each update different keys will converge without conflict. Two replicas that update the same key converge using that key’s CRDT semantics (e.g. LWW-Register: higher HLC wins; GCounter: max per client). Keys are permanent — once created they cannot be deleted.