Drax provides a few, common CRDTs for building distributed systems. Drax only provides the data structures themselves and does not provide a means to replicate or distribute these data structures across your cluster.
State based, Observed-Removed Sets. It supports causal additions and deletions. In the case of a conflit Add wins. Because this CRDT is state based it requires that you replicate the entire CRDT to other nodes. This is prohibitive if you have a large number of elements in the set.
A monotonicly increasing counter, similar to vector clocks.
You don't. In all reality you probably want to just use the CRDTs provided in Lasp. That said, I do have some simple goals for this project:
- Learn more about how to properly implement and test CRDTs.
- Provide a limited set of common CRDTs that I think are useful for the majority of projects.
- Serve as a reference document for how CRDTs work.
Probably not. But then again you probably shouldn't be building stateful services anyway so if you're here then you're my kinda people. Look at the code and see if they do what you need them to do.
def deps do
[
{:drax, "~> 0.1.0"}
]
end