Causally Consistent Transactions
The Big Peer’s replication engine enforces causal consistency. The causal consistency model is the strongest consistency model that can be achieved in network-shared distributed database systems designed for continuous data availability across interconnected nodes.
With causal consistency, the Big Peer guarantees real-time data synchronicity between all replicas. This is because transaction operations are seen by every interconnected node in the same order, which is based on their sequence and execution time:
- If a database operation is required to occur before another database operation in order to influence it, you must order the two database operations in the exact same sequence every time they are used. If not, the database operation dependent on the execution of another fails.
- If, however, the two transactional database operations have no dependencies and are independent instead, they can be ordered in any operational sequence.
- If the Big Peer receives document and CRDT diffs in multiple segments, the Big Peer waits to receive all segments before syncing the update across Small Peers.
Replicas are independent copies of the same data distributed across the platform.
Replicas provide fault tolerance and better performance by providing more capacity to serve reads.
To demonstrate fault tolerance Using a hypothetical scenario in which there are a total of three replicas distributed across peers, the following table provides an overview of the number of replicas that remain accessible in the event of hardware or network failure:
A disk fails and the local Ditto store is no longer accessible.
Two Small Peers become unreachable due to unstable network conditions.