120 likes | 250 Views
CIS 720. Lecture 16. Client-Centric Consistency. Intended to address the issues in eventual consistency for mobile clients. Consistent for a single client. Notation x i [ t ] is the version of x at local copy L i at time t .
E N D
CIS 720 Lecture 16
Client-Centric Consistency • Intended to address the issues in eventual consistency for mobile clients. • Consistent for a single client. • Notation • xi[t] is the version of x at local copy Li at time t. • Version xi[t] is the result of a series of write operations at Li that took place since initialization. This is represented by WS(xi[t]). • At time t, If operations in WS(x[t1]) have also been performed at local copy Lj, we write it as WS(xi[t1];xj[t]).
Read-after-read • A data store is said to provide read-read consistency if the following condition holds: • If a process reads the value of a data item x then any successive read operation on x by that process will always return that same value or a more recent value. • In other words, if a process has seen a value of x at time t, it will never see an older version of x at a later time. • Example: Suppose a user opens his mailbox in San Francisco, then flies to New York. Should he see an earlier version of his mailbox?
Write-after-write • In a writer-after-write consistent store, the following condition holds: • A write operation by a process on a data item x is completed before any successive write operation on x by the same process. • In other words, a write operation must wait for all preceding write operations.
Read Your Writes • A data store is said to provide read-your-writes consistency, if the following condition holds: • 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. • In other words a write operation is always completed before a successive read operation by the same process, no matter where the read operation takes place. • Suppose your web browser has a cache. • You update your web page on the server. • You refresh your browser. • Do you have read-your-writes consistency?
Writes Follow Reads • A data store is said to provide writes-follow-reads consistency, if the following holds: • 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 that was read. • In other words, any successive write operation by a process on a data item x is guaranteed to take place on a copy of x that is up to date with the value most recently read. • Example: Suppose we are replicating a database for a blog. Performing a write amounts to posting a response. If we do not use writes-follow-reads, then it would be possible for a user to read a response without the original.