Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
/ immutable-crdt Public archive

A CRDT library that you can add to your existing codebase

Notifications You must be signed in to change notification settings

crcn/immutable-crdt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRDT library for immutable apps. Here's a simple:

import {Document} from "immutable-crdt";

let person = {
  firstName: "a",
  lastName: "b"
};

const doc2 = Document.initialize(person);
const doc = Document.initialize(person);
const mutations = doc.updateState({...person, firstName: "blah", lastName: "blah"});

doc2.applyMutations(mutations);
console.log(doc2.getState()); // { firstName: "blah", lastName: "blah" }

TODOS:

  • remove ID check
  • history
  • cache mutations that
  • snapshotting state for performance
  • benchmark testing
  • persistence
  • conflict resolution
  • pubnub examples
  • prevent applied mutations from being

Caveats:

  • Diffing method doesn't work for certain scenarios such as incrementing

About

A CRDT library that you can add to your existing codebase

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published