Você está na página 1de 9

Client centric consistency

models

Distributed Systems 2
Client-Centric Consistency models
Many systems: one or few processes perform updates
How frequently should these updates be made available to other
read-only processes?
Examples:
DNS: single naming authority per domain
Only naming authority allowed updates (no write-write conflicts)
How should read-write conflicts (consistency) be addressed?
NIS: user information database in Unix systems
Only sys-admins update database, users only read data
Only user updates are changes to password

Distributed Systems 3
Eventual Consistency
In absence of updates, all replicas converge towards identical copies
Only requirement: an update should eventually propagate to all replicas
Cheap to implement: no or infrequent write-write conflicts
Things work fine so long as user accesses same replica
What if they dont:

Distributed Systems 4
Semantics of Client-Centric Models
Assume read operations by a single process P at two different local
copies of the same data store
Four different consistency semantics
Monotonic reads
Once read, subsequent reads on that data items return same or more
recent values
Monotonic writes
A write must be propagated to all replicas before a successive write by the
same process
Resembles FIFO consistency (writes from same process are processed in
same order)
Read your writes: read(x) always returns write(x) by that process
Writes follow reads: write(x) following read(x) will take place on same
or more recent version of x

Distributed Systems 5
Monotonic Reads
The read operations performed by a single process P at two different
local copies (L1 and L2) of the same data store.
Where xi denotes the version of x at local copy Li, and WS represents
a write sequence, WS(x1; x2) denotes that x1 version is formed before
x2.
Ex: a user reads email x1 in New York, and then flies to Toronto, open
the copy of email box there, monotonic reads consistency guarantees
that x1 will be in the mail box in Toronto.

A monotonic-read consistent data store A data-store that is not monotonic-read
Distributed Systems 6
Monotonic Writes
The write operations performed by a single
process P at two different local copies of the same
data store
Resembles to PRAM, but here we are considering
consistency only for a single process (client)
instead of for a collection of concurrent processes.
A monotonic-write consistent data store A data store that is not monotonic-write
Distributed Systems 7
Read-Your-Writes
Closed related to monotonic reads
A write operation is always completed before a
successive read operation by the same process
Ex: editor and browser, if not integrated, you may
not read-your-writes of an HTML page

Read-your-writes consistency Non Read-your-writes consistency
Distributed Systems 8
Write-follow-reads
Writes-follow-reads consistent Non Writes-follow-reads consistent
Updates are propagated as the result of previous read operation
Any successive write operation on x by a process will be performed on
a copy of x that is most recently read by that process
Ex: comments on news group, let A an article read recently, R the
response to that article, then R must follows A.
Thank You

Você também pode gostar