Introduction to Loro
Loro is a developer toolkit designed for creating local-first software. It simplifies tasks such as:
- Facilitating the development of real-time and asynchronous collaborative applications
- Implementing synchronization over peer-to-peer networks
- Supporting offline editing capabilities
- Advancing version-controlled software development
We want to provide better DevTools to make building local-first apps easy and enjoyable. You can read our blog post to learn more about our vision.
Loro uses Conflict-free Replicated Data Types (CRDTs) to resolve parallel edits. By utilizing Loro's data types, your applications can be made collaborative and keep the editing history with low overhead.
Differences from other CRDT libraries
The table below summarizes Loro's features, which may not be present in other CRDT libraries.
Features/Important design decisions | Loro | Diamond-types | Yjs | Automerge |
---|---|---|---|---|
Replayable Event Graph (opens in a new tab) | ✅ | ✅ Inventor | ❌ | ❌ |
Peritext (opens in a new tab) rich text CRDTs | ✅[1] | ❌ | ❌ | ✅ Inventor |
Movable Tree (opens in a new tab) | ✅ | ❌ | ❌ | ❌ Inventor |
Movable List (opens in a new tab) | ✅ | ❌ | ❌ | ❌ Inventor |
Time travel | ✅ | ✅ | ✅[2] | ✅ |
Fugue (opens in a new tab) / Maximal non-interleaving | ✅ | ✅ | ❌ | ❌ |
JSON types | ✅ | ❓ | ✅ | ✅ |
Merging elements in memory by run length encoding | ✅ | ✅ | ✅ Inventor | ❌ |
Byzantine-fault-tolerance | ❌ | ❌ | ❌ | ✅ |
Super fast | ❌ | ✅ | ❌ | ❌ |
- [1] Loro uses a Peritext-like algorithm to merge the concurrent edits to rich text styles. It's different from the original design but it passes all the criteria listed in the paper.
- [2] Unlike others, Yjs requires users to store a version vector and a delete set, enabling time travel back to a specific point.
- Fugue (opens in a new tab) is a text/list CRDTs that can minimize the chance of the interleaving anomalies.