written 2.8 years ago by |
Replication & Consistency
• Often, distributed storage systems-like file systems, relational databases, or key-value stores-store a copy of the same data on multiple computers. This is known as replication.
• Data is generally replicated to improve performance and enhance reliability. Unfortunately, the replication of data can compromise its consistency, and thereby break programs that are unaware.
• The fundamental tension between performance (favouring weak consistency), and correctness (favouring strong consistency) is a recurring theme when designing concurrent and distributed systems, and is both practically relevant and of theoretical interest.
Consistency
• Keeping the replicas consistent : -
• When one copy is updated, we need to ensure other copies are also updated.
•To keep replicas consistent, need to ensure that all conflicting operations are done in the same order everywhere.
• Read-write conflict
Consistency Models
• Data Centric Consistency
• Continuous Consistency
• Sequential Consistency
• Client-centric Consistency
• Casual Consistency
• Write-write conflict
Data-Centric Consistency
Contract between processes and the data store:
• n processes obey the rules
• n the store works correctly
Continuous Consistency
• Replicas may differ in their numerical values.
• Replicas may differ in their relative staleness
• In this model, an application specifies each consistency requirements as a conits (abbreviation of consistency units). Conits specifies the data unit over which consistency is to be measured.
Sequential Consistency
The result of any execution is the same as if the(read and write) operations by all processes on the data-store were executed in the same sequential order and the operations of each individual process appear in the sequence in the order specified by the program.
Casual consistency
"Writes that are potentially causally related must be seen by all processes in the same order. Concurrent writes may be seen in a different order on different machines."
Client centric Consistency
• In distributed systems, maintaining sequential consistency in order to control the concurrent operations is essential. In some special data, stores without simultaneous updates, clientcentric consistency models can deal with inconsistencies in a less costly way.
• Replicas need to maintain Data centric consistency.
• Monotonic read consistency guarantees that after a process reads a value of data item x at time t, it will never see the older value of that data item.