Mateo Sanabria, Nicolás Cardozo
This is not a finish project, we are actively working on it. Feel free to point mistakes or inconsistencies, peer review is always appreciated
What is a CRDT?
Interleaving Anomalies?
Byzantine Fault Tolerant?
CAP: Any distributed data store can provide only two of the following three guarantees
Availability
Every request receives a (non-error) response, without the guarantee that it contains the most recent write
Partition Tolerance
The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes
For example, in the context of internet-scale distribution requires data replication across multiple geographic locations with low latency and high availability
Strong Consistency:
Requires coordination for executing operations.
Challenges arise in the presence of network partitions or failures.
Weak Consistency:
Allows temporary divergence among replicas.
Requires a mechanism for merging concurrent updates into a common state.
Informally, eventual consistency means that replicas eventually reach the same final value if clients stop submitting updates:
Eventual Delivery: An update delivered at some correct replica is eventually delivered to all correct replicas Convergence: Correct replicas that have delivered the same updates eventually reach equivalent state
Some Eventual Consistency (EC) systems execute updates intermediately, only to later identify conflicts and roll back, resulting in resource wastage.
Resolving conflicts often necessitates a consensus among replicas to ensure consistent arbitration.
To address this, a stronger condition is needed to enhance efficiency and minimize resource wastage in EC systems.
Strong Convergence: Correct replicas that have delivered the same updates have equivalent state
Is an abstract data type designed to be replicated at multiple nodes and exhibiting the following properties:
Any replica can be modified without coordinating with any other replicas.
When any two replicas have received the same set of updates.
CRDTs rely on commutative operations to guarantee strong eventual consistency this avoids the need for synchronization, yielding high availability and low latency
Availability + Partition Tolerance + SEC
Context: peer to peer COLLABORATIVE text editing
P2P Network, all messages will eventually arrive.
Multiple peers in the network.
Each pear has its document' copy.
A syncordian document is a list of line. A line of a document has:
(line_id) :: float -> allows to know the relative position of the line in the document.
status :: :tombstone | :aura | :settled
insertion_attempts :: integer -> Counter to keep track of the insertion attempts.
content :: String.t() -> The actual content of the line.
siganture :: String.t() -> A hash signature use to prevent Byzantine faults
A peer syncordian peer is composed of :
A peer ID
A syncordian document
A vector clock
Board Time!