1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.

Slides:



Advertisements
Similar presentations
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Advertisements

Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
Consistency and Replication
1 CS 194: Lecture 8 Consistency and Replication Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Lecture 7 Data distribution Epidemic protocols. EECE 411: Design of Distributed Software Applications Epidemic algorithms: Basic Idea Idea Update operations.
Consistency and Replication (3). Topics Consistency protocols.
Consistency and Replication Chapter 6. Object Replication (1) Organization of a distributed remote object shared by two different clients.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Distributed Systems1 Chapter 8: Replication and Consistency  Replication: A key to providing good performance, high availability and fault tolerance in.
Consistency And Replication
Consistency and Replication
Distributed Systems CS Consistency and Replication – Part III Lecture 12, Oct 12, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
Computer Science Lecture 16, page 1 CS677: Distributed OS Last Class: Web Caching Use web caching as an illustrative example Distribution protocols –Invalidate.
CS 582 / CMPE 481 Distributed Systems
Consistency and Replication. Why Replicate Data? Enhance reliability. Improve performance. But: if there are many replicas of the same thing, how do we.
Consistency and Replication Chapter 6. Reasons for Replication Data replication is a common technique in distributed systems. There are two reasons for.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Consistency, Replication and Fault Tolerance
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
Concurrency Control & Caching Consistency Issues and Survey Dingshan He November 18, 2002.
Computer Science Lecture 16, page 1 CS677: Distributed OS Last Class:Consistency Semantics Consistency models –Data-centric consistency models –Client-centric.
University of Pennsylvania 11/21/00CSE 3801 Distributed File Systems CSE 380 Lecture Note 14 Insup Lee.
Multicast Communication Multicast is the delivery of a message to a group of receivers simultaneously in a single transmission from the source – The source.
Consistency and Replication Chapter 7
Consistency & Replication Chapter No. 6
Communication (II) Chapter 4
Consistency and Replication Chapter Concepts Reasons for Replication Reliability Earthquake, flood Misoperation Performance Place copies of data.
Consistency and Replication
Consistency And Replication
Distributed File Systems
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Consistency and Replication Chapter 7. n Most of the lecture notes are based on slides by Prof. Jalal Y. Kawash at Univ. of Calgary n Some notes are based.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Data Versioning Lecturer.
Consistency and Replication Chapter 6. Release Consistency (1) A valid event sequence for release consistency. Use acquire/release operations to denote.
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Outline Introduction (what’s it all about) Data-centric consistency Client-centric consistency Replica management Consistency protocols.
Consistency and Replication Distributed Software Systems.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
第5讲 一致性与复制 §5.1 副本管理 Replica Management §5.2 一致性模型 Consistency Models
Eduardo Gutarra Velez. Outline Distributed Filesystems Motivation Google Filesystem Architecture The Metadata Consistency Model File Mutation.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Distributed Systems CS Consistency and Replication – Part IV Lecture 21, Nov 10, 2014 Mohammad Hammoud.
Computer Science Lecture 14, page 1 CS677: Distributed OS Last Class: Concurrency Control Concurrency control –Two phase locks –Time stamps Intro to Replication.
Distributed File Systems
Chapter 7 Consistency And Replication (CONSISTENCY PROTOCOLS)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Consistency and Replication Chapter 6. Topics Reasons for Replication Models of Consistency –Data-centric consistency models –Client-centric consistency.
Distributed Systems CS Consistency and Replication – Part IV Lecture 13, Oct 23, 2013 Mohammad Hammoud.
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT By Jyothsna Natarajan Instructor: Prof. Yanqing Zhang Course: Advanced Operating Systems.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Distributed Systems CS Consistency and Replication – Part IV Lecture 14, Oct 28, 2015 Mohammad Hammoud.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Consistency and Replication CSCI 6900/4900. FIFO Consistency Relaxes the constraints of the causal consistency “Writes done by a single process are seen.
OS2 –Sem 1, Rasool Jalili Consistency and Replication Chapter 6.
1 Prof. Orhan Gemikonakli Module Leader: Prof. Leonardo Mostarda Università di Camerino Distributes Systems – Consistency (2) Prof. Orhan Gemikonakli -
Gossip-based Data Dissemination
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT -Sumanth Kandagatla Instructor: Prof. Yanqing Zhang Advanced Operating Systems (CSC 8320)
Consistency and Replication
Distributed Systems CS
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
Last Class: Web Caching
Presentation transcript:

1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue for distributing data stores: deciding where, when, and by whom copies of the data store are to be placed.

Replica Placement The logical organization of different kinds of copies of a data store into three concentric rings.

3 Permanent Replicas Use web sites as an example: –Files replicated across a limited number of servers on a single local-area network –Mirroring to mirror sites geographically spread across the internet Distributed database –Database could be distributed and replicated across a cluster of workstations, where neither disks nor main memory are shared by processors –Database could be distributed, possibly replicated, across a number of geographically dispersed number of sites.

4 Server-Initiated Replicas Definition: copies of a data store that are to enhance performance and are created at the initiative of (the owner of) the data store. example: web hosting Problem: deciding when and where replicas should be created or deleted. Web hosting algorithm (Robinovich): two issues: replication can take place to reduce the load on a server specific files on a server can be migrated or replicated to servers in the proximity of requesting clients

5 Server-Initiated Replicas Counting access requests from different clients When the number of requests for a specific file F at server S drops below a deletion threshold, F can be removed from S. Must ensure at least one copy of each file continues to exist. When the number of requests for a specific file F at server S is over a replication threshold, F can be replicated in a server with many requests. If the number of requests is between the above two thresholds, F can only be migrated. The chosen server is the one with more than half of the total requests. Used mostly for read-only copies close to clients, whereas permanent replicas are used for backup or as the only updateable replica to guarantee consistency.

6 Client-Initiated Replicas Also known as caches. In principle, managing the cache is left entirely to the client. However, client may rely on the data store to inform it when cached data has become stale. Caches are generally kept for a limited amount of time to prevent using stale data, or to make room for other data. To improve the number of cache hits, caches can be shared between clients. Placement of client caches is simple: –on the same as the the client –on a machine shared by clients on the same local area network –extra levels of caching may be introduced

Update Propagation State versus Operations –What is actually to be propagated: Propagate only a notification of an update: what invalidation protocols do. When an operation on an invalidated copy is requested, that copy needs to be updated first, depending on the specific supported consistency model. –Use little bandwidth. –Best when the read-to-write ratio is low. Transfer data from one copy to another. –Used when the read-to-write ratio is high –Also possible to log the changes and transfer only those logs Propagate the update operation to other copies: also called active replication. When the parameters are small, this saves bandwidth. However, more processing power may be required by each replica.

8 Pull versus Push Protocols A comparison between push-based and pull-based protocols in the case of multiple client, single server systems. IssuePush-basedPull-based State of serverList of client replicas and cachesNone Messages sentUpdate (and possibly fetch update later)Poll and update Response time at client Immediate (or fetch-update time)Fetch-update time maintain high degree of consistency, useful when read-to-write ratio is high

9 Unicasting versus Multicasting In unicasting, when a server sends its updates to N other servers, it does so by sending N separate messages. With multcasting, the underlying network takes care of sending a message efficiently to multiple receivers. Multicasting can be efficiently combined with a push-based approach to propagate updates. With a pull-based approach, unicasting may be more efficient.

Epidemic Protocols Epidemic algorithms do not solve any update conflicts. Instead, their only concern is propagating updates to all replicas in as few messages as possible. Assumes all updates for a specific data item are initiated at a single server, to avoid write- write conflict.

11 Epidemic Protocols A popular propagation model is that of anti-entropy: a server P picks another server Q at random, and subsequently exchange updates with Q in one of three approaches: –P only pushes its own updates to Q: a bad choice if many servers are infective. –P only pulls in new updates from Q: useful when many servers are infective. –P and Q send updates to each other Rumor spreading (gossiping): If server P has just updated for data x, it contacts an arbitrary server Q and tries to push the update to Q. If Q has already updated, then with a probability 1/k, P may lose interest in spreading the update any further. –The fraction s of servers that will remain ignorant of the update satisfies

12 Removing Data Epidemic algorithms are good for spreading updates in eventual-consistent data stores. However, spreading the deletion of a data item is hard. Trick: record the deletion as another update, and keep a record of that deletion. The recording of a deletion is done by spreading death certificates. Death certificates should be eventually cleaned up. One way is use timestamp. If it can be assumed that updates propagate to all servers within a known finite time, the death certificates can be removed after the maximum propagation time has elapsed. To provide hard guarantee, a very few servers maintain dormant death certificates that are never thrown away.

13 Consistency Protocols: Primary-based Remote-Write Protocols (1) Primary-based remote-write protocol with a fixed server to which all read and write operations are forwarded. After finishing write, each backup server performs the update too. It may take a long time before the updating process is allowed to continue. (see next)

14 Primary-backup Protocol If we want to change the write to non-blocking, then fault tolerance will be a problem.

15 Local-Write Protocols (1) Primary-based local-write protocol in which a single copy is migrated between processes. Need to keep track of where each data item currently is.

16 Local-Write Protocols (2) Primary-backup protocol in which the primary migrates to the process wanting to perform an update. This could be applied to mobile computers operated in disconnected mode.

17 Replicated-Write Protocols Active Replication (1) The problem of replicated invocations: 1.Operations need to be carried out in the same order everywhere 2.Replication invocations

18 Active Replication (2) a)Forwarding an invocation request from a replicated object. b)Returning a reply to a replicated object.

19 Quorum-Based Protocols Three examples of the voting algorithm: a)A correct choice of read and write set b)A choice that may lead to write-write conflicts c)A correct choice, known as ROWA (read one, write all) Constraints on and :

20 Cache Coherence Protocols Two criteria to classify caching protocols: 1.Coherence detection strategy: when inconsistencies are actually detected static: compiler analysis dynamic: when during a transaction the detection is done 1.The transaction cannot proceed to use the cached version until its consistency has been validated 2.Let the transaction proceed while verification is taking place 3.Verify only when the transaction committed 2.Coherence enforcement strategy: how caches are kept consistent 1.Disallow shared data to be cached 2.Shared data can be cached: 1.Let the server send an invalidation to all caches whenever a data item is modified. 2.Simply propagate the update.

21 Cache Coherence Protocols What happens when a process modifies cached data –When read-only caches are used, update operations can be performed only by the servers, which subsequently follow some distribution protocol to ensure that updates are propagated to caches. –To allow clients to directly modify the cached data, and forward the update to the servers. This is followed in write- through caches. –Write-back cache: delay the propagation of updates by allowing multiple writes to take place before informing the servers.