Skip to content

LSEQ Algorithm

Sequential and ordered

  • LSEQ maintains a total order of elements in a sequence (text characters).
  • Every insertion or deletion preserves the logical position relative to other elements.
  • Ensures that all replicas converge to the same sequence, regardless of operation arrival order.
  • Critical for collaborative editing where order matters, like documents or code.

Idempotent

  • Provides deterministic IDs.
  • Operations can be applied multiple times without changing the final state.
  • Prevents duplication or corruption when messages are re-sent or arrive out of order.
  • Essential for distributed systems with network retries, replication, or multi-region synchronization.
  • Guarantees strong eventual consistency across all replicas.

Lightweight deterministic IDs

  • Scalabe because it's support to linear data structures optimized to large documents, with a lightweight deterministic IDs strategy to ensure idempotency in distributed solutions.

Offline support

  • Users can edit the document while disconnected from the network.
  • LSEQ operations are recorded locally and can be synchronized later without conflicts.
  • Ensures eventual consistency once the client reconnects.
  • Enables real-time collaborative editing even in unreliable network conditions.

NPM packages