SlideShare una empresa de Scribd logo
1 de 11
CS 603 
Distributed Transactions 
February 18, 2002
What is a Transaction? 
• Atomic 
– The external view is that either everything in the 
transaction happened, or nothing did 
• Consistent 
– If the start state is valid, the end state is valid 
• Isolated 
– A transaction in process is not affected by and does 
not affect any other transaction 
• Durable 
– Once complete, the effects of a transaction are 
permanent, even in the event of failure.
Distributed Transactions 
• What is the difference with Distributed 
Transactions? 
– NOTHING! 
– Must still support ACID properties 
– Important for all the same reasons 
• Why do we study Distributed 
Transactions? 
– Some properties harder to implement 
– Basic single-system techniques not sufficient
What is a Distributed 
Transaction? 
Data 
Transaction 
component 
Transaction 
component 
Data 
Data 
Transaction 
component 
Transaction 
component 
Data
Why are Distributed 
Transactions Hard? 
• Atomic 
– Different parts of a transaction may be at different 
sites 
– How do we ensure all or none committed? 
• Consistent 
– Failure may affect only part of transaction 
• Isolated 
– Commitment must occur “simultaneously” at all sites 
• Durable 
– Not much different when other problems solved 
– Makes “delayed commit” difficult
Key Issues 
• Commitment 
– Standard techniques preserve properties 
when commit occurs 
– Distributed systems need commit protocols so 
we know when commit has occurred 
• Failures 
– Standard techniques support durability for 
commit/abort 
– What happens if a site fails during 
commitment?
Committing a Distributed 
Transaction 
Data 
Transaction 
component 
log 
Transaction 
component 
Data 
log 
Data 
Transaction 
component 
log 
Transaction 
component 
Data 
log
Two-Phase Commit 
(Lamport ’76, Gray ’79) 
• Assumes central coordinator 
– Coordinator initiates protocol 
– Participants: entities with actions to be 
committed/aborted 
• Phase 1: 
– Coordinator asks if participants can commit 
– Participants respond yes/no 
• Phase 2: 
– If all votes yes, coordinator sends Commit 
• Otherwise send Abort 
– Participants send Have Committed / Have Aborted
Two-Phase Commit 
Data 
Transaction 
component 
log 
Done Done 
Done 
Transaction 
component 
Data 
log 
Data 
Transaction 
component 
log 
Done 
Transaction 
component 
Data 
log 
CanCommit? CanCommit? 
Coordinator 
Commit 
CanCommit? CanCommit? 
Yes 
Yes 
Yes 
Yes 
Commit 
Commit Commit
Two-Phase Commit: 
Fault Tolerance 
• Participant fails in Phase 1: 
– Coordinator doesn’t get unanimous yes 
– Abort 
• Participant fails in Phase 2: 
– On reawakening, can ask coordinator if it 
should commit or abort 
– Requires that both commit and abort states 
be durable before sending “yes” vote
Two-Phase Commit: 
Problems 
• Blocks on failure 
– Timeout before abort if participant fails 
– All participants must wait for recovery if 
coordinator fails 
• While blocked, transaction must remain 
Isolated 
– Hold locks on data items touched 
– Prevents other transactions from completing 
• Solution: Wednesday

Más contenido relacionado

La actualidad más candente

management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
Nilu Desai
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
Ashish Kumar
 

La actualidad más candente (20)

Deadlock Detection in Distributed Systems
Deadlock Detection in Distributed SystemsDeadlock Detection in Distributed Systems
Deadlock Detection in Distributed Systems
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Database replication
Database replicationDatabase replication
Database replication
 
serializability in dbms
serializability in dbmsserializability in dbms
serializability in dbms
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency control
 
Remote Method Invocation (RMI)
Remote Method Invocation (RMI)Remote Method Invocation (RMI)
Remote Method Invocation (RMI)
 
Optimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed SystemsOptimistic concurrency control in Distributed Systems
Optimistic concurrency control in Distributed Systems
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed System
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Data Replication in Distributed System
Data Replication in  Distributed SystemData Replication in  Distributed System
Data Replication in Distributed System
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
 

Similar a Distributed Transaction

Divesting Businesses Means Untangling SAP
Divesting Businesses Means Untangling SAPDivesting Businesses Means Untangling SAP
Divesting Businesses Means Untangling SAP
Gary Niblett
 
Integrity of data lucas jellema
Integrity of data   lucas jellemaIntegrity of data   lucas jellema
Integrity of data lucas jellema
NLJUG
 
On the integrity of data in Java Applications
On the integrity of data in Java ApplicationsOn the integrity of data in Java Applications
On the integrity of data in Java Applications
NLJUG
 
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
DHANUSHKUMARKS
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
Amanuelmergia
 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
hritikraj888
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Koteswari Kasireddy
 

Similar a Distributed Transaction (20)

6 two phasecommit
6 two phasecommit6 two phasecommit
6 two phasecommit
 
Bab8 transaction
Bab8 transactionBab8 transaction
Bab8 transaction
 
Lec13s transaction
Lec13s transactionLec13s transaction
Lec13s transaction
 
Divesting Businesses Means Untangling SAP
Divesting Businesses Means Untangling SAPDivesting Businesses Means Untangling SAP
Divesting Businesses Means Untangling SAP
 
Integrity of data lucas jellema
Integrity of data   lucas jellemaIntegrity of data   lucas jellema
Integrity of data lucas jellema
 
On the integrity of data in Java Applications
On the integrity of data in Java ApplicationsOn the integrity of data in Java Applications
On the integrity of data in Java Applications
 
Tranasaction management
Tranasaction managementTranasaction management
Tranasaction management
 
Chapter 13
Chapter 13Chapter 13
Chapter 13
 
Transactions
TransactionsTransactions
Transactions
 
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
enc=encoded=TlJst0_SHq0cPRhLS74QDXTP4FpU303sSqpyVVkfhckA93UCiZrRF0QVNAFGmuGu9...
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)
 
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptxFALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
FALLSEM2023-24_BCSE302L_TH_VL2023240100957_2023-06-21_Reference-Material-I.pptx
 
1 introduction
1 introduction1 introduction
1 introduction
 
Chapter 18 - Distributed Coordination
Chapter 18 - Distributed CoordinationChapter 18 - Distributed Coordination
Chapter 18 - Distributed Coordination
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
 
Theory of Constraints
Theory of ConstraintsTheory of Constraints
Theory of Constraints
 
Globalizing Your Financial Systems - Emtec, Inc.
Globalizing Your Financial Systems - Emtec, Inc.Globalizing Your Financial Systems - Emtec, Inc.
Globalizing Your Financial Systems - Emtec, Inc.
 
Transaction Processing its properties & States
Transaction Processing its properties & StatesTransaction Processing its properties & States
Transaction Processing its properties & States
 
Flink Forward Berlin 2017: Piotr Nowojski - "Hit me, baby, just one time" - B...
Flink Forward Berlin 2017: Piotr Nowojski - "Hit me, baby, just one time" - B...Flink Forward Berlin 2017: Piotr Nowojski - "Hit me, baby, just one time" - B...
Flink Forward Berlin 2017: Piotr Nowojski - "Hit me, baby, just one time" - B...
 

Más de Pratik Tambekar

Data Mining Concepts and Techniques
Data Mining Concepts and TechniquesData Mining Concepts and Techniques
Data Mining Concepts and Techniques
Pratik Tambekar
 

Más de Pratik Tambekar (17)

ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Data Mining Concepts and Techniques
Data Mining Concepts and TechniquesData Mining Concepts and Techniques
Data Mining Concepts and Techniques
 
What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)What Is DATA MINING(INTRODUCTION)
What Is DATA MINING(INTRODUCTION)
 
World Wide Web(WWW)
World Wide Web(WWW)World Wide Web(WWW)
World Wide Web(WWW)
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OS
 

Último

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Último (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 

Distributed Transaction

  • 1. CS 603 Distributed Transactions February 18, 2002
  • 2. What is a Transaction? • Atomic – The external view is that either everything in the transaction happened, or nothing did • Consistent – If the start state is valid, the end state is valid • Isolated – A transaction in process is not affected by and does not affect any other transaction • Durable – Once complete, the effects of a transaction are permanent, even in the event of failure.
  • 3. Distributed Transactions • What is the difference with Distributed Transactions? – NOTHING! – Must still support ACID properties – Important for all the same reasons • Why do we study Distributed Transactions? – Some properties harder to implement – Basic single-system techniques not sufficient
  • 4. What is a Distributed Transaction? Data Transaction component Transaction component Data Data Transaction component Transaction component Data
  • 5. Why are Distributed Transactions Hard? • Atomic – Different parts of a transaction may be at different sites – How do we ensure all or none committed? • Consistent – Failure may affect only part of transaction • Isolated – Commitment must occur “simultaneously” at all sites • Durable – Not much different when other problems solved – Makes “delayed commit” difficult
  • 6. Key Issues • Commitment – Standard techniques preserve properties when commit occurs – Distributed systems need commit protocols so we know when commit has occurred • Failures – Standard techniques support durability for commit/abort – What happens if a site fails during commitment?
  • 7. Committing a Distributed Transaction Data Transaction component log Transaction component Data log Data Transaction component log Transaction component Data log
  • 8. Two-Phase Commit (Lamport ’76, Gray ’79) • Assumes central coordinator – Coordinator initiates protocol – Participants: entities with actions to be committed/aborted • Phase 1: – Coordinator asks if participants can commit – Participants respond yes/no • Phase 2: – If all votes yes, coordinator sends Commit • Otherwise send Abort – Participants send Have Committed / Have Aborted
  • 9. Two-Phase Commit Data Transaction component log Done Done Done Transaction component Data log Data Transaction component log Done Transaction component Data log CanCommit? CanCommit? Coordinator Commit CanCommit? CanCommit? Yes Yes Yes Yes Commit Commit Commit
  • 10. Two-Phase Commit: Fault Tolerance • Participant fails in Phase 1: – Coordinator doesn’t get unanimous yes – Abort • Participant fails in Phase 2: – On reawakening, can ask coordinator if it should commit or abort – Requires that both commit and abort states be durable before sending “yes” vote
  • 11. Two-Phase Commit: Problems • Blocks on failure – Timeout before abort if participant fails – All participants must wait for recovery if coordinator fails • While blocked, transaction must remain Isolated – Hold locks on data items touched – Prevents other transactions from completing • Solution: Wednesday