Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica.

Slides:



Advertisements
Similar presentations
Consistency Guarantees and Snapshot isolation Marcos Aguilera, Mahesh Balakrishnan, Rama Kotla, Vijayan Prabhakaran, Doug Terry MSR Silicon Valley.
Advertisements

Eventual Consistency Jinyang. Sequential consistency Sequential consistency properties: –Latest read must see latest write Handles caching –All writes.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed File Systems.
Replication Management. Motivations for Replication Performance enhancement Increased availability Fault tolerance.
Ch 9 – Distributed Filesystem Reading Assignment – Summary due 10/18 (CODA paper) Goals –Network Transparency – you don’t know where in the system the.
“Managing Update Conflicts in Bayou, a Weekly Connected Replicated Storage System” Presented by - RAKESH.K.
G Robert Grimm New York University Disconnected Operation in the Coda File System.
CS 582 / CMPE 481 Distributed Systems
“Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System ” Distributed Systems Κωνσταντακοπούλου Τζένη.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Department of Electrical Engineering
G Robert Grimm New York University Bayou: A Weakly Connected Replicated Storage System.
Concurrency Control & Caching Consistency Issues and Survey Dingshan He November 18, 2002.
Jeff Chheng Jun Du.  Distributed file system  Designed for scalability, security, and high availability  Descendant of version 2 of Andrew File System.
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.
6.4 Data and File Replication Gang Shen. Why replicate  Performance  Reliability  Resource sharing  Network resource saving.
Dynamo: Amazon’s Highly Available Key-value Store Giuseppe DeCandia, et.al., SOSP ‘07.
Practical Replication. Purposes of Replication Improve Availability Replicated databases can be accessed even if several replicas are unavailable Improve.
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.
Asynchronous Replication and Bayou. Asynchronous Replication client B Idea: build available/scalable information services with read-any-write-any replication.
Fault Tolerance via the State Machine Replication Approach Favian Contreras.
Replication: optimistic approaches Marc Shapiro with Yasushi Saito (HP Labs) Cambridge Distributed Systems Group.
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.
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.
Replication ( ) by Ramya Balakumar
Distributed File Systems Case Studies: Sprite Coda.
D u k e S y s t e m s Asynchronous/Causal Replication in Bayou Jeff Chase Duke University.
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.
Overview – Chapter 11 SQL 710 Overview of Replication
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
Optimistic Design 1. Guarded Methods Do something based on the fact that one or more objects have particular states  Make a set of purchases assuming.
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
CODA: A HIGHLY AVAILABLE FILE SYSTEM FOR A DISTRIBUTED WORKSTATION ENVIRONMENT M. Satyanarayanan, J. J. Kistler, P. Kumar, M. E. Okasaki, E. H. Siegel,
Asynchronous Replication and Bayou Jeff Chase CPS 212, Fall 2000.
IM NTU Distributed Information Systems 2004 Replication Management -- 1 Replication Management Yih-Kuen Tsay Dept. of Information Management National Taiwan.
1 Advanced Database Topics Copyright © Ellis Cohen Synchronous Data Replication These slides are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Mobile File System Byung Chul Tak. AFS  Andrew File System Distributed computing environment developed at CMU provides transparent access to remote shared.
CS425 / CSE424 / ECE428 — Distributed Systems — Fall 2011 Some material derived from slides by Prashant Shenoy (Umass) & courses.washington.edu/css434/students/Coda.ppt.
2/29/ Replication CSEP 545 Transaction Processing Philip A. Bernstein Sameh Elnikety Copyright ©2012 Philip A. Bernstein.
Fault Tolerance and Replication
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
Asynchronous Replication client B Idea: build available/scalable information services with read-any-write-any replication and a weak consistency model.
An Architecture for Mobile Databases By Vishal Desai.
3/6/99 1 Replication CSE Transaction Processing Philip A. Bernstein.
Bayou: Replication with Weak Inter-Node Connectivity Brad Karp UCL Computer Science CS GZ03 / th November, 2007.
Eventual Consistency Jinyang. Review: Sequential consistency Sequential consistency properties: –All read/write ops follow some total ordering –Read must.
EEC 688/788 Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
THE EVOLUTION OF CODA M. Satyanarayanan Carnegie-Mellon University.
Mobility Victoria Krafft CS /25/05. General Idea People and their machines move around Machines want to share data Networks and machines fail Network.
Mobile File Systems.
Coda / AFS Thomas Brown Albert Ng.
Nomadic File Systems Uri Moszkowicz 05/02/02.
Chapter 25: Advanced Data Types and New Applications
Lecturer : Dr. Pavle Mogin
6.4 Data and File Replication
Example Replicated File Systems
Outline Announcements Fault Tolerance.
Advanced Operating Systems Chapter 11 Distributed File systems 11
Today: Coda, xFS Case Study: Coda File System
Replication and Recovery in Distributed Systems
Assignment 8 - Solution Problem 1 - We replicate database DB1.
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Outline The Case for Non-transparent Replication: Examples from Bayou Douglas B. Terry, Karin Petersen, Mike J. Spreitzer, and Marvin M. Theimer. IEEE.
EEC 688/788 Secure and Dependable Computing
Presentation transcript:

Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica B replica A replica C Asynchronous replication is optimistic: since replicas can accept writes independently, it assumes that concurrent writes accepted by different replicas will be nonconflicting. Systems with synchronous replication may choose to be optimistic to improve availability, e.g., to accept writes issued to a subset of replicas that do not constitute a quorum. client A client B replicas

Detecting Update Conflicts: Traditional View Many systems view updates u and w as nonconflicting iff: u and w update different objects (e.g., files or records) u and w update the same object, but one writer had observed the other’s update before making its own. In other words, an update conflict occurs when two processes p and q generate “concurrent” updates to the same object. p and q updated the same object, but neither update happened-before the other. Updates to an object must follow a well-defined causal chain. Potential causality must induce a total order on the updates.

Example: Coda Coda is a highly-available replicated file system (successor to AFS) that supports disconnected operation. Data is stored in files, which are grouped in volumes, which are stored on servers. Files are the granularity of caching by clients. Volumes are the granularity of replication. VSG = Volume Storage Group == set of servers for a volume. Availability by read-any/write-all-available replication. On an open, read the file from the “most up-to-date” member of the Available VSG (AVSG). On a close after write, send the new version of the file to all members of the AVSG.

Version Vectors in Coda How to characterize the “up-to-dateness” of a file version? Solution: Coda Version Vectors. Coda nodes maintain a version vector CVV for each file F. CVV has one element for each server in the file’s VSG. CVV[i] is the # of writes received on this version of F at server i. On an open, client sets CVV to the server’s CVV. On a close, client updates CVV and propagates it to the AVSG. Increment CVV[i] for each server i that acknowledges the write. We can compare the CVVs to tell if one version of F has updates not reflected in the other. Two versions conflict if neither CVV dominates the other.

Update Conflicts: the Bayou Approach Bayou rejects the traditional “blind” view of conflicts: Updates might conflict even if they affect different records. Example: two meeting-room records that contain the same room number and overlapping times. Example: two bibliography database entries that describe the same document. Example: two bibliography database entries that describe different documents using the same tag. Concurrent updates to the same record might not conflict. Writes don’t conflict if they commute, e.g., they update different fields of the same record. Detecting/resolving conflicts is application-specific.

Application-Specific Reconciliation Only the application can decide how to reconcile conflicting updates detected as writes are applied. E.g., refdbms. Discard updates and deletions for already-deleted records. Change entry tag names to resolve add/add conflicts. e.g., change Lamport75 to Lamport75a field-specific update conflict resolution

Handling Update Conflicts in Bayou The primary commit protocol ensures that all sites commit the same writes in the same order. But this is not sufficient to guarantee that replicas converge. Dependency checks and merge procedures handle conflicts. Check/merge can examine any state in the replica. Check and merge procedures must be deterministic. Limit inputs to the current contents of the database. Execute with fixed resource bounds so they fail deterministically. Check/merge is executed every time a write is applied. Rollback must be able to undo the effects of a merge.