CS 603 Data Replication February 25, 2002. Data Replication: Why? Fault Tolerance –Hot backup –Catastrophic failure Performance –Parallelism –Decreased.

Slides:



Advertisements
Similar presentations
Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Advertisements

Database Systems (資料庫系統)
More About Transaction Management Chapter 10. Contents Transactions that Read Uncommitted Data View Serializability Resolving Deadlocks Distributed Databases.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two actions are in conflict if  they operate on the same DB item,  they belong.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
CSC271 Database Systems Lecture # 32.
(c) Oded Shmueli Distributed Recovery, Lecture 7 (BHG, Chap.7)
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
CIS 720 Concurrency Control. Timestamp-based concurrency control Assign a timestamp ts(T) to each transaction T. Each data item x has two timestamps:
Concurrency Control Nate Nystrom CS 632 February 6, 2001.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Termination and Recovery MESSAGES RECEIVED SITE 1SITE 2SITE 3SITE 4 initial state committablenon Round 1(1)CNNN-NNNN Round 2FAILED(1)-CNNN--NNN Round 3FAILED.
Distributed Systems 2006 Styles of Client/Server Computing.
Transaction Management and Concurrency Control
CS 582 / CMPE 481 Distributed Systems Concurrency Control.
CS 582 / CMPE 481 Distributed Systems
1 ICS 214B: Transaction Processing and Distributed Data Management Replication Techniques.
Session - 14 CONCURRENCY CONTROL CONCURRENCY TECHNIQUES Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Overview Distributed vs. decentralized Why distributed databases
Manajemen Basis Data Pertemuan 10 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
Transaction Management
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.
CS 603 Three-Phase Commit February 22, Centralized vs. Decentralized Protocols What if we don’t want a coordinator? Decentralized: –Each site broadcasts.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Lecture-10 Distributed Database System A distributed database system consists of loosely.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 18: Replication Control All slides © IG.
Optimistic Concurrency Control Merger of Semi-Committed Transactions From Several Partitions Combine DCG, DCG 2, --- DCG N (minimize rollback if cycle.
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.
Distributed Databases
6.4 Data and File Replication Gang Shen. Why replicate  Performance  Reliability  Resource sharing  Network resource saving.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
Multi-user Database Processing Architectures Architectures Transactions Transactions Security Security Administration Administration.
Replication and Consistency. Reference The Dangers of Replication and a Solution, Jim Gray, Pat Helland, Patrick O'Neil, and Dennis Shasha. In Proceedings.
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
Lecture 16- Distributed Databases Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
1 Distributed and Replicated Data Seif Haridi. 2 Distributed and Replicated Data Purpose –Increase performance (parallel processing) –Increase safety.
Replicated Databases. Reading Textbook: Ch.13 Textbook: Ch.13 FarkasCSCE Spring
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
II.I Selected Database Issues: 2 - Transaction ManagementSlide 1/20 1 II. Selected Database Issues Part 2: Transaction Management Lecture 4 Lecturer: Chris.
CS542: Topics in Distributed Systems Replication.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Fault Tolerance and Replication
MBA 664 Database Management Systems Dave Salisbury ( )
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
Hwajung Lee.  Improves reliability  Improves availability ( What good is a reliable system if it is not available?)  Replication must be transparent.
3/6/99 1 Replication CSE Transaction Processing Philip A. Bernstein.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Replication Steve Ko Computer Sciences and Engineering University at Buffalo.
EEC 688/788 Secure and Dependable Computing Lecture 9 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
“Distributed Algorithms” by Nancy A. Lynch SHARED MEMORY vs NETWORKS Presented By: Sumit Sukhramani Kent State University.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Transactions on Replicated Data Steve Ko Computer Sciences and Engineering University at Buffalo.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
Distributed Databases
COMP 430 Intro. to Database Systems Transactions, concurrency, & ACID.
Remote Backup Systems.
CS 347: Parallel and Distributed Data Management Notes07: Data Replication Hector Garcia-Molina CS 347 Notes07.
Outline Announcements Fault Tolerance.
Distributed Commit Phases
Chapter 10 Transaction Management and Concurrency Control
Distributed Transactions
Lecture 21: Replication Control
Transaction management
Lecture 21: Replication Control
Remote Backup Systems.
CIS 720 Concurrency Control.
Transactions, Properties of Transactions
Presentation transcript:

CS 603 Data Replication February 25, 2002

Data Replication: Why? Fault Tolerance –Hot backup –Catastrophic failure Performance –Parallelism –Decreased reliance on network This is a two-edged sword

Data Replication: What? Correctness criterion: Replication invisible –Results indistinguishable from one-copy database –One-copy serializability (1SR) Alternatives –Bounded inconsistency –User selection of real/copy More discussion Friday

Data Replication: How? Goal: Ensure one-copy serializability Write-all solution: All copies identical –Write goes to every site –Read from any site –Standard single-copy concurrency control –Guarantees 1SR Single-copy concurrency control gives serializable execution Equivalent to serial execution where all writes happen in one transaction

Write All Approach 3 Writer 5 Reader read 3 5

Problem: Site Failure Failure causes write to block –Must maintain locks –Clogs up entire system Is this fault tolerance? What about “write all available”? –T 0 : w 0 [x A ] w 0 [x B ] w 0 [y C ] c 0 –B-fails –T 1 : r 1 [y C ] w 1 [x A ] c 1 –B-recovers –T 2 : r 2 [x B ] w 2 [y C ] c 2 What is the serial equivalent order?

3 Writer 5 Reader read53 53

Model for Replicated Data Data and Transaction Managers at each site –Data Manager: local concurrency control to guarantee local serializability –Transaction manager: Distributed actions Turns reads/writes into multi-site reads/writes Runs commit protocol Directory to get sites of each copy

Failure Assumptions Communications failure: Site A does not receive reads/writes on x A issued by B Site failure: Site A is unable to process reads/writes on x A issued by B Communications failure: Site A processes but does not acknowledge reads/writes on x A issued by B Fail-stop model, detectable by timeout

Types of Write Write(x): All copies of x will eventually be written Immediate write –Send write to all sites on request –Quick detection of conflict Delayed write –Delays non-local writes until commit –Minimizes message traffic –Abort is cheap Primary copy write –Quick detection of conflict –Lower message traffic than immediate write

Distributed Serializability A complete replicated data (RD) history H over T = {T 0, …, T n } is a partial order with ordering relation < where –H = h(  n i=0 T i ) for some translation function h –for each T i and all operations p i, q i in T i, if p i < i q i, then every operation in h(p i ) is related by < to every operation in h(q i ) –for every r j [x A ], there is at least one w i [x A ] < r j [x A ] –if w i [x]  H and r j [x]  H, then w i [x] < r j [x] or r j [x] < w i [x] –if w i [x] < i r i [x] and h(r i [x]) = r i [x A ] then w i [x A ]  h(w i [x]) Theorem: If reads-from relationships same as serial history, RD history is 1-copy serializable

Write All Available Fails Even if no recovery!

Solutions Validate availability on commit –Check if any failed writes now available –Check that all sites read or written still available –Enforces serializability for site failures Doesn’t work with communication failures!

Communication Failures Available copies fails on network partition –Each side succeeds in validation Write all blocks Write n-k, read k+1 –Generalization of the “write all” approach –Handles up to min(n-k, k+1) failures –Tradeoff read vs. write performance –Partition effect based on size of partition: <k+1: small partition acts as if all sites failed, large continues Otherwise entire system becomes read-only

Other approaches: Don’t enforce Serializability! Master copy –Writes must update master copy –Reads can be consistent or inconsistent Bounded inconsistency –Time bound on update of copies –Value bound: write all if difference too great Dumps consistency on the application –Added complexity –Better performance