Upload
sangita-ajay
View
215
Download
0
Embed Size (px)
Citation preview
8/11/2019 cclientserver
1/9
Clientcentric consistency
models
8/11/2019 cclientserver
2/9
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
8/11/2019 cclientserver
3/9
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:
8/11/2019 cclientserver
4/9
Distributed Systems 4
Semantics of Client-Centric Models
Assume read operations by a single process Pat two differentlocalcopies of the same data store Four different consistency semantics
Monotonic reads
Once read, subsequent reads on that data items return same or morerecent values
Monotonic w r i tes
A write must be propagated to all replicas before a successive write by thesame process
Resembles FIFO consistency (writes from same process are processed insame order)
Read you r wri tes: read(x) always returns write(x) by that process
Writes fo l low reads: write(x) following read(x) will take place on sameor more recent version of x
8/11/2019 cclientserver
5/9
Distributed Systems 5
Monotonic Reads
The read operations performed by a single process Pat two differentlocal copies (L1 and L2) of the same data store.
Where xi denotes the version of x at local copy Li, and WS representsa write sequence, WS(x1; x2) denotes that x1 version is formed beforex2.
Ex: a user reads email x1 in New York, and then flies to Toronto, openthe copy of email box there, monotonic reads consistency guaranteesthat x1 will be in the mail box in Toronto.
A monotonic-read consistent data store A data-store that is not monotonic-read
8/11/2019 cclientserver
6/9
Distributed Systems 6
Monotonic Writes
The write operations performed by a singleprocess Pat two different local copies of the samedata store
Resembles to PRAM, but here we are consideringconsistency 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
8/11/2019 cclientserver
7/9
Distributed Systems 7
Read-Your-Writes
Closed related to monotonic reads
A write operation is always completed before asuccessive read operation by the same process
Ex: editor and browser, if not integrated, you maynot read-your-writes of an HTML page
Read-your-writes consistency Non Read-your-writes consistency
8/11/2019 cclientserver
8/9
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 processEx: comments on news group, let A an article read recently, R the
response to that article, then R must follows A.
8/11/2019 cclientserver
9/9
Thank You