18
4.3 4.3 TRANSACTION COMMUNICATION TRANSACTION COMMUNICATION Dr. Yanqing Zhang, CSc 8320 © 2009 Georgia State University Presented by Kireet Kokala

Lecture for Chapter 4.3 (Fall 09)

Embed Size (px)

Citation preview

Page 1: Lecture for Chapter 4.3 (Fall 09)

4.34.3 TRANSACTION COMMUNICATIONTRANSACTION COMMUNICATION

Dr. Yanqing Zhang, CSc 8320© 2009 Georgia State University

Presented by Kireet Kokala

Page 2: Lecture for Chapter 4.3 (Fall 09)

OOUTLINEUTLINE

PART I: INTRODUCTIONo Fundamentals o ACID Properties [R. Chow & T. Johnson, 1997]o Two-phase Commit Protocol [M. Duckett, 1995]

PART II: CURRENT RESEARCHo X/Open XA [IBM, Wikipedia, 2009]o Distributed Relational Database Architecture (DRDA)

PART III: FUTURE POTENTIALo Open XA Virtualization

REFERENCES Q&A

2

© 2009 Georgia State University

Page 3: Lecture for Chapter 4.3 (Fall 09)

II:: IINTRODUCTION NTRODUCTION [[R. Chow & T. Johnson, 1997]R. Chow & T. Johnson, 1997]

What is a Transaction?o The basic unit of client-server process interaction

in a database (dbase) system, but it is NOT limited to it (ex: it can also be used in a peer-to-peer protocol).

o DS Context service oriented request-reply communication or asynchronous request(s).

ACID – generally, every transaction is ACID (Atomicity-Consistency-Isolation-Durability) compliant in accordance with concurrency control and transparency in the DS. It is NOT required, but the best dbase transactions are ‘ACID friendly’.

3

© 2009 Georgia State University

Page 4: Lecture for Chapter 4.3 (Fall 09)

II:: AACID CID [[R. Chow & T. Johnson, 1997]R. Chow & T. Johnson, 1997]

ATOMICITY – ALL or NO operations in a transaction are performed.

o Transaction Recovery System – ensures atomicity and enables the all or nothing output.

CONSISTENCY – consistent state is maintained before a transaction starts and after it concludes.

o Interleaved transactions serial execution.

4

© 2009 Georgia State University

Page 5: Lecture for Chapter 4.3 (Fall 09)

II:: AACIDCID (contd) (contd)

ISOLATION – concurrent transactions DO NOT interfere with each other.

o Partial results of incomplete transactions are not visible to others before the transactions are committed.

DURABILITY – transactions results are locked/ permanent after being committed.

o System guarantees that results of a committed transaction will be permanent even if a failure occurs after the commit.

5

© 2009 Georgia State University

Page 6: Lecture for Chapter 4.3 (Fall 09)

II:: AACIDCID (contd) (contd)

DS Transaction: has a coordinator (initiates transaction and oversees activities) and participating processes (participants=remaining processes).

EXAMPLE to follow

6

© 2009 Georgia State University

Page 7: Lecture for Chapter 4.3 (Fall 09)

II:: AACIDCID (contd) (contd)

Example of commit time:o Each coordinator and participant has access to

stable storage.o Either all nodes commit or none commit.o The effects of the transaction are not visible

until all nodes make a final decision to commit or abort (no rollback at this point).

o Activity Log captures history.

7

© 2009 Georgia State University

Page 8: Lecture for Chapter 4.3 (Fall 09)

II:: TTWO-PHASE WO-PHASE CCOMMIT OMMIT PPROTOCOLROTOCOL [M. Duckett, 1995] [M. Duckett, 1995]

2PC assures that ACID properties are achieved! Previous example:

* Responses are logged and the list is sent to each participant @ the time of the request message.

8

© 2009 Georgia State University

1st Phase

2nd Phase

Page 9: Lecture for Chapter 4.3 (Fall 09)

II:: 2PC2PC Failures and recovery actions. Continuing previous example (high level

breakdown):

9

© 2009 Georgia State University

Page 10: Lecture for Chapter 4.3 (Fall 09)

IIII:: CCURRENT URRENT RRESEARCHESEARCH

X/Open XA [IBM, Wiki, 2009]: What is it? Standard specification for distributed

transaction processing (DTP). Provides interface between the global

transaction manager and the local resource manager.

10

© 2009 Georgia State University

Page 11: Lecture for Chapter 4.3 (Fall 09)

IIII:: XX//OOPENPEN XA XA (contd)(contd)

PROBLEM: we can access multiple resources, but with multiple transactions there’s a lot of overhead [IBM, 2009].

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.

11

© 2009 Georgia State University

Page 12: Lecture for Chapter 4.3 (Fall 09)

IIII:: XX//OOPENPEN XAXA (contd)(contd)

RECEPTION? Supported by many vendors: MySQL

support via the InnoDB storage engine and Oracle supported.

Enterprise support and scalable technology.

Clean Technology: benefits from the Open Source Community. o Maybe built-in support can be rolled out with

Linux or similar distros.

12

© 2009 Georgia State University

Page 13: Lecture for Chapter 4.3 (Fall 09)

IIII:: XX//OOPENPEN XAXA (contd)(contd)

Business Intelligence [IBM, 2009]: points to a balanced configuration unit (BCU). o In other words, DATA

WAREHOUSING solutions are geared towards replicable and sustainable hardware + software means.

o Multiple databases can be configured to a single unit of work (*ACID uptime is maintained.)

13

© 2009 Georgia State University

Page 14: Lecture for Chapter 4.3 (Fall 09)

IIIIII:: FFUTURE UTURE PPOTENTIALOTENTIAL

How can we take something that works well and MAKE it BETTER?

14

© 2009 Georgia State University

Page 15: Lecture for Chapter 4.3 (Fall 09)

IIIIII:: PPROPOSALROPOSAL15

© 2009 Georgia State University

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 16: Lecture for Chapter 4.3 (Fall 09)

IIIIII:: VVIRTUALIZATIONIRTUALIZATION

PROS Provides abstraction of

resources. User can forgo hardware

specifics and it’s cheaper. Multiple virtualization modes

can be used based on the nature of the transaction.

o Para, Partial, Full If a virtualization machine

(VM) instances goes down, it can easily be moved to a new host machine.

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.

16

© 2009 Georgia State University

Page 17: Lecture for Chapter 4.3 (Fall 09)

RREFERENCESEFERENCES

[1] “Distributed Operating Systems & Algorithms”, 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] “The Two-Phase Commit Protocol”, Mike Duckett, http://ei.cs.vt.edu/~cs5204/ sp99/distributedDBMS/duckett/tpcp.html, 4-30-1995.

[5] “DB2 Universal Database”, IBM, http://publib.boulder.ibm.com/ infocenter/db2luw/v8/ index.jsp?topic=/com.ibm.db2.udb.doc/admin/c0004558.htm, 4-30-2009.

[6] “X/Open XA”, http://en.wikipedia.org/wiki/X/Open_XA, 8-9-2009.

[7] “X/Open XA Standard”, http://www.opengroup.org/onlinepubs/009680699/toc.pdf, 1991.

17

© 2009 Georgia State University

Page 18: Lecture for Chapter 4.3 (Fall 09)

QQ&&AA18

© 2009 Georgia State University