Professional Documents
Culture Documents
Chap 07v2 Nemo
Chap 07v2 Nemo
Chapter 7
Consistency And Replication
Scaling in numbers
Scaling in geographical area
Caveats
Consistency issues
Gain in performance
Cost of increased bandwidth for
maintaining replication
Committed
x=0
y=0
Deviation
x=0
y=5
Deviation
x=6
y=3
order
numerical
Access Consistency
Forms of access consistency
Atomic Consistency
Sequential Consistency
Causal Consistency
Processor Consistency
Notation:
Wi(x)a = Process i wrote object x with value a
Ri(x)a = Process i read object x with value a
W(x) a
R(x) a
in this sequence
in the order specified by its program.
00
10
11
P1
P2
P2
P1
P3
P3
10
10
11
P2
P3
P3
P2
P1
P1
01
01
11
P2
P1
P3
P2
P1
P3
11
11
11
Processor Consistency(1)
For a data store to be considered processor
consistent, it is necessary that the store obeys
the following condition:
Writes that are made by the same processor
must be seen by all processes
in the same order.
Writes by different processes
may be seen in a different order
on different machines.
P1:
P2:
W(x)a
W(x)b
R(x)b
R(x)a
Eventual Consistency
Replica-Server Placement(0)
Big issues:
How many replicas
Where to locate replicas
Replica-server placement:
Client-driven incremental
AS-based cells, demand-driven
Geometric cells, cluster-driven
Replica-Server Placement
Cluster spans two cells
Server-Initiated Replicas
Closest server
to C1 and C2
Client-Initiated Replication
a.k.a. caching
1. Improve access time
2. Flush cache to avoid stale data, and ...
3. ... to make room for more relevant data
4. Especially useful when cache serves
multiple clients, and ...
5. Clients exhibit correlated accesses
Remote-Write Protocols
W6
, W5
Local-Write Protocols
W1.5
Quorum-Based Protocols