Distributed DBMSPage 10-12. 1© 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.

Slides:



Advertisements
Similar presentations
Outline Introduction Background Distributed Database Design
Advertisements

Distributed DBMS©M. T. Özsu & P. Valduriez Ch.15/1 Outline Introduction Background Distributed Database Design Database Integration Semantic Data Control.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Lock-Based Concurrency Control
Chapter 19 Database Recovery Techniques
Transaction.
Database Systems, 8 th Edition Concurrency Control with Time Stamping Methods Assigns global unique time stamp to each transaction Produces explicit.
Chapter 13 (Web): Distributed Databases
CMPT Dr. Alexandra Fedorova Lecture X: Transactions.
ICS 421 Spring 2010 Distributed Transactions Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/16/20101Lipyeow.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
ICS (072)Database Recovery1 Database Recovery Concepts and Techniques Dr. Muhammad Shafique.
Distributed DBMSPage 5. 1 © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture  Distributed Database.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
Overview Distributed vs. decentralized Why distributed databases
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
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 DBMSPage 5. 1 © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture  Distributed Database.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
Optimistic Concurrency Control Merger of Semi-Committed Transactions From Several Partitions Combine DCG, DCG 2, --- DCG N (minimize rollback if cycle.
TRANSACTION PROCESSING TECHNIQUES BY SON NGUYEN VIJAY RAO.
Distributed Databases
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Software Dependability CIS 376 Bruce R. Maxim UM-Dearborn.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
Distributed Deadlocks and Transaction Recovery.
1 Database Systems CS204 Lecture 21 Transaction Processing I Asma Ahmad FAST-NU April 7, 2011.
Distributed DBMS© 2001 M. Tamer Özsu & Patrick Valduriez Page 0.1 Outline Introduction Background Distributed DBMS Architecture Distributed Database Design.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Distributed Transactions Chapter 13
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Concurrency Control. Objectives Management of Databases Concurrency Control Database Recovery Database Security Database Administration.
Databases Illuminated
XA Transactions.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Presentation-2 Group-A1 Professor:Mohamed Khalil Anita Kanuganti Hemanth Rao.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed DBMS© 2001 M. Tamer Özsu & Patrick Valduriez Page 1.1 Outline n Introduction Background Distributed DBMS Architecture Distributed Database.
Operating System Reliability Andy Wang COP 5611 Advanced Operating Systems.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.
Outline Introduction Background Distributed DBMS Architecture
Outline Introduction Background Distributed DBMS Architecture
Operating System Reliability
Operating System Reliability
Fault Tolerance In Operating System
Commit Protocols CS60002: Distributed Systems
Outline Introduction Background Distributed DBMS Architecture
Outline Announcements Fault Tolerance.
Operating System Reliability
Fault Tolerance Distributed Web-based Systems
Operating System Reliability
Outline Introduction Background Distributed DBMS Architecture
Outline Introduction Background Distributed DBMS Architecture
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Operating System Reliability
Distributed Databases Recovery
Abstractions for Fault Tolerance
Outline Introduction Background Distributed DBMS Architecture
Operating System Reliability
Transaction Communication
Operating System Reliability
Presentation transcript:

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database Design Distributed Query Processing Distributed Transaction Management  Transaction Concepts and Models  Distributed Concurrency Control  Distributed Reliability n Building Distributed Database Systems (RAID) Mobile Database Systems Privacy, Trust, and Authentication Peer to Peer Systems

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Useful References J. Gray and A. Reuter. Transaction Processing - Concepts and Techniques. Morgan Kaufmann, Bharat Bhargava (Ed.), Concurrency Control and Reliability in Distributed Systems, Van Nostrand and Reinhold Publishers, 1987.

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Types of Failures 1. Node failure 2. Communication line of failure 3. Loss of a message (or transaction) 4. Network partition 5. Any combination of above In case of a crash, recover to a consistent (or correct state) and continue processing. Reliability

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez 1. Audit trails (or logs) 2. Two phase commit protocol 3. Retry based on timing mechanism 4. Reconfigure 5. Allow enough concurrency which permits definite recovery (avoid certain types of conflicting parallelism) 6. Crash resistance design Approaches to Reliability

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Types of failures: * transaction failure * site failure (local or remote) * communication system failure Transaction failure UNDO/REDO Logs transparent transaction (effects of execution in private workspace)  Failure does not affect the rest of the system Site failure volatile storage lost stable storage lost processing capability lost (no new transactions accepted) Recovery Controller

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Types of transactions: 1. In commitment phase 2. Committed actions reflected in real/stable 3. Have not yet begun 4. In prelude (have done only undoable actions) We need: stable undo log; stable redo log (at commit); perform redo log (after commit) Problem: entry into undo log; performing the action Solution: undo actions  must be restartable (or idempotent) DO – UNDO  UNDO  DO – UNDO – UNDO – UNDO --- UNDO System Restart

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Local site failure - Transaction committed  do nothing - Transaction semi-committed  abort - Transaction computing/validating  abort AVOIDS BLOCKING Remote site failure - Assume failed site will accept transaction - Send abort/commit messages to failed site via spoolers Initialization of failed site - Update for globally committed transaction before validating other transactions - If spooler crashed, request other sites to send list of committed transactions Site Failures (simple ideas)

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Communication system failure - Network partition - Lost message - Message order messed up Network partition solutions - Semi-commit in all partitions and commit on reconnection (updates available to user with warning) - Commit transactions if primary copy token for all entities within the partition - Consider commutative actions - Compensating transactions Communication Failures (simple ideas)

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Compensating transactions - Commit transactions in all partitions - Break cycle by removing semi-committed transactions - Otherwise abort transactions that are invisible to the environment (no incident edges) - Pay the price of committing such transactions and issue compensating transactions Recomputing cost - Size of readset/writeset - Computation complexity Compensation

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Problem: How to maintain atomicity durability properties of transactions Reliability and Fault-tolerate Parameters

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Reliability  A measure of success with which a system conforms to some authoritative specification of its behavior.  Probability that the system has not experienced any failures within a given time period.  Typically used to describe systems that cannot be repaired or where the continuous operation of the system is critical. Availability  The fraction of the time that a system meets its specification.  The probability that the system is operational at a given time t. Fundamental Definitions

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez External state Internal state Component 2 ENVIRONMENT SYSTEM StimuliResponses Component 1 Component 3 Basic System Concepts

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Failure  The deviation of a system from the behavior that is described in its specification. Erroneous state  The internal state of a system such that there exist circumstances in which further processing, by the normal algorithms of the system, will lead to a failure which is not attributed to a subsequent fault. Error  The part of the state which is incorrect. Fault  An error in the internal states of the components of a system or in the design of a system. Fundamental Definitions

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Faults to Failures FaultErrorFailure causesresults in

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Hard faults  Permanent  Resulting failures are called hard failures Soft faults  Transient or intermittent  Account for more than 90% of all failures  Resulting failures are called soft failures Types of Faults

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Fault Classification Permanent fault Incorrect design Unstable environment Operator mistake Transient error System Failure Unstable or marginal components Intermittent error Permanent error

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Failures Fault occurs Error caused Detection of error RepairFault occurs Error caused MTBF MTTRMTTD Multiple errors can occur during this period Time

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Reliability R ( t ) = Pr{0 failures in time [0, t ] | no failures at t =0} If occurrence of failures is Poisson R ( t ) = Pr{0 failures in time [0, t ]} Then where m ( t ) is known as the hazard function which gives the time-dependent failure rate of the component and is defined as Fault Tolerance Measures k!k! Pr( k failures in time [0, t ] = e - m ( t ) [ m ( t )] k m ( t )  z ( x ) dx 0 t 

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Reliability The mean number of failures in time [0, t ] can be computed as and the variance can be be computed as Var [ k ] = E [ k 2 ] - ( E [ k ]) 2 = m ( t ) Thus, reliability of a single component is R ( t ) = e - m ( t ) and of a system consisting of n non-redundant components as Fault-Tolerance Measures E [ k ] =  k =0 ∞ k k!k! e -m ( t ) [ m ( t )] k = m ( t ) R sys ( t ) =  i =1 n Ri(t)Ri(t)

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Availability A ( t ) = Pr{system is operational at time t } Assume  Poisson failures with rate   Repair time is exponentially distributed with mean 1/µ Then, steady-state availability Fault-Tolerance Measures A =lim A ( t )  t   

Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez MTBF Mean time between failures MTBF =   ∞ R ( t ) dt MTTR Mean time to repair Availability MTBF MTBF + MTTR Fault-Tolerance Measures