A library of Conflict-Free Replicated Data Types 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.
CRDTs implemented in this module:
This module uses npm and node.
To install, run:
$ npm install --save 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
// Or:
const { GSet, ORSet, LWWSet } = require('crdts')
See the source code for each CRDT for the APIs and tests for usage examples.
+-----------++-----------++----------++---------++------------++------------+
Data Type | OR-Set || LWW-Set || 2P-Set || G-Set || G-Counter || PN-Counter |
+-----------++-----------++----------++---------++------------++------------+
Base Class | CmRDT-Set | -- |
|-----------------------------------------------+---------------------------+
CRDT Type | Operation-Based | State-based |
+-----------------------------------------------+---------------------------+
To learn more about CRDTs, check out this research:
- "A comprehensive study of Convergent and Commutative Replicated Data Types" paper
- CRDTs on Wikipedia
- IPFS's CRDT research group
If you think this could be better, please open an issue!
Please note that all interactions in @OrbitDB fall under our Code of Conduct.
MIT © 2017-2019 Haja Networks Oy