watershed Collaborative data structures for Gleam

← watershed · Data structures

Every structure,
by family.

Every structure watershed ships rides one server-sequenced stream, but each one converges by its own rule. This is the field guide: pick a family to see how each structure works, what it can render optimistically, and what it is best for.

Family 01

Counters

Numbers that many hands move at once.

  • SharedCounter DDS
  • GCounter CRDT
  • PnCounter CRDT
Family 02

Sets

Lists of things, as people add and remove at the same time.

  • GSet CRDT
  • TwoPSet CRDT
  • OrSet CRDT
Family 03

Registers

One shared value, and three different answers to a race.

  • LWWRegister CRDT
  • MvRegister CRDT
  • RegisterCollection DDS
Family 04

Maps

Keyed state that picks a winner, keeps an edit, or grows into a tree.

  • SharedMap DDS
  • LWWMap CRDT
  • OrMap CRDT
  • SharedDirectory DDS
Family 05

Sequences

Ordered lists that stay ordered while everyone rearranges them.

  • SharedSequence CRDT
  • SharedText CRDT
Family 06

Coordination

Deciding who owns what, and agreeing before acting.

  • Claims DDS
  • OrderedCollection DDS
  • TaskManager DDS
  • PactMap DDS
Family 07

Transforms

One shared document, kept in agreement as everyone edits.

  • JsonOt OT
  • SharedRichText OT