Replication(cont.)

Consistency models

Consistency model is a contract between a (distributed) data store and processes, in which the data store specifies precisely what the results of read and write operations are in the presence of concurrency.

A data store is a distributed collection of storages:

Снимок экрана 2022-11-13 в 6.58.20 PM.png

Some notations

Read and write operations

Assume that time axis is drawn horizontally, with time increasing from left to right and all data items have value NIL.

Strong (strict) consistency

Formal definition

<aside> ⛔ Any read on a data item ‘x’ returns a value corresponding to the result of the most recent write on ‘x’ (regardless of where the write occurred).

</aside>

Examples:

Снимок экрана 2022-11-13 в 8.20.00 PM.png

FIFO Consistency

FIFO consistency writes done by a single process are seen by all other processes in the order in which they were issued, but writes from different processes may be seen in a different order by different processes.

Снимок экрана 2022-11-13 в 8.28.32 PM.png

Causal Consistency