Simplee |> Euklid
Rust crate for the CRDTs.
Dot
The Dot is implementing a marked version.
extern crate euklid;
use Dot;
// Create a dot for actor Alice.
let mut dot = new;
// Increment the dot.
dot.apply_inc;
More examples can be found in the example file.
Vector Clock
The VClock is implementing a vector clock.
extern crate euklid;
use ;
// Create a vclock and increment the counter for user A.
let mut a = new;
// Increment the counter for actor A
a.apply;
// Increment the counter for actor B
a.apply;
More examples can be found in the example file.
G-Counter
The GCounter is implementing a grow-only counter.
xtern crate euklid;
use ;
// Create a vclock and increment the counter for user A.
let mut a = new;
// Increment the counter for actor A
a.apply;
// Increment the counter for actor B
a.apply;
// Increase the counter for actor A by 5
a.apply;
More examples can be found in the example file.
Resources
- A Comprehensive Study of Convergent and Commutative Replicated Data Types
- John Mumm - A CRDT Primer: Defanging Order Theory
- Conflict Free Replicated Data Types on Wiki
- rust-crdt
- Rust code coverage
- Github workflows for Rust
Thank you!!!
You can contact me at veminovici@hotmail.com. Code designed and written in Päädu, on the beautiful island of Saaremaa, Estonia.