Giter Site home page Giter Site logo

crdt-sample's Introduction

Sample CRDTs

A repository containing some CRDTs implementations.

Python

CRDT Type Tests
[GCounter] Grow-Only Counter State-Based --
[PnCounter] Positive-Negative Counter State-Based --

Rust

CRDT Type Tests
[Aworset] Add-Wins Observed Remove Set State-Based aworset.rs
[Aworset Optimized] Add-Wins Observed Remove Set State-Based ---
[GCounter] Grow-Only Counter State-Based --
[PnCounter] Positive-Negative Counter State-Based --
[MvReg] Multi-Value Register [on progress] State-Based ---

Auxiliary structures

Some auxiliary structures were built to create some CRDTs:

Name Tests Explanation Reference
DotContext dotcontext.rs Bartosz Sypytkowski Blog delta-enabled-crdts

Usage

The cargo package is available at:

Add the following piece of code to your Cargo.toml:

[dependencies]
crdt-sample = "0.1.0"

Example

use crdt_sample::{AworsetOpt, NodeId};
fn main() {
    let node_id = NodeId::new(1, "addr".to_string());
    let mut  aworset: AworsetOpt<i32> = AworsetOpt::new(node_id);
    aworset.add(1);
    println!("{:?}", aworset);
    // AworsetOpt { id: addr1, set: {(addr1, 1, 1)}, cc: DotContext { cc: {addr1: 1}, dc: {} } }
}

References

  • [1] N. Preguiça, C. Baquero, and M. Shapiro, “Conflict-free Replicated Data Types (CRDTs),” arXiv:1805.06358 [cs], May 2018, doi: 10.1007/978-3-319-63962-8_185-1.
  • [2] P. S. Almeida, A. Shoker, and C. Baquero, “Delta state replicated data types,” Journal of Parallel and Distributed Computing, vol. 111, pp. 162–173, Jan. 2018, doi: 10.1016/j.jpdc.2017.08.003.
  • [3] P. S. Almeida, A. Shoker, and C. Baquero, “Efficient state-based CRDTs by delta-mutation,” in Networked systems, Cham, 2015, pp. 62–76.
  • [4] P. S. Almeida, A. Shoker, and C. Baquero, “Delta state replicated data types,” Journal of Parallel and Distributed Computing, vol. 111, pp. 162–173, Jan. 2018, doi: 10.1016/j.jpdc.2017.08.003.

crdt-sample's People

Contributors

jumaruba avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.