Swarm Protocol 1.1.1-pre

Swarm is a protocol for op log based synchronization that supports massively replicated eventually consistent databases. Swarm is designed to function both on the server and the client side, hence it supports:

  • partial datasets,
  • client-side caching,
  • offline work and
  • real-time incremental sync.

At its core, Swarm is a replication system for a partially ordered operation logs. On top of that, users can run versioned data structures formally described as Replicated Data Types. The Swarm's main focus is on op-based CmRDTs. It also supports other constructs, such as state-based CvRDT, logged asynchronous RPC and others.

Swarm puts an accent on practicality. It arranges primitives in a way to make metadata overhead acceptable, a known hurdle in CRDT-based solutions. In particular, Swarm avoids the use of version vectors. Those turn untenable when every client device runs its own replica. Swarm op format is particularly lightweight to enable such apps as collaborative text editors where op==letter==keystroke.

A good entry point to start studying Swarm is its subscription handshakes.

Use Swarm.