This repository contains implementations of the L-SEQ algorithm for fractional indexing, used to create naive list CRDTs (Conflict-free Replicated Data Types). L-SEQ provides a way to generate unique, sortable identifiers that can be inserted between any two existing identifiers, making it ideal for collaborative editing and distributed systems.
- **TypeScript**: `@peoplesgrocers/lseq` - Located in the `typescript/` directory
- **Rust**: `peoplesgrocers-lseq` - Located in the `rust/` directory
## What is L-SEQ?
L-SEQ is a sequence CRDT that uses fractional indexing to maintain a total order of elements in a distributed system. It allows multiple users to concurrently insert elements into a list without conflicts, automatically resolving the order based on the generated identifiers.
## Usage
Each implementation provides:
- Allocation of new identifiers between existing ones
- Comparison functions for sorting
- Serialization to/from strings
See the individual directories for language-specific documentation and examples.