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 = require('crdts').GCounter
const PNCounter = require('crdts').PNCounter
const GSet = require('crdts').GSet
const TwoPSet = require('crdts').TwoPSet
const ORSet = require('crdts').ORSet
const LWWSet = require('crdts').LWWSet
const { GSet, ORSet, LWWSet } = require('crdts')
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