![Page 1: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/1.jpg)
PAVANI REDDY KATHURI
TRANSACTION COMMUNICATION
![Page 2: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/2.jpg)
OUTLINE
0 PART I: INTRODUCTION
0 PART II: CURRENT RESEARCH
0 PART III: FUTURE POTENTIAL
0 REFERENCES
![Page 3: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/3.jpg)
WHAT IS TRANSACTION?
0Fundamental unit of interconnection b/w client and server processes in database system.
In Transactions we have, Database Transaction Communication Transaction
![Page 4: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/4.jpg)
ACID PROPERTIES
0 Atomicity0 Consistency0 Isolation0 Durability
![Page 5: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/5.jpg)
ATOMICITY
0 Either all the operations in a transaction are performed in its entirety or not performed at all.
CONSISTENCY0 consistent state is maintained before a transaction
starts and after it concludes.
![Page 6: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/6.jpg)
0ISOLATION A transaction should appear as it is being executed in isolation form other transactions.
0DURABILITY Transactions results are locked/ permanent after being committed.
![Page 7: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/7.jpg)
DISTRIBUTED TRANSACTION
0 One coordinator (usually the initiator of the transaction) and several participating processes (remote process)
0 At commitAtomicity: either all nodes commit or none doIsolation: effects of the transaction not made visible
until all nodes have made an irrevocable decision to commit or abort
![Page 8: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/8.jpg)
ACTIVITY LOG
Each participant keeps track of updated data objects by maintaining a private work space. Updates contain old and new value. Each site has an activity log which is kept on the disk.0- On abort: undo of uncommitted transactions (rollback)0- After crash: redo of committed transactions (roll forward) Needed for durability of committed transactions
![Page 9: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/9.jpg)
SHADOW PAGING
Here, transaction logs are not required. Two directories created during the life of transaction
- current directory - shadow directory
When transaction starts, both directories are same. Shadow directory never changed during the transaction. Current directory updated when write operation is
performed. When transaction commits, shadow directory is
discarded and current directory is copied to the storage
![Page 10: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/10.jpg)
TWO PHASE COMMIT PROTOCOL
COORDINATOR•precommit the transaction•Send request to all participants
request
PARTICIPANT•received request message•If (ready)•precommit and send YES
•Else ABORT send NO
reply
COORDINATOR• collect all replies
COORDINATOR• If (all votes are
unanimous)• Commit & send COMMIT
• Else ABORT & send ABORT
decision
PARTICIPANT•receive decision•If (COMMIT) commit•If (ABORT) abort
•send response
result
COORDINATOR•received response
1st Phase
2nd Phase
![Page 11: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/11.jpg)
2PCCOORDINATOR1. Prepare to commit the transaction by writing every
update in activity log. within the time-out period, multicast a commit message. Otherwise, multicast an abort message.
2. Write a precommit message in the activity log. Send a voting message to all participants asking whether they are ready to commit.
3. If all participants vote yes
![Page 12: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/12.jpg)
PARTICIPANT
1. Prepare to commit the transaction by writing every update in activity log.
2. Write a precommit message in the activity log. Wait for request to vote from coordinator.
3. When receiving a vote request, test whether the transaction can be committed and if yes, writes a precommit to its activity log and sends a YES reply, otherwise send a NO reply.
4. Wait for commit message from the coordinator. If received, commit the transaction. If abort message is received, abort the transaction.
![Page 13: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/13.jpg)
FAILURE AND RECOVERY ACTIONS
Failures before precommit(s)
• Abort transaction• Equiv to send NO
Failures after precommits but prior to commit
• Abort transaction• Re-multicast
request message
Failures after a commit
• Resend commit message
![Page 14: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/14.jpg)
PARTICIPANT1. Prepare to commit the transaction by writing every
update in activity log.
2. Write a precommit message in the activity log. Wait for request to vote from coordinator.
3. When receiving a vote request, test whether the transaction can be committed and if yes, writes a precommit to its activity log and sends a YES reply, otherwise send a NO reply.
4. Wait for commit message from the coordinator. If received, commit the transaction. If abort message is received, abort the transaction.
![Page 15: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/15.jpg)
RELATED LINK
0 http://en.wikipedia.org/wiki/Two-phase_commit_protocol
![Page 16: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/16.jpg)
NESTED TRANSACTION
Nested transaction = tree of transactions0 Commit of a subtransaction takes place only if parent
transaction commits0 Rollback of a transaction forces rollback of all its
subtransactions
![Page 17: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/17.jpg)
RULES FOR NESTED TRANSACTIONS
Commit rule0 Commit of a transaction makes it result accessible only
to its parent
Rollback rule0 If a transaction is rolled back, all its subtransactions are
also rolled back (whatever their status)
![Page 18: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/18.jpg)
RULES FOR NESTED TRANSACTION (CONT’D)
Visibility rule0 All changes by a subtransaction are visible to
parent upon local commit.
Locking rule0 Externally, top-level transaction holds all locks0 Internally, multiple transactions may hold exclusive
locks
![Page 19: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/19.jpg)
CURRENT RESEARCH
X/Open XA [IBM, Wiki, 2009]:0 What is it?0 Standard specification for distributed transaction
processing (DTP).0 Provides interface between the global transaction
manager and the local resource manager.
![Page 20: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/20.jpg)
X/OPEN XA
PROBLEM: we can access multiple resources, but with multiple transactions there’s a lot of overhead [IBM, 2009].
0 XA allows multiple resources (databases, app servers, etc.) to be accessed within the same transaction.o Preserves ACID properties across applications.o Uses 2PC implementation to ensure that all resources
either commit, or rollback, any particular transaction simultaneously.
20
© 2009 Georgia State University
![Page 21: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/21.jpg)
![Page 22: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/22.jpg)
RELATED LINKS
[1] “X/Open XA”, http://en.wikipedia.org/wiki/X/Open_XA, 8-9-2009.
[2] “X/Open XA Standard”, http://www.opengroup.org/onlinepubs/009680699/toc.pdf, 1991
![Page 23: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/23.jpg)
FUTURE WORK
![Page 24: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/24.jpg)
PROPOSAL
SALES PITCH?
Does any product sell itself? No! There’s heavy marketing, promoting, and partnering involved.
Open XA caters to Data Warehousing with tight hardware coupling [IBM, Wiki, 2009].
While initial benefits start at the basics:o Fewer transactionso Lower costs
Hardware costs have decreased, but depending on the specifics of a system, server & hardware costs can run high!!!
![Page 25: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/25.jpg)
PROS0 Provides abstraction of resources.0 User can forgo hardware specifics and it’s cheaper.0 Multiple virtualization modes can be used based on the nature of
the transaction.o Para, Partial, Full
![Page 26: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/26.jpg)
CONS
Can NOT remove all traces of hardware either for a DW. Security and authority concerns. Performance differences for large tasks. There’s no central Authority for Open Source lead
efforts. IT support trickles in late. Implementation and security concerns.
![Page 27: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/27.jpg)
REFERENCES
[1] Distributed Operating Systems & Algorithms, by Randy Chow and Theodore Johnson, 1997[2] “Securing Applications using Operating System Transactions”, Erez
Zadok, http://cip.cs.stonybrook.edu/ workshop/slides/3-zadok.pdf, 7-14-2006.
[3] “Operating System Transactions”, Donald E. Porter, Owen S. Hofmann, Christopher J. Rossbach, Alexander Benn, and Emmett Witchel, 22nd ACM Symposium on Operating Systems Principles, October 2009
[4] Mohammad Alrifai etc., Transactions Concurrency Control in Web Service Environment,2000
![Page 28: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/28.jpg)
THANK YOU
![Page 29: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/29.jpg)
![Page 30: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/30.jpg)
![Page 31: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/31.jpg)
![Page 32: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/32.jpg)
![Page 33: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/33.jpg)
![Page 34: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/34.jpg)
![Page 35: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/35.jpg)
![Page 36: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/36.jpg)
![Page 37: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/37.jpg)
![Page 38: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/38.jpg)
![Page 39: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/39.jpg)
![Page 40: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/40.jpg)
![Page 41: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/41.jpg)
![Page 42: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/42.jpg)
![Page 43: PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eec5503460f94bfe5b8/html5/thumbnails/43.jpg)