Outline Introduction Background Distributed DBMS Architecture

Slides:



Advertisements
Similar presentations
Outline Introduction Background Distributed Database Design
Advertisements

Chapter 16: Recovery System
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
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture X: Transactions.
Transaction.
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.
ICS (072)Database Recovery1 Database Recovery Concepts and Techniques Dr. Muhammad Shafique.
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.
©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.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
1 Database Systems CS204 Lecture 21 Transaction Processing I Asma Ahmad FAST-NU April 7, 2011.
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.
HANDLING FAILURES. Warning This is a first draft I welcome your corrections.
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
1 CSE 8343 Presentation # 2 Fault Tolerance in Distributed Systems By Sajida Begum Samina F Choudhry.
Databases Illuminated
XA Transactions.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
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.
Operating System Reliability Andy Wang COP 5611 Advanced Operating Systems.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.
Database recovery techniques
Database Recovery Techniques
Outline Background Introduction Distributed DBMS Architecture
Database Management System
Outline Introduction Background Distributed DBMS Architecture
Database System Implementation CSE 507
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
Chapter 10 Transaction Management and Concurrency Control
Outline Introduction Background Distributed DBMS Architecture
Outline Introduction Background Distributed DBMS Architecture
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
Database Recovery 1 Purpose of Database Recovery
Distributed Databases Recovery
Abstractions for Fault Tolerance
Concurrency Control.
Last Class: Fault Tolerance
Outline Introduction Background Distributed DBMS Architecture
Outline Introduction Background Distributed DBMS Architecture
Operating System Reliability
Transaction Communication
Operating System Reliability
Presentation transcript:

Outline Introduction Background Distributed DBMS Architecture Distributed Database Design Distributed Query Processing Distributed Transaction Management Transaction Concepts and Models Distributed Concurrency Control Distributed Reliability Building Distributed Database Systems (RAID) Mobile Database Systems Privacy, Trust, and Authentication Peer to Peer Systems

Useful References Textbook Principles of Distributed Database Systems, Chapter 12.1, 12.2 J. Gray and A. Reuter. Transaction Processing - Concepts and Techniques. Morgan Kaufmann, 1993. (Copy on reserve in MATH library) Bharat Bhargava (Ed.), Concurrency Control and Reliability in Distributed Systems, Van Nostrand and Reinhold Publishers, 1987. (Copy on reserve in LWSN reception office book shelf)

Reliability In case of a crash, recover to a consistent (or correct state) and continue processing. Types of Failures Node failure Communication line of failure Loss of a message (or transaction) Network partition Any combination of above

Approaches to Reliability Audit trails (or logs) Two phase commit protocol Retry based on timing mechanism Reconfigure Allow enough concurrency which permits definite recovery (avoid certain types of conflicting parallelism) Crash resistance design

Recovery Controller 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)

System Restart We need: Problem: Solution: DO – UNDO UNDO 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  < T, A, E > must be restartable (or idempotent) DO – UNDO UNDO DO – UNDO – UNDO – UNDO --- UNDO

Site Failures (simple ideas) 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

Communication Failures (simple ideas) 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

Compensation Compensating transactions Recomputing cost 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

Reliability and Fault-tolerate Parameters Problem: How to maintain atomicity durability properties of transactions

Fundamental Definitions 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.

Basic System Concepts ENVIRONMENT SYSTEM Component 1 Component 2 Stimuli Responses Component 3 External state Internal state

Fundamental Definitions 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.

Faults to Failures causes results in Fault Error Failure

Types of Faults Hard faults Soft 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

Fault Classification Permanent fault Permanent error Incorrect design Intermittent error Unstable or marginal components System Failure Unstable environment Transient error Operator mistake

Multiple errors can occur Failures MTBF MTTD MTTR Time Fault occurs Error caused Detection of error Repair Fault occurs Error caused Multiple errors can occur during this period

Fault Tolerance Measures 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 e-m(t)[m(t)]k Pr(k failures in time [0,t] = k! t  m ( t )  z ( x ) dx

Fault-Tolerance Measures 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[k2] - (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 ∞  e-m(t )[m(t )]k E [k] = = m(t ) k k! k =0 Rsys(t) =  i =1 n Ri(t)

Fault-Tolerance Measures 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  A = lim A(t)  t  

Fault-Tolerance Measures MTBF Mean time between failures MTBF = ∞ R(t)dt MTTR Mean time to repair Availability MTBF + MTTR