Docsity

Consistency and Replication: Eventual Consistency vs. Client-Centric Consistency Models - , Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Consistency and Replication: Eventual Consistency vs. Client-Centric Consistency Models - and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Consistency and Replication

(part b) EECS 591

Farnam Jahanian

University of Michigan^ Tanenbaum Chapter 6.1-6.

Eventual Consistency

-^

A very weak consistency model characterized by the lack ofsimultaneous updates or easy-to-resolve simultaneous updatesby a small set of processes

-^

Common property of data stores with eventual consistency: ifno update takes place for a long time,

all replicas will gradually

become consistent, i.e. propagate updates to all replicas in alazy fashion.

-^

Cheap to implement (later).

-^

Examples:^ – DNS: name space partitioned into domain, each domain is

assigned to a single naming authority (responsible formaking updates), updates propagated to all copies in a lazyfashion.

  • Web pages: typically updated by a single client, no write-

write conflicts, cache copies may be out-of-date, acceptableto have inconsistency for a short interval.

Client-Centric Consistency

-^

Originated from the work on Bayou DB for mobile systems –wireless access and/or unreliable network connectivity

-^

Provides guarantees for a single client’s access to a replicateddata store

-^

No guarantees concerning accesses by different clients

-^

Four models in client-centric consistency:^ –^

Monotonic Read Consistency

-^

Monotonic Write Consistency

-^

Read-your-writes Consistency

-^

Writes-follows-reads Consistency

Monotonic Reads

If a process reads the value of a data item x, any successive read operationson x by that process will always return that same value or a more recentvalue.

(i.e. if P sees x, it will never see an older version of x) The read operations performed by a single process

P^

at two different local

copies of the same data store. a)^

A monotonic-read consistent data store b)^

A data store that does not provide monotonic reads.

Read Your Writes

The effect of a write operation by a process on data item x will always be seena successive read operation on x by the same process. (i.e. a write operation isalways completed before a successive read operation by the same process, nomatter where the read takes place.)

a)^

A data store that provides read-your-writes consistency.

b)^

A data store that does not.

Writes Follow Reads

a)^

A writes-follow-reads consistent data store b)^

A data store that does not provide writes-follow-reads consistency A write operation by a process on a data item x following a previous readoperation on x by the same process, it is guaranteed to take place on the sameor a more recent value of x that was read. (i.e. any successive write operationby a process on x will be performed on a copy of x that’s up to date with thevalue most recently read by that process.)

Replica Placement

The logical organization of different kinds of

copies of a data store into three concentric rings.

Server-Initiated Replicas

Counting access requests from different clients.

Pull versus Push Protocols

A comparison between push-based and pull-based protocols

in the case of multiple client, single server systems.

Fetch-update time

Immediate (or fetch-update time)

Response time atclient

Poll and update

Update (and possibly fetch update later)

Messages sent

None

List of client replicas and caches

State of server

Pull-based

Push-based

Issue Read-to-updateratio

Best if high

Best if low

Consistency Protocols

A consistency protocol describes a specific implementation of a

consistency model

Most common consistency models in practice: sequential

consistency, weak consistency with synchronization variables,eventual consistency, atomic transactions

Terminology: (other texts) Primary-back approach = Passive replication State-machine approach = Active Replication

Primary-based Approach

(no backup replication)

Primary-based remote-write protocol with a fixed server

to which all read and write operations are forwarded.

Primary-Backup Protocol

(remote-write protocol)

Blocking vs. non-blocking

update of backups

Local-Write Protocols^ (P-B Approach with Migrating Primary)

Primary-backup protocol in which the primary migrates

to the process wanting to perform an update.

Replicated Writes –

Active Replication Approach

•^

Also known as state-machine replication

-^

Alternative to P-B approach

-^

Every replica is a primary, no backup

-^

Each replica has an associated process; each update is sent in the form ofan operation to all replicas which execute the operation

-^

All updates (i.e. operations) need to be carried out in the same order at allreplicas

Æ

the state of all replicas are updated in the same order

•^

totally-ordered multicast is the underlying mechanism for active replication

-^

Scalability is an issue

S1 S2^ S3^ S

C1 C2^ C3 Clients

Replicated Servers