Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.
/ crdts Public archive

A library of Conflict-Free Replicated Data Types for JavaScript

License

Notifications You must be signed in to change notification settings

orbitdb-archive/crdts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

45982c1 · Jan 18, 2023

History

92 Commits
Jan 18, 2023
Dec 14, 2022
Jan 8, 2023
Jan 8, 2023
Dec 10, 2017
Jul 7, 2020
Jan 15, 2019
Jan 15, 2019
Jan 16, 2019
Dec 14, 2022
Dec 8, 2017
Jan 17, 2023
Jan 17, 2023

Repository files navigation

CRDTs

npm version CircleCI Gitter Matrix

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:

Install

This module uses npm and node.

To install, run:

$ npm install crdts

Usage

import { GCounter, PNCounter, GSet, TwoPSet, ORSet, LWWSet, GSet, ORSet, LWWSet } from '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 Research

To learn more about CRDTs, check out this research:

Contribute

If you think this could be better, please open an issue!

Please note that all interactions in @OrbitDB fall under our Code of Conduct.

License

MIT © 2017-2019 Haja Networks Oy