Sunday, May 3, 2020

Discuss and differentiate different client-centric consistency models by providing suitable example

Q. Discuss and differentiate different client-centric consistency models by providing suitable example. (December 2018) (10 Marks).
Ans -  Consistency Model
  1. A consistency model is contract between a distributed data store and processes, in which the processes agree to obey certain rules in contrast the store promises to work correctly.
  2. A consistency model basically refers to the degree of consistency that should be maintained for the shared memory data.
  3. If a system supports the stronger consistency model, then the weaker consistency model is automatically supported but the converse is not true.

Client-centric

  • Client-centric consistency models aim at providing a system wide view on a data store.This model concentrates on consistency from the perspective of a single mobile client.
  • Client-centric consistency models are generally used for applications that lack simultaneous updates were most operations involve reading data.

i.Eventual Consistency
  • In Systems that tolerate high degree of inconsistency, if no updates take place for a long time all replicas will gradually and eventually become consistent. This form of consistency is called eventual consistency.
  • Eventual consistency only requires those updates that guarantee propagation to all replicas.
  • Eventual consistent data stores work fine as long as clients always access the same replica.
  • Write conflicts are often relatively easy to solve when assuming that only a small group of processes can perform updates. Eventual consistency is therefore often cheap to implement.

ii.Monotonic Reads Consistency
 
  • A data store is said to provide monotonic-read consistency 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.
  • 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: A user can read incoming mail while moving. Each time the user connects to a different e-mail server, that server fetches all the updates from the server that the user previously visited. Monotonic Reads guarantees that the user sees all updates, no matter from which server the automatic reading takes place.

iii.Monotonic Writes
  • A data store is said to be monotonic-write consistent if a write operation by a process on a data item x is completed before any successive write operation on X by the same process.
  • A write operation on a copy of data item x is performed only if that copy has been brought up to date by means of any preceding write operations, which may have taken place on other copies of x.
  • Example: Monotonic-write consistency guarantees that if an update is performed on a copy of Server S, all preceding updates will be performed first. The resulting server will then indeed become the most recent version and will include all updates that have led to previous versions of the server.

iv.Read Your Writes
  • A data store is said to provide read-your-writes consistency if the effect of a write operation by a process on data item x will always be a successive read operation on x by the same process.
  • A write operation is always completed before a successive read operation by the same process no matter where that read operation takes place.
  • Example: Updating a Web page and guaranteeing that the Web browser shows the newest version instead of its cached copy.

v.Writes Follow Reads
  • A data store is said to provide writes-follow-reads consistency if a process has write operation on a data item x following a previous read operation on x then it is guaranteed to take place on the same or a more recent value of x that was read.
  • Any successive write operation by a process on a data item x will be performed on a copy of x that is up to date with the value most recently read by that process.
  • Example: Suppose a user first reads an article A then posts a response B. By requiring writes-follow-reads consistency, B will be written to any copy only after A has been written.

No comments:

Post a Comment