Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements Tomorrow’s class is officially cancelled. If you need someone to go over the reference implementation.

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.
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Distributed Systems CS Consistency and Replication – Part II Lecture 11, Oct 10, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
“Managing Update Conflicts in Bayou, a Weekly Connected Replicated Storage System” Presented by - RAKESH.K.
Recovery 10/18/05. Implementing atomicity Note, when a transaction commits, the portion of the system implementing durability ensures the transaction’s.
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
“Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System ” Distributed Systems Κωνσταντακοπούλου Τζένη.
Transaction Management and Concurrency Control
Flexible Update Propagation for Weakly Consistent Replication Karin Petersen, Mike K. Spreitzer, Douglas B. Terry, Marvin M. Theimer and Alan J. Demers.
Transaction Management and Concurrency Control
Mobile Computing and Databases - A Survey A presentation by Dharmesh Thakkar based on the publication by Daniel Barbara.
Department of Electrical Engineering
Reliability and Partition Types of Failures 1.Node failure 2.Communication line of failure 3.Loss of a message (or transaction) 4.Network partition 5.Any.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
G Robert Grimm New York University Bayou: A Weakly Connected Replicated Storage System.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Client-Centric.
Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System D. B. Terry, M. M. Theimer, K. Petersen, A. J. Demers, M. J. Spreitzer.
Transaction. A transaction is an event which occurs on the database. Generally a transaction reads a value from the database or writes a value to the.
Practical Replication. Purposes of Replication Improve Availability Replicated databases can be accessed even if several replicas are unavailable Improve.
1 6.4 Distribution Protocols Different ways of propagating/distributing updates to replicas, independent of the consistency model. First design issue.
Mobility in Distributed Computing With Special Emphasis on Data Mobility.
Replication and Consistency. References r The Case for Non-transparent Replication: Examples from Bayou Douglas B. Terry, Karin Petersen, Mike J. Spreitzer,
Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Bayou. References r The Case for Non-transparent Replication: Examples from Bayou Douglas B. Terry, Karin Petersen, Mike J. Spreitzer, and Marvin M. Theimer.
Replication and Consistency. Reference The Dangers of Replication and a Solution, Jim Gray, Pat Helland, Patrick O'Neil, and Dennis Shasha. In Proceedings.
Chapter 1 In-lab Quiz Next week
Replication for Mobile Computing Prasun Dewan Department of Computer Science University of North Carolina
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
CIS 720 Lecture 16. Client-Centric Consistency Intended to address the issues in eventual consistency for mobile clients. –Consistent for a single.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
Overview – Chapter 11 SQL 710 Overview of Replication
Consistency and Replication. Replication of data Why? To enhance reliability To improve performance in a large scale system Replicas must be consistent.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Outline Introduction (what’s it all about) Data-centric consistency Client-centric consistency Replica management Consistency protocols.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
Mobile File System Byung Chul Tak. AFS  Andrew File System Distributed computing environment developed at CMU provides transparent access to remote shared.
11 Version Control Systems Mauro Jaskelioff (originally by Gail Hopkins)
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.
Feb 1, 2001CSCI {4,6}900: Ubiquitous Computing1 Eager Replication and mobile nodes Read on disconnected clients may give stale data Eager replication prohibits.
Information/File Access and Sharing Coda: A Case Study J. Kistler, M. Satyanarayanan. Disconnected operation in the Coda File System. ACM Transaction on.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica.
P51UST: Unix and SoftwareTools Unix and Software Tools (P51UST) Version Control Systems Ruibin Bai (Room AB326) Division of Computer Science The University.
An Architecture for Mobile Databases By Vishal Desai.
Client-Centric Consistency Models
Bayou: Replication with Weak Inter-Node Connectivity Brad Karp UCL Computer Science CS GZ03 / th November, 2007.
Consistency Guarantees Prasun Dewan Department of Computer Science University of North Carolina
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.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
THE EVOLUTION OF CODA M. Satyanarayanan Carnegie-Mellon University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Feb 22, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements Send today with people in your project group. People seem to be dropping off and I.
Chapter 13 Managing Transactions and Concurrency Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Consistency and Replication (1). Topics Why Replication? Consistency Models – How do we reason about the consistency of the “global state”? u Data-centric.
Mobility Victoria Krafft CS /25/05. General Idea People and their machines move around Machines want to share data Networks and machines fail Network.
Consistency and CAP 1. Reasons for Replication Data replication is a common technique in distributed systems. There are two reasons for data replication:
Nomadic File Systems Uri Moszkowicz 05/02/02.
Transaction Management and Concurrency Control
Concurrency Control.
Consistency and CAP.
Chapter 10 Transaction Management and Concurrency Control
Chapter 15 : Concurrency Control
Outline The Case for Non-transparent Replication: Examples from Bayou Douglas B. Terry, Karin Petersen, Mike J. Spreitzer, and Marvin M. Theimer. IEEE.
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
Presentation transcript:

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements Tomorrow’s class is officially cancelled. If you need someone to go over the reference implementation of HW 2, we can ask Vivek Kaluskar to go over his code

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing2 Outline Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System Douglas B. Terry, Marvin M. Theimer, Karin Petersen, Alan J. Demers, Mike J. Spreitzer and Carl H. Hauser. In ACM Symposium on Operating Systems Principles (SOSP ’95) –Epidemic algorithms –Serverless file system from MSR

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing3 Bayou Write Operation Bayou_Write(update, dependencyCheck, mergeproc) { IF (DB_Eval(dependency_check.query) <> dependency_check.expected_result) resolved_update = Interpret(mergeproc); ELSE resolved_update = update; DB_Apply(resolved_update); }

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing4 Example Scenario Three users A, B and C & three replicas X, Y and Z They write data items as follows: –A:, A:, A: –B:, B:, B: –C:, C:, C: A performs anti-entropy with B at and B at. C performs anti-entropy with B at and C at

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing5 Example scenario B will undo update from A, apply C and then A A:X A:1 A:5 A:10 B:Y B:1 B:5 B:10 C:Z C:1 C:5 C:10

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing6 Example scenario - Undos Support A&C at A:, C: & A:, B: A:X A:1 A:5 A:10 B:Y B:1 B:5 B:10 C:Z C:1 C:5 C:10

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing7 Conflict detection and resolution Dependency checks allow for application-specific conflict detection –Used to detect write-write conflict – two users update the same items without observing the other’s update –Dependency check for data items that write depended on Merge procedures allow for application-specific conflict resolution –Merge procedures are specific to each write –Bayou allows replicas to be accessible even when mergeprocs fail

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing8 Replica Consistency Eventual consistency – anti-entropy process Write are performed in the same, well-defined order at all servers Conflict detection and resolution are deterministic It is impossible to know if merge procedures are commutative

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing9 Write Stability and Commitment Primary commit scheme – One server takes responsibility for committing updates Writes from different servers may commit in a different order based on when the servers perform anti-entropy with the primary and each other

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing10 Applying Sets of Writes to Database Receive_Writes(writeset, received_from) { IF (received_from = CLIENT) { logicalclock = MAX(systemclock, logicalclock+1); write = First(writeset) write.WID = {logicalclock, myServerId}; write.state = TENTATIVE; WriteLogAppend(write) BayouWrite(write.update,write.dependency,write.merge) } ELSE { find insertion point; rollback till insertion point rollback from insertion point logicalclock = MAX(logicalclock, write.WID.timestamp); }

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing11 Access Control Certificates – Grant, delegate and revoke Certificates are shared via anti-entropy

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing12 Replica Selection Users specify expected session guarantee Users can choose based on network connectivity, usage patterns etc.

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing13 Session guarantees Read Your Writes - read operations reflect previous writes. –Users and applications find it particularly confusing if they update a database and then immediately read from the database only to discover that the update appears to be missing. This guarantee ensures that the effects of any Writes made within a session are visible to Reads within that session. In other words, Reads are restricted to copies of the database that include all previous Writes in this session

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing14 Session guarantees Monotonic Reads - successive reads reflect a non- decreasing set of writes. –The Monotonic Reads guarantee permits users to observe a database that is increasingly up-to-date over time. It ensures that Read operations are made only to database copies containing all Writes whose effects were seen by previous Reads within the session. –A user's appointment calendar is stored on-line in a replicated database where it can be updated by both the user and automatic meeting schedulers. The user's calendar program periodically refreshes its display by reading all of today's calendar appointments from the database. If it accesses servers with inconsistent copies of the database, recently added (or deleted) meetings may appear to come and go. The MR-guarantee can effectively prevent this since it disallows access to copies of the database that are less current than the previously read copy

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing15 Session guarantees Writes Follow Reads - writes are propagated after reads on which they depend. –The Writes Follow Reads guarantee ensures that traditional Write/Read dependencies are preserved in the ordering of Writes –Consider a weakly consistent replicated bulletin board database that requires users to post articles or to reply to articles by performing database Writes. The WFRP- guarantee can be used within this system to ensure that users see the replies to a posted article only after they have seen the original. A user who replies to an article must simply issue the reply in the same session as used to read the article being replied to. Users who are only reading articles need not request any guarantees

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing16 Session guarantees Monotonic Writes - writes are propagated after writes that logically precede them. –a Write is only incorporated into a server's database copy if the copy includes all previous session Writes; the Write is ordered after the previous Writes. –Consider a replicated database containing software source code. Suppose that a programmer updates a library to add functionality in an upward compatible way. This new library can be propagated to other servers in a lazy fashion since it will not cause any existing client software to break. However, suppose that the programmer also updates an application to make use of the new library functionality. In this case, if the new application code gets written to servers that have not yet received the new library, then the code will not compile successfully. To avoid this potential problem, the programmer can create a new session that provides the MW-guarantee and issue the Writes containing new versions of both the library and application code within this session.

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing17 Performance Size is acceptable Write performance is acceptable

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing18 Future Partial Databases –Carry part of the database instead of the entire database (mobile clients do not have enough storage space) The problem is that, if a client did not have a particular record, was it because it didn’t replicate that part of because it didn’t know about it? Need some sort of “death certificates”

Feb 7, 2001CSCI {4,6}900: Ubiquitous Computing19 Discussion