12/17/2015Distributed Systems - Comp 6551 Consistency and Replication The problems we are trying to solve Types of consistency Approaches to propagation.

Slides:



Advertisements
Similar presentations
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 7: Consistency 4/13/20151Distributed Systems - COMP 655.
Advertisements

Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
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
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.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
Distributed Systems CS Consistency and Replication – Part II Lecture 11, Oct 10, 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.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
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
Introducing … Distributed Systems.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Introduction Consistency models –Data-centric consistency models.
Tutorials 1 1.What is the definition of a distributed system? 1.A distributed system is a collection of independent computers that appears to its users.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
Computer Science Lecture 16, page 1 CS677: Distributed OS Last Class:Consistency Semantics Consistency models –Data-centric consistency models –Client-centric.
6.4 Data and File Replication Gang Shen. Why replicate  Performance  Reliability  Resource sharing  Network resource saving.
1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.
Consistency and Replication CSCI 4780/6780. Chapter Outline Why replication? –Relations to reliability and scalability How to maintain consistency of.
Consistency And Replication
CH2 System models.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
CIS 720 Lecture 16. Client-Centric Consistency Intended to address the issues in eventual consistency for mobile clients. –Consistent for a single.
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.
OS2- Sem ; R. Jalili Introduction Chapter 1.
Kyung Hee University 1/41 Introduction Chapter 1.
Distributed Computing Systems CSCI 4780/6780. Distributed System A distributed system is: A collection of independent computers that appears to its users.
Consistency and Replication Distributed Software Systems.
Replication (1). Topics r Why Replication? r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric consistency.
第5讲 一致性与复制 §5.1 副本管理 Replica Management §5.2 一致性模型 Consistency Models
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems: Principles and Paradigms By Andrew S. Tanenbaum and Maarten van Steen.
Distributed Systems CS Consistency and Replication – Part I Lecture 10, September 30, 2013 Mohammad Hammoud.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Consistency and Replication. Outline Introduction (what’s it all about) Data-centric consistency Client-centric consistency Replica management Consistency.
Distributed Computing Systems CSCI 6900/4900. Review Distributed system –A collection of independent computers that appears to its users as a single coherent.
Distributed Systems CS Consistency and Replication – Part IV Lecture 13, Oct 23, 2013 Mohammad Hammoud.
Client-Centric Consistency Models
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Replication Improves reliability Improves availability ( What good is a reliable system if it is not available?) Replication must be transparent and create.
Consistency and Replication Chapter 6 Presenter: Yang Jie RTMM Lab Kyung Hee University.
Distributed Systems CS Consistency and Replication – Part III Lecture 13, Oct 26, 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.
Primitive Concepts of Distributed Systems Chapter 1.
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.
Consistency and Replication (1). Topics Why Replication? Consistency Models – How do we reason about the consistency of the “global state”? u Data-centric.
PERFORMANCE MANAGEMENT IMPROVING PERFORMANCE TECHNIQUES Network management system 1.
CSE 486/586 Distributed Systems Consistency --- 1
Chapter 7: Consistency & Replication IV - REPLICATION MANAGEMENT -Sumanth Kandagatla Instructor: Prof. Yanqing Zhang Advanced Operating Systems (CSC 8320)
Distributed P2P File System
Linearizability Linearizability is a correctness criterion for concurrent object (Herlihy & Wing ACM TOPLAS 1990). It provides the illusion that each operation.
Database Environment Transparencies
CSE 486/586 Distributed Systems Consistency --- 1
Replication Improves reliability Improves availability
Consistency and Replication
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Distributed Systems CS
Last Class: Web Caching
CSE 486/586 Distributed Systems Consistency --- 1
Presentation transcript:

12/17/2015Distributed Systems - Comp 6551 Consistency and Replication The problems we are trying to solve Types of consistency Approaches to propagation

12/17/2015Distributed Systems - Comp 6552 Transparency in a Distributed System TransparencyDescription Access Hide differences in data representation and how a resource is accessed LocationHide where a resource is located MigrationHide that a resource may move to another location Relocation Hide that a resource may be moved to another location while in use ReplicationHide that a resource is replicated Concurrency Hide that a resource may be shared by several competitive users FailureHide the failure and recovery of a resource

12/17/2015Distributed Systems - Comp 6553 What problems does replication solve? Some capacity and performance problems –Keep replicas on both sides of a bottleneck –Keep replicas on both sides of a connection with long delays Two kinds of incoherence: –Replication provides some location transparency –Replication provides some failure transparency ( aka fault tolerance)  Continue to work if one copy goes down  Continue to work if the network goes down

12/17/2015Distributed Systems - Comp 6554 What problems does replication cause? Consistency –To maintain concurrency transparency, system has to keep replicas updated Complexity –To maintain replication transparency, system has to be able to locate and select appropriate replicas Overhead can take back capacity and performance gains

12/17/2015Distributed Systems - Comp 6555 If you remember only one two thing(s) … 1.There are many types of consistency, known as “consistency models” 2.As the consistency model gets stronger The system gets easier to use. The system gets harder to implement. The system gets slower and consumes more resources.

12/17/2015Distributed Systems - Comp 6556 Consistency and Replication The problems we are trying to solve Types of consistency Approaches to propagation

12/17/2015Distributed Systems - Comp 6557 Types of (data-centric) consistency

12/17/2015Distributed Systems - Comp 6558 Ground rules for examples Examples deal with a company’s inventory data Inventory data is replicated at every location This is for illustrative purposes; we are NOT claiming this is a good architectural idea Assume each process in each example is at a different location Assume that invisible processes propagate each update to all other copies Time moves left to right

12/17/2015Distributed Systems - Comp 6559 Strict consistency P1: P2: P1: P2: D=H D:DVD players, H:high, L:low, set:=, get:? D?H D=H D?LD?H Yes No

12/17/2015Distributed Systems - Comp Sequential consistency 1 P1: P2: P3: P4: D=H D=L D?L D:DVD players, H:high, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Sequential consistency 2 P1: P2: P3: P4: D=H D=L D?L D?H D:DVD players, H:high, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Sequential consistency - not P1: P2: P3: P4: D=H D=L D?L D?HD?L D?H D:DVD players, H:high, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Cost of sequential consistency Assume we have a distributed system with a replicated store and a feature to maintain consistency across the replicas Let r be the expected read time Let w be the expected write time Let t be the minimal packet transfer time between nodes in the system Then r + w  t

12/17/2015Distributed Systems - Comp Causal consistency P1: P2: P3: P4: D=L D?L D?HD?L D?H D=M D=H D?M No causal relationship Not sequentially consistent Potential causal relationships D:DVD players, H:high, M: medium, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Causal consistency - not P1: P2: P3: P4: D=L D?L D?H D=H D?L Potential causal relationship D:DVD players, H:high, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Causal consistency - ok P1: P2: P3: P4: D=L D?M D=M D?L No causal relationship D:DVD players, M:medium, L:low, set:=, get:?

12/17/2015Distributed Systems - Comp Types of (data-centric) consistency

12/17/2015Distributed Systems - Comp Eventual consistency DNS –A domain can only be updated by its naming authority (therefore, no write-write conflicts) –Updates propagated on a schedule –Most accesses work from cache –Can refresh a cached value on failure Web –A page can only be updated by its owner (again, no write-write conflicts) –Most accesses work from cache –Page can be refreshed if user suspects a failure

12/17/2015Distributed Systems - Comp Client-centric consistency

12/17/2015Distributed Systems - Comp Client-centric consistency models ModelThe idea Monotonic reads Each read by a process returns the same value as the previous read, or a more recent value Monotonic writes Each write by a process must complete before the next write of the data item by the process Read your writes Each write by a process will be visible in any subsequent read by that process Writes follow reads Each write by a process after a read will be done at all replicas on a value that is at least as recent as the value read

12/17/2015Distributed Systems - Comp Client-centric examples Imagine a discussion group with replicas in Columbus and Nairobi Imagine these events –Alice starts thread A –Bob starts thread B –Alice edits A to make A’ –Alice adds attachment to make A’’ –Carol posts reply AC

12/17/2015Distributed Systems - Comp Monotonic reads ColumbusNairobi Carol reads again OK B AA Carol reads B Not mono read

12/17/2015Distributed Systems - Comp Monotonic reads ColumbusNairobi Carol reads again OK A AB Carol reads B Not mono read

12/17/2015Distributed Systems - Comp Monotonic writes ColumbusNairobi OK A’ AA A’’ A’ Not mono write

12/17/2015Distributed Systems - Comp Read your writes ColumbusNairobi Alice reads again OK A AB AC B Not read your writes Alice reads AC Read your writes, but Non-monotonic reads

12/17/2015Distributed Systems - Comp Writes follow reads ColumbusNairobi AC arrives OK A A Carol reads AC Not writes follow reads

12/17/2015Distributed Systems - Comp Writes follow reads to prevent this ColumbusNairobi A AC A Carol reads AC Bob readsDave reads Dave sees reply before original

12/17/2015Distributed Systems - Comp Consistency and Replication The problems we are trying to solve Types of consistency Approaches to propagation

12/17/2015Distributed Systems - Comp Types of replicas Any experience with server-initiated replicas?

12/17/2015Distributed Systems - Comp What to propagate? Notifications Updated data Update operations

12/17/2015Distributed Systems - Comp Who initiates propagation? Server (push-based protocol) Client (pull-based protocol)