1 Consistency of Replicated Data in Weakly Connected Systems CS444N, Spring 2002 Instructor: Mary Baker.

Slides:



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

Eventual Consistency Jinyang. Sequential consistency Sequential consistency properties: –Latest read must see latest write Handles caching –All writes.
Consistency and Replication Chapter 7 Part II Replica Management & Consistency Protocols.
1 Mobile and Wireless Networks and Applications: Introduction/Overview CS 444N, Spring 2002 Instructor: Mary Baker.
Overview of Mobile Computing (3): File System. File System for Mobile Computing Issues for file system design in wireless and mobile environments Design.
G Robert Grimm New York University Disconnected Operation in the Coda File System.
Disconnected Operation in the Coda File System James J. Kistler and M. Satyanarayanan Carnegie Mellon University Presented by Deepak Mehtani.
1 CS 194: Lecture 10 Bayou, Brewer, and Byzantine.
Distributed Systems 2006 Styles of Client/Server Computing.
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 Κωνσταντακοπούλου Τζένη.
Flexible Update Propagation for Weakly Consistent Replication Karin Petersen, Mike K. Spreitzer, Douglas B. Terry, Marvin M. Theimer and Alan J. Demers.
Department of Electrical Engineering
Toolkits for Building Mobile Systems 3/28/2002 Michael Ferguson
Data Sharing in OSD Environment Dingshan He September 30, 2002.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Disconnected Operation In The Coda File System James J Kistler & M Satyanarayanan Carnegie Mellon University Presented By Prashanth L Anmol N M Yulong.
G Robert Grimm New York University Bayou: A Weakly Connected Replicated Storage System.
Ordering of events in Distributed Systems & Eventual Consistency Jinyang Li.
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.
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.
Mobility Presented by: Mohamed Elhawary. Mobility Distributed file systems increase availability Remote failures may cause serious troubles Server replication.
Client-Server Computing in Mobile Environments
Team CMD Distributed Systems Team Report 2 1/17/07 C:\>members Corey Andalora Mike Adams Darren Stanley.
Distributed File Systems Sarah Diesburg Operating Systems CS 3430.
A Low-Bandwidth Network File System A. Muthitacharoen, MIT B. Chen, MIT D. Mazieres, NYU.
Mapping Internet Addresses to Physical Addresses (ARP)
Update Propagation with Variable Connectivity Prasun Dewan Department of Computer Science University of North Carolina
Distributed Systems Principles and Paradigms Chapter 10 Distributed File Systems 01 Introduction 02 Communication 03 Processes 04 Naming 05 Synchronization.
Mobility in Distributed Computing With Special Emphasis on Data Mobility.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
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.
Consistency And Replication
Bayou. References r The Case for Non-transparent Replication: Examples from Bayou Douglas B. Terry, Karin Petersen, Mike J. Spreitzer, and Marvin M. Theimer.
Distributed File Systems
Replication for Mobile Computing Prasun Dewan Department of Computer Science University of North Carolina
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
Chapter 20 Distributed File Systems Copyright © 2008.
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
Serverless Network File Systems Overview by Joseph Thompson.
DISCONNECTED OPERATION IN THE CODA FILE SYSTEM J. J. Kistler M. Sataynarayanan Carnegie-Mellon University.
CS 525M – Mobile and Ubiquitous Computing Seminar Bradley Momberger.
CODA: A HIGHLY AVAILABLE FILE SYSTEM FOR A DISTRIBUTED WORKSTATION ENVIRONMENT M. Satyanarayanan, J. J. Kistler, P. Kumar, M. E. Okasaki, E. H. Siegel,
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.
Mobile Data Access1 Replication, Caching, Prefetching and Hoarding for Mobile Computing.
CS425 / CSE424 / ECE428 — Distributed Systems — Fall 2011 Some material derived from slides by Prashant Shenoy (Umass) & courses.washington.edu/css434/students/Coda.ppt.
Distributed File Systems
Information/File Access and Sharing Coda: A Case Study J. Kistler, M. Satyanarayanan. Disconnected operation in the Coda File System. ACM Transaction on.
Caching Consistency and Concurrency Control Contact: Dingshan He
ENERGY-EFFICIENCY AND STORAGE FLEXIBILITY IN THE BLUE FILE SYSTEM E. B. Nightingale and J. Flinn University of Michigan.
A Low-bandwidth Network File System Presentation by Joseph Thompson.
Write Conflicts in Optimistic Replication Problem: replicas may accept conflicting writes. How to detect/resolve the conflicts? client B client A replica.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
An Architecture for Mobile Databases By Vishal Desai.
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
Eventual Consistency Jinyang. Review: Sequential consistency Sequential consistency properties: –All read/write ops follow some total ordering –Read must.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
THE EVOLUTION OF CODA M. Satyanarayanan Carnegie-Mellon University.
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.
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.
Nomadic File Systems Uri Moszkowicz 05/02/02.
Today: Coda, xFS Case Study: Coda File System
Replica Placement Model: We consider objects (and don’t worry whether they contain just data or code, or both) Distinguish different processes: A process.
System-Level Support CIS 640.
Presentation transcript:

1 Consistency of Replicated Data in Weakly Connected Systems CS444N, Spring 2002 Instructor: Mary Baker

2 How will people use mobile computers? Traditional client of a file system? –Coda, Ficus Client of generalized server? –Bayou Xterm? Stand-alone host on the Internet? –Mobile IP, TRIAD Divisions not clear-cut

3 Evolution of wireless networks Early days: disconnected computing (Coda’91) –Laptops plugged in at home or office –No wireless network Now: weakly connected computing (Coda, Bayou) –Assume a wireless network available, but –Performance may be poor –Cost may be high –Energy consumption too high –Intermittent disconnectivity causes involuntary breaks Future: (Some local research) –Breaks will be voluntary? –Exploit weak connectivity further

4 Data replication Replication –Availability: network partition –Performance: go to closest replica Caching –Performance –Coda: for availability too in disconnected environment Difference between caching and replication? –Replica is considered a primary copy –Division not always sharp

5 Use of disconnected computing Where does it work? –Wherever some information is better than none –Where availability more important than consistency Where does it not work? –Where current data is important Traditional trade-off between availability and consistency –Grapevine –Sprite Consistency has also been traded for other reasons –NFS (simplicity, crash recovery)

6 Retrofitting disconnection Disconnection used to be rare –Much software assumes it is a rare error condition –Okay for system to stall Locus and other systems used a lot of consensus algorithms among replicas –Replicas may not be reachable –Latency of chatty protocols not acceptable Perfect consistency no longer always reasonable –Sprite Michigan Little Work project: no system mods –Integration must be based on individual files –Integration not transactional

7 Coda assumptions Blend between individual robustness and infrastructure Clients are appliances –Vulnerable, unreliable, security problems, etc. –Don’t treat as primary location of data –Assume central computing infrastructure Client self-sufficient –Hoarding –Allow weak consistency –Off-load servers with work on clients –Time-limited self-sufficiency

8 In practice Does this work? –Lots of folks keep main copy on laptops –Which address book is primary copy? –Multiple home bases for computing infrastructure Bayou treats portables as first-class servers –Replication for caching purposes as well Some centralization would be useful –Personal metadata?

9 Hoarding Coda claims users are good at predicting their needs –Already do it for extended periods of time –Can help with automated hoarding Cache miss on /var/spool/xxx33.foo –What do you do? Information for hoarding included in RPM packages?

10 Conflict resolution Coda: –Transparent where possible –Okay to ask user Bayou: –Programmatic conflict resolution –May in fact ask user How do we incorporate user feedback? –Early? At conflict time? –File-type specific information? –Transparent at what level? User? Appl? OS? –What can a user really do?

11 Replica control strategies Optimistic: allow reads and writes and deal with damage later –Good availability Pessimistic: don’t allow multiple access so no damage can occur –Availability suffers All depends on length of disconnections and whether they are voluntary or not One client out with lock for a long time not okay Bayou avoids this

12 Other topics Call-back breaks –During disconnection Log optimization User patience threshold Per volume replay log –Inter-volume dependencies? Conflict measurements –Same user doesn’t mean no conflict! –0.25% still pretty high!

13 Write-sharing Types of write-sharing: sequential, concurrent Sequential –User A edits file –User B reads or edits file –Updates from A need to get to B so B sees most recent data –NFS: Window of time between two events determines consistency, even with “almost write-through” caching –Sprite/Echo/etc.: Second event may generate a call- back for data write-back and/or token

14 Write-sharing, continued Concurrent: –Two hosts edit or read/edit the same file at the same time –Sprite turned off caching to maintain consistency What does “the same time” really mean? –Open/close? –Duration of lease? –Explicit lock? –Echo read/write tokens make all sharing sequential

15 How much sharing? Sprite: –Open/close mechanism with callbacks –0.34% of file opens resulted in concurrent write-sharing –1.7% of file opens result in server recall of dirty data (concurrent or sequential) Would weaker (NFS) consistency work? –With 60-second window, 0.34% of opens result in potential use of stale cache data with 63% of users affected AFS: –“Only” 0.34% of sequential mutations involve 2 users –(But one user can cause conflicts with himself!)

16 Replica control strategies Optimistic: allow reads and writes –Deal with damage later –Good availability Pessimistic: don’t allow multiple access –No damage can occur –Availability suffers Choice depends on –Length of disconnections –Whether they are voluntary –Workload and applications One client off with lock for a long time not okay

17 Coda callbacks: optimistic Client A caches copy, registers callback Client B accesses file: server performs callback break to A When connected: client discards cached copy Intended for strongly connected world When disconnected, client doesn’t see call-back break Must revalidate files/volumes on reconnection This is where room for conflicts arises Even when weakly connected, client ignores call- back break!

18 Callback breaks, continued On hoard walk, attempt to regain callbacks –Instead of regaining them earlier Modified files likely to be modified again –Avoid traffic of many callbacks Volume callbacks helpful at low bandwidth

19 Log optimization in Coda Per-volume replay log Optimizations: rmdir cancels previous mkdir and itself Overwrites of files cancel previous file writes Why such a range in compressibility? –Some traces only 20% –Others % –Hot files? Inter-volume dependencies?

20 Impact of trickle reintegration Too large a chunk size interferes with other traffic –Partly a result of whole-file caching –Whole-file caching good for avoiding misses –Better refinement for reintegration? How useful is think time notion in trace replay results? –Why not just measure a few traces and correlate those to reality? Other possible optimizations? –File compression? –Deltas?

21 Cache misses in Coda If disconnected, either return error to program or stall Modeling user patience threshold –Goal: improve usability by reducing frequency of interaction –When confident of user’s response, don’t contact user –Willing to wait longer for more important file –Why isn’t this sensitive to overall amount of waiting? (Other misses too)

22 Other design choices? Coda: existence of weakly connected clients should not impact other clients Instead: examine choice of some amount of impact Exploit weak connectivity for better consistency? Use modified form of Leases? –Attempt to reintegrate modifications –Use leases to help clients determine which files to reintegrate Maybe choose to stall new clients for length of reasonable lease

23 Numbers in Coda paper Nice attempt to model tricky things Hard to see how we can use these actual numbers outside this paper Transport protocol performance comparison looks iffy –Maybe due to measurements on Mach

24 Bayou session guarantees Lack of guarantees in ordering reads/writes can confuse users and applications A user/application should see sensible world during period of a “session” How we implement/define sessions is interesting part

25 Bayou environment Bayou: a swamp of mobile DB “servers” moving in and out of contact with each other Pair-wise contact between any of them Read-any/write-any base Eventual consistency relies on –Total propagation: Assumes “anti-entropy” process: there exists some time at which a write is received by all servers –Consistent ordering: all servers apply non-commutative writes to their databases in the same order

26 Bayou environment, cont. Operation over low-bandwidth networks Only updates unknown to receiver propagate Incremental progress One-way direction of updates Efficient storage (can discard logged updates) Propagation through transportable media Light-weight management of dynamic replica sets Propagate operations, not data

27 Anti-entropy assumptions Each new write from client to a server gets “accept stamp” including: – Server ID of accepting server –Time of acceptance by that server Each server maintains version vector V about its update status –Server S’s V[serverID] contains largest write known to S received from a client by serverID Assume all servers keep log of all writes received –They don’t actually keep all writes forever Prefix property: –If S has write w accepted from some client by X –Then S has all writes accepted by X prior to w

28 Anti-entropy algorithm Algorithm for S to update R S gets R’s version vector For each write w in S’s write log { For the server that stamped w, does R have all the writes up to and including w? If not, update R }

29 Write-log management Can discard “stable” or “committed” writes –Writes whose position in log will not change Trade-off between storage and bandwidth –May have to send whole DB to client gone a long time Bayou uses a primary replica to commit writes –Commit sequence number provides total ordering on writes Prefix property maintained –Uncommitted writes treated as before –Committed writes propagated before tentative ones Write-log rollback required –On sender if sender has to send whole DB to receiver –On receiver to earliest write it must receive

30 Guarantees for sessions Read your writes Monotonic reads Writes follow reads Monotonic writes

31 Read your writes A session’s updates shouldn’t disappear within that session Example errors: –Missing password update in Grapevine –Reappearing deleted messages

32 Monotonic reads Disallow reads to a DB less current than previous read Example error: –Get list of messages –When attempting to read one, get “message doesn’t exist” error

33 Writes follow reads Affects users outside session Traditional write/read dependencies preserved at all servers Two guarantees: ordering and propagation –Order: If a read precedes a write in a session, and that read depends on a previous non-session write, then previous write will never be seen after second write at any server. It may not be seen at all. –Propagation: Previous write will actually have propagated to any DB to which second write is applied.

34 Writes follow reads, continued Ordering - example error: –Modification made to bibliographic entry, but at some other server original incorrect entry gets applied after fixed entry Propagation - example error: –Newsgroup displays responses to articles before original article has propagated there

35 Monotonic writes Writes must follow any previous writes that occurred within their session Example error: –Update to library made –Update to application using library made –Don’t want application depending on new library to show up where new library doesn’t show up

36 SyncML Pair-wise contact between any source/sink of data No support for eventual consistency between all replicas Takes into account network delay and BW –Ideally one request/response exchange –Request asks for updates and/or sends updates –Response includes updates along with identified conflicts and what to do about them Handles disconnection during synchronization

37 Some parameters of synch schemes What is a client/server? Who can talk to whom? Support for multiple replicas? Transparent –Replication? –Synchronization? –Conflict management? Consistency constraints –Time limits or eventual consistency? –All replicas eventually consistent?

38 Parameters, continued Whole file? Vulnerabilities –Crash during sync? –Bad sender/receiver behavior? –Authentication isn’t enough to predict behavior