E-Transactions: End-to-End Reliability for Three-Tier Architectures Svend Frølund and Rachid Guerraoui.

Slides:



Advertisements
Similar presentations
Two phase commit. Failures in a distributed system Consistency requires agreement among multiple servers –Is transaction X committed? –Have all servers.
Advertisements

NETWORK ALGORITHMS Presenter- Kurchi Subhra Hazra.
CS542: Topics in Distributed Systems Distributed Transactions and Two Phase Commit Protocol.
(c) Oded Shmueli Distributed Recovery, Lecture 7 (BHG, Chap.7)
CS 603 Handling Failure in Commit February 20, 2002.
1 © P. Kouznetsov On the weakest failure detector for non-blocking atomic commit Rachid Guerraoui Petr Kouznetsov Distributed Programming Laboratory Swiss.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Transaction Processing Lecture ACID 2 phase commit.
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
Systems of Distributed Systems Module 2 -Distributed algorithms Teaching unit 3 – Advanced algorithms Ernesto Damiani University of Bozen Lesson 6 – Two.
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 17, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Non-blocking Atomic Commitment Aaron Kaminsky Presenting Chapter 6 of Distributed Systems, 2nd edition, 1993, ed. Mullender.
Sinfonia: A New Paradigm for Building Scalable Distributed Systems Marcos K. Aguilera, Arif Merchant, Mehul Shah, Alistair Veitch, Christonos Karamanolis.
Persistent State Service 1 Distributed Object Transactions  Transaction principles  Concurrency control  The two-phase commit protocol  Services for.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
1 ICS 214B: Transaction Processing and Distributed Data Management Distributed Database Systems.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture XI: Distributed Transactions.
CMPT Dr. Alexandra Fedorova Lecture XI: Distributed Transactions.
CMPT Dr. Alexandra Fedorova Lecture XI: Distributed Transactions.
CS162 Section Lecture 10 Slides based from Lecture and
Distributed Transactions March 15, Transactions What is a Distributed Transaction?  A transaction that involves more than one server  Network.
DISTRIBUTED SYSTEMS II AGREEMENT (2-3 PHASE COM.) Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Distributed Algorithms – 2g1513 Lecture 9 – by Ali Ghodsi Fault-Tolerance in Distributed Systems.
Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts & Design (5 th Ed.). Essex: Addison-Wesley.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
Distributed Transactions Chapter 13
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CSE 486/586 CSE 486/586 Distributed Systems Concurrency Control Steve Ko Computer Sciences and Engineering University at Buffalo.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
Fault Tolerance CSCI 4780/6780. Distributed Commit Commit – Making an operation permanent Transactions in databases One phase commit does not work !!!
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 8 Fault.
Robustness in the Salus scalable block store Yang Wang, Manos Kapritsos, Zuocheng Ren, Prince Mahajan, Jeevitha Kirubanandam, Lorenzo Alvisi, and Mike.
Fault Tolerance in CORBA and Wireless CORBA Chen Xinyu 18/9/2002.
XA Transactions.
Distributed systems Consensus Prof R. Guerraoui Distributed Programming Laboratory.
Fault Tolerant Services
Fault Tolerance and Replication
Two-Phase Commit Brad Karp UCL Computer Science CS GZ03 / M th October, 2008.
Revisiting failure detectors Some of you asked questions about implementing consensus using S - how does it differ from reaching consensus using P. Here.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
EEC 688/788 Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CS 162 Section 10 Two-phase commit Fault-tolerant computing.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Fault Tolerance Prof. Orhan Gemikonakli
Primary-Backup Replication
CPS 512 midterm exam #1, 10/7/2016 Your name please: ___________________ NetID:___________ /60 /40 /10.
Commit Protocols CS60002: Distributed Systems
Outline Announcements Fault Tolerance.
7.1. CONSISTENCY AND REPLICATION INTRODUCTION
EEC 688/788 Secure and Dependable Computing
Chapter 10 Transaction Management and Concurrency Control
CSE 486/586 Distributed Systems Concurrency Control --- 3
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Distributed Transactions
Causal Consistency and Two-Phase Commit
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Abstractions for Fault Tolerance
Distributed systems Consensus
CSE 486/586 Distributed Systems Concurrency Control --- 3
Last Class: Fault Tolerance
Presentation transcript:

e-Transactions: End-to-End Reliability for Three-Tier Architectures Svend Frølund and Rachid Guerraoui

Applicable to three-tier architectures Front-end clients Middle-tier application servers Back-end database servers

Three-tier Architecture

Typical three-tier architectures fail to provide reliability guarantees At-most-once processing: request is executed once or not at all Server failure results in error No knowledge if transaction was successful Resubmitting request may result in duplicate transaction

Exactly-once transaction abstraction Mask failures in the middle and back-end tiers Eliminate resubmission What if client crashes?

e-Transactions Guarantees exactly-once transaction, unless the client crashes If the client crashes, at-most-once processing can be assumed Up to user to figure out what has happened Crashed client does not affect other clients

Need for e-Transactions: Improvements over existing reliability concepts for three-tier architectures Addresses all three tiers Includes liveness properties of replicated services Also includes safety properties of transaction-processing systems

e-Transactions Algorithm Distributed commit scheme Primary-backup replication scheme Interfaces with COTS technologies, particularly database servers Client does not need access to local storage Assumes perfect knowledge about failures

e-Transactions Model: System Distributed System Finite processes communicate by message passing A process is either up or down Crash – transition from up to down Recovery – transition from down to up Crash has no impact on stable storage Processes do not behave maliciously Communications are reliable

e-Transactions Model: Clients Set of processes (c i  Client) Domain of request values and domain of result values (nil  Request  Result) Operation issue() : Request  Result

e-Transactions Model: Application Servers Set of processes (a i  AppServer) Application servers are stateless Function compute() : Request  Result Compute function is non-blocking

e-Transactions Model: Database Servers Set of processes (s i  Server) Function vote() : Result  Vote where Vote = {yes, no} Function decide() : Result  Outcome  Out-come where Outcome = {commit, abort}

e-Transactions Specification Termination – liveness guarantee by preventing blocking situations Agreement – safety guarantee by ensuring consistency of client and databases Validity – restrict the space of possible results (exclude meaningless results)

e-Transactions Specification: Termination (T.1) If the client issues a request, then, unless it crashes, the client eventually delivers a result (T.2) If any database server votes for a result, then the database server eventually commits or aborts the result

e-Transactions Specification: Agreement (A.1) No result is delivered by the client unless the result is committed by all database servers (A.2) No database server commits more than one result for the same request (A.3) No two database servers decide differently on the same result

e-Transactions Specification: Validity (V.1) If the client issues a request and delivers a result, then the result has been computed by an application server with the request as a parameter (V.2) No database server commits a result unless all database servers have voted yes for that result

e-Transactions Implementation: Assumptions Closed system, the only entities are the client, the application servers, and the database servers Communication channels are reliable Knowledge of failures is perfect

e-Transactions Implementation: Client Algorithm

e-Transactions Implementation: Database Server Algorithm

e-Transactions Implementation: Primary Application Server Algorithm

e-Transactions Implementation: Backup Application Server Algorithm

e-Transactions Protocol Correctness: Lemma1 No primary application server remains blocked forever in one of the wait statements of lines 8, 10, 14, and 17, in the primary application server algorithm

e-Transactions Protocol Correctness: Lemma2 Let t be any time. 1) At most one application server is the primary application server at t and 2) there is a time t’ ≥ t after which some application server remains primary forever

e-Transactions Protocol Correctness: Lemma3 (Termination T.1) If the client issues a request, then unless it crashes, the client eventually delivers a result

e-Transactions Protocol Correctness: Lemma4 (Termination T.2) If any database server votes for a result, then the database server eventually commits or aborts the result

e-Transactions Protocol Correctness: Lemma5 (Agreement A.1) No result is delivered by the client, unless the result is committed by all database servers

e-Transactions Protocol Correctness: Lemma6 (Agreement A.2) No database server commits more than one result for the same request

e-Transactions Protocol Correctness: Lemma7 (Agreement A.3) No two database servers decide differently for the same result

e-Transactions Protocol Correctness: Lemma8 (Validity V.1) If the client issues a request and delivers a result, then the result has been computed by an application server with the request as a parameter

e-Transactions Protocol Correctness: Lemma8 (Validity V.2) No database server commits a result unless all database servers have voted yes for that result

e-Transactions Performance Latency – 16% increase over baseline unreliable algorithm, compared to 23% increase over baseline for a 2PC algorithm that guarantees at-most- once semantics Scalability – linear increase in response time with respect to the number of database servers

e-Transactions Related Work: Transaction Monitors Middle-tier server encapsulates processing as an atomic transaction Assumes stable storage at the client Nothing prevents transaction coordinator from crashing and blocking all participants

e-Transactions Related Work: Persistent Queues Client submits request through a persistent client-queue Server processes request and stores result into a persistent server-queue Client and server queues must be replicated with additional cost Atomic commitment mechanism to avoid blocking

e-Transactions Related Work: Message Logging Clients log incoming and outgoing requests Server logs incoming requests and outgoing replies Server stores database operations Requires intertransaction state at the client

e-Transactions Related Work: Object Groups Single transaction entity that is made highly available through a replication and coordination protocol Overhead of coordinating replicated application servers Replication of database servers makes use of COTS databases complicated

e-Transactions Current Status: Total-e-Transactions HP distributed transaction management system Java implementation based on Sun’s Java Transaction Service standard Utilizes OMG’s Object Transaction Service for Interoperability

References e-Transactions: end-to-end reliability for three-tier architectures Frolund, S.; Guerraoui, R.; Software Engineering, IEEE Transactions on Volume 28, Issue 4, April 2002 Page(s):378 – 395 Three Tier Software Architectures ( Total-e-Transactions Frequently Asked Questions pdf/Total-e- Transactions_2.2_FAQ.pdf