Client - Centric Consistency Models

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Client-Centric Consistency Models

Clients view of data-store


Ideally: black box -- complete transparency over how data is stored and managed

Introduction
n

The models weve talked about have system wide consistency for systems where concurrent processes may be updating the data store. Now, lets assume that there arent simultaneous updates to the data store, or that when they happen they can be easily resolved, and that most operations involve reading data.

Introduction (contd)
n

Consider the Domain Name System


In these systems, the vast majority of the operations are reads, and essentially all writes are done by central authorities (web page owners, host masters), so we never have write-write conflicts. n The only situation that needs to be handled are read write conflict. n Update propagate in a lazy fashion.
n

Eventual Consistency
If no updates take place for a long enough period time, all replicas will gradually (i.e., eventually) become consistent.
n

Situations where eventual consistency models may make sense


Mostly read-only workloads n No concurrent updates
n

Basic Architecture

n n

How well does eventually consistent (EC) work for mobile clients? Client-centric is for this. Consistent for a single client.

Client-Centric Consistency Models


n

Different Client-centric consistency models


Monotonic reads n Monotonic writes n Read-your-writes n Write-follows-reads
n

Goal: Show how we can perhaps avoid system wide consistency by concentrating on what specific clients want, instead of what should be maintained by servers.

Client-Centric Consistency Models


n

We describe client-centric consistency models with the following notation


xi[t] is the version of data item x at local copy Li at time t n WS(xi[t]) is the set of write operations at Li that have taken place since initialization (resulting in xi[t]) n If operations in WS(xi[t1]) have also been performed at local copy Lj at a later time t2, we have WS(xi[t1];xj[t2])
n

Monotonic Read Consistency


n

If a process reads the value of a data item x, any successive read operation on x by that process will always return that same value or a more recent value. Sequence (a) satisfies monotonic read consistency, but sequence (b) does not.

Example
n

distributed e-mail database


Mails can be inserted at different locations n Changes are propagated lazy. n A user reads his mail in Kolkata. n Assume that he does not change the mailbox, only reads the mails n He flies to New York and opens his mailbox n Monotonic read consistency guarantees that he sees all mails in his mailbox, he saw in Kolkata.
n

Monotonic Write Consistency


n

A write operation by a process on a data item x is completed before any successive write operation on x by the same process (all write operations are propagated to all replicas in order). Sequence (a) satisfies monotonic write consistency, but sequence (b) does not

Read-Your-Writes Consistency
n

The effect of a write operation by a process on data item x will always be seen by a successive read operation on x by the same process. Examples for missing this consistency
We change a web page but we still get the old version from the cache we have to push reload n We change the password but the propagation takes
n

Graphical Representation
n

Sequence (a) satisfies read-your-writes consistency, but sequence (b) does not

Writes-Follow-Reads Consistency
n

A write operation by a process on a data item x following a previous read operation on x by the same process is guaranteed to take place on the same or a more recent value of x than that which was read. Examples for missing this consistency
n

In a network discussion group.

Graphical Representation
n

Sequence (a) satisfies read-your-writes consistency, but sequence (b) does not

Thank You

You might also like