Code (Implementations)
General-purpose CRDT libraries
There are several open source CRDT libraries that can be used to build collaborative applications and replicated storage systems:
-
Automerge is a CRDT implementation with a JSON data model. It is implemented in Rust, with bindings to JavaScript (via WebAssembly) and various other languages. Network communication and storage are handled by a separate layer, called automerge-repo.
-
Yjs (paper 1, paper 2) is a modular framework for building collaborative applications on the web. It includes several common CRDTs and modules that integrate them with different editors, communication protocols, and databases. More information in this series of blog posts about Yjs.
-
Collabs is a collection of common CRDTs implemented in TypeScript, with the ability to extend the built-in algorithms with new, custom datatypes.
-
Diamond Types is a CRDT for plain text.
-
GUN (GitHub) is a graph CRDT implemented in JavaScript, using WebRTC networking. It includes public-key-based user authentication and encryption.
-
json-joy json-joy implement JSON CRDT specification, which is a JSON-like data structure that supports concurrent editing.
-
kappa-db is a JavaScript library for building your own CRDTs over append-only log architectures, with a reference implementation for Dat’s Hypercore data structure. Sort of a ‘build-your-own’ Automerge library.
-
Replicated Object Notation (RON) is a data format for encoding CRDT operations, implemented in several languages. It supports register, list, text, set, and counter datatypes. SwarmDB is a RON-based database, implemented in JavaScript.
-
Legion (GitHub, paper) provides a JavaScript implementation of counter, set, map, and list CRDTs, and a WebRTC-based networking layer.
-
Yorkie (GitHub) is a synchronization solution for building collaborative applications, using MongoDB for data storage.
-
The Akka actor framework includes implementations of several CRDTs.
-
Schism is a Clojure implementation of several CRDTs.
-
Erlang implementation of CRDTs from the Lasp system
-
Carlos Baquero’s C++ implementation of state-based CRDTs with delta mutations.
-
Eventuate is a toolkit for building applications using causally ordered event streams and CRDTs.
-
Logux (GitHub) is a state sync system built primarily for React/Redux in a client/server architecture, but can be used p2p and/or on its own.
-
Braid-HTTP (GitHub, IETF draft) is an effort to augment the HTTP protocol itself to include state synchronization as a primitive.
-
m-ld synchronises decentralised replicas of JSON-LD graph data, with a query API and pluggable networking and persistence.
-
SyncedStore Easy-to-use framework for building collaborative apps by making plain javascript objects sync automatically. Builds on top of Yjs, with a focus on easy integration with React / Vue / Svelte.
-
Hazelcast distributed data structures includes implementations of PN Counter
-
Dart CRDT complete Dart-native implementation of generic CRDTs that can easily be integrated into any Dart or Flutter application.
-
sql_crdt Dart implementation of Conflict-free Replicated Data Types (CRDTs) using SQL databases (currently Sqlite and Postgres).
-
Loro is a CRDTs library based on Replayable Event Graph, supporting rich text, list, map, and movable tree. It’s implemented in Rust with bindings to JavaScript.
Byzantine fault tolerant CRDT libraries
- Hyper Hyper Space (GitHub, Demo) A secure append-only distributed data layer, using Merkle-ized operational CRDTs for mutability.
CRDT verification languages and tools
- VeriFx language (GitHub) A functional object-oriented programming language with automated verification capabilities. It has been used to verify an extensive portfolio of CRDT and OT implementations.
Benchmarks
- crdt-benchmarks compares document size and performance of Yjs and Automerge.
Distributed databases
Several distributed databases also have built-in support for CRDTs:
-
Concordant is an edge-first database spanning the full cloud-edge spectrum. It supports a full library of Delta-based CRDTs and provides just-right consistency guarantees and security.
-
AntidoteDB is a geo-replicated database that supports highly available transactions, causal consistency, and several CRDTs.
-
The Riak database was one of the first to add CRDT support in 2013 (implemented in Erlang).
-
Soundcloud’s Roshi implements a set CRDT layer on top of a Redis storage backend.
-
Microsoft Azure CosmosDB allows conflicting values to be merged either using CRDTs, or using custom merge procedures.
-
Redis Enterprise (a commercial extension of Redis) uses CRDTs to enable multi-master replication between geographically distributed datacenters.
-
Ditto uses CRDTs for data sync between mobile devices.
-
OrbitDB is a peer-to-peer database built on top of IPFS and CRDTs.
-
The Dynomite storage system from Netflix uses CRDTs internally.
-
Weaveworks Mesh is a gossip-based replication system based on CRDTs.
-
Facebook’s internal Apollo database supports CRDT storage.
-
Macrometa Global Data Network (GDN) allows conflicting documents and graphs to be merged using operation-based CRDTs and stream-based geo-replication, while providing higher level SQL-like query language interface.
-
Circonus IRONdb The Circonus IRONdb time-series database has been in production use since 2011 and leverages CRDTs for all internal data types.
-
RxDB allows to write, store and replicate CRDTs on NoSQL documents with the CRDT Plugin.
-
ElectricSQL Local-first SQL system based on AntidoteDB and Rich-CRDTs.
-
HarperDB uses CRDTs to reconcile transactions across its globally-distributed application platform.
Distributed file systems
- Elmerfs: A distributed file system, with a FUSE interface, written in Rust. It uses CRDTs to avoid structural conflicts. Built above AntidoteDB.
Text editors
Several text editors use CRDTs:
-
Zed is a high-performance, CRDT-based multiplayer code editor from the creators of Atom and Tree-sitter. It’s open source and written in Rust.
-
crdt.el is a real-time collaborative editing environment for Emacs using Conflict-free Replicated Data Types.
-
The Teletype package for the Atom text editor uses a CRDT to enable real-time collaboration (talk). Tandem further extends this support to other text editors.
-
The Conclave text editor (a research project) supports peer-to-peer collaboration based on the LSEQ CRDT.
-
MUTE (the Multi-User Text Editor, a research project) also supports CRDT-based peer-to-peer collaboration.
-
The Xi text editor is currently only single-user, not collaborative, but it nevertheless uses CRDTs internally to allow plugins to run concurrently with the user thread, and hence improve performance.
-
Apple’s Notes app on iOS appears to be built upon CRDTs, as evidenced by header files in the operating system.
-
PeerPad (GitHub) is a collaborative text editor based on IPFS and CRDTs.
Other applications
Several other applications and systems also use CRDTs internally:
-
Actual, a budgeting app, uses CRDTs to allow sync across multiple user devices.
-
Evolu, a local-first platform designed for privacy, ease of use, and no vendor lock-in.
-
NextGraph a local-first framework and app based on the Semantic Web, Linked Data and RDF, with end-to-end encryption, rich-text, collaboration and social network features.
-
Pixelboard, a collaborative whiteboarding app, uses CRDTs to allow several people to draw at the same time.
-
TomTom GPS navigation systems use CRDTs to synchronise user data, such as favourite locations, across multiple devices.
-
Facebook’s OpenR routing platform internally uses CRDTs to manage its state.
-
Bet365, League of Legends, and PayPal have all reported using CRDTs internally.
-
Mapeo, a toolset mapping and monitoring human and environmental rights abuses uses CRDTs for syncronizing edits to maps.
-
Cobox, a collaborative data hosting platform uses CRDTs to syncronize edits to files on disk.
-
RetroShare, a friend to friend communication platform uses GXS (General eXchange System) which have CRDT properties to implement decentralized forums, blogs, mailing system etc.
-
StoryArk, an offline-first, privacy-centric social media app where the entire database is one big CRDT, making it trivial to merge real-time changes with the backend.
-
Libra, a weight manager with smooth dynamic charts that uses CRDTs to perform real time sync with all your devices and even share with other users.
-
tudo, an open-source to-do app that makes it easy to share lists without accounts or superfulous configuration.
Automerge users
Several collaborative (multi-user, multi-device) applications have been built using the Automerge CRDT library:
-
PushPin is a digital workspace for media and notes on a 2D canvas.
-
PixelPusher (blog post) is a multi-user pixel art editor.
-
Trellis (demo video) is a project management tool modelled after Trello.
-
Capstone (article) is a tablet app for taking notes and thinking through ideas.
-
Archbee is a documentation tool and knowledge base for engineering teams.
Yjs users
Yjs is used by several apps that are run in production:
-
JupyterLab is a web interface for the computational environment Jupyter.
-
Serenity Notes is an end-to-end encrypted collaborative notes app.
-
Nimbus Note is a note-taking app by Nimbus Web.
-
http://coronavirustechhandbook.com/ is a collaborative document that is edited by thousands of different people to work on a rapid and sophisticated response to the coronavirus outbreak and subsequent impacts.
-
Relm is a collaborative gameworld for teamwork and community.
-
JoeDocs is an open collaborative wiki.
-
Room.sh is a meeting application with integrated collaborative drawing, editing, and coding tools.
-
Pluxbox RadioManager is a web-based app to collaboratively organize radio broadcasts.
-
Cattaz is a wiki that can run custom applications in the wiki pages.
Other approaches for automatic conflict resolution
Libraries and applications that implement alternative conflict resolution techniques that are not CRDTs, but have some similarities:
-
Figma, a collaborative graphic design app, uses an approach inspired by CRDTs (but it relies on a central server to simplify things).
-
Fluid Framework is a collection of client libraries for distributing and synchronizing shared state, based on a CRDT-inspired distributed data structure.
-
Replicache is a JavaScript library for creating high-performance web user interfaces based on realtime sync. It is designed to integrate easily into common backend server architectures, and is inspired partly by CRDTs.