CRDTs
A CRDT library for JavaScript.
Work In Progress
This module provides a set of Conflict-Free Replicated Data Types for your JavaScript programs. All CRDTs in this library, except G-Counter, are currently operation-based.
Implemented CRDTs:
Usage
npm install crdts
const GCounter = GCounterconst PNCounter = PNCounterconst GSet = GSetconst TwoPSet = TwoPSetconst ORSet = ORSetconst LWWSet = LWWSet // Or:const GSet ORSet LWWSet =
See the source code for each CRDT for the APIs and tests for usage examples.
Inheritance
+-----------++-----------++----------++---------++------------++------------+
Data Type | OR-Set || LWW-Set || 2P-Set || G-Set || G-Counter || PN-Counter |
+-----------++-----------++----------++---------++------------++------------+
Base Class | CmRDT-Set | -- |
|-----------------------------------------------+---------------------------+
CRDT Type | Operation-Based | State-based |
+-----------------------------------------------+---------------------------+
CRDTs
CRDT research: https://github.com/ipfs/research-CRDT