Monday, May 25, 2009

Exercise 19

Exercise 19: TP Monitors and Transaction Protocols

1. Give a description in your own words of the ACID properties of a transaction.

ACID properties of a transaction refers to
Atomicity: The phrase "all or nothing" succinctly describes the first ACID property of atomicity. When an update occurs to a database, either all or none of the update becomes available to anyone beyond the user or application performing the update.
Consistency: Consistency is the ACID property that ensures that any changes to values in an instance are consistent with changes to other values in the same instance
Isolation: The isolation portion of the ACID properties is needed when there are concurrent transactions. An important concept to understanding isolation through transactions is serializability. Transactions are serializable when the effect on the database is the same whether the transactions are executed in serial order or in an interleaved fashion.
Durability: Durability refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails.

(Associates, 2009)

2. Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?

A TP Monitor is a subsystem that groups together sets of related database updates and submits them together to a relational database. The result is that the database server does not need to do all of the work of managing the consistency/correctness of the database; the TP Monitor makes sure that groups of updates take place together or not at all. TP-Monitor environment which partitions the workflow engine into several resource managers (RMs) individually managed by a TP-Monitor environment. The RMs together form the workflow engine serving user requests. (Browne's, 2007)

3. What is the difference in load balancing with traditional and transactional MOM, RPC, and conversations?

Load balancing is dividing the amount of work that a computer has to do between two or more computers so that more work gets done in the same amount of time and, in general, all users get served faster.
Traditional RPC Model: In this the request from user should be queued and wait synchronously for the server to execute and return the reply where the client and server should be free at the same time.
MOM: MOM stands for Message-oriented middleware It acts as a middleware between the client and server, buffering the requests from user and replies from servers.
RPC(remote Procedure Call): Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space(commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction.

4.Why is a two-phase commit protocol better than a one-phase atomic commit protocol?

One –phase Atomic Commit Protocol
This protocol overlaps the voting phase with the execution of transaction and just has a decision
phase. There are two implementation the Implicit Yes Voting and the Coordinate Log.
Advantages:
Simple protocol fewer overheads.
• Low latency due to fewer disk writes.
• Useful in case of low bandwidth networks, as lesser messages are exchanged.
• In most cases all the updates will be logged befor commit so durability is assured.
Disadvantages
• The greatest disadvantage is that it can only handle immediate consistency con-
straints as there is no voting phase. It can not handle the deferred consistency
constraints

Two-Phase Atomic commit protocol: This is the most widely used protocol which commences in two phases ,Voting , to ensure that all sites are ready to commit,Decision , to ensure uniformity at abort or commit at all sites.
2PC is largely used in all distributed systems.
Advantages
• It ensures atomicity even in the presence of deferred constraints.
• It ensures independent recovery of all sites.
• Since it takes place in twophases, it can handle network failures, disconnections and
in their presence assure atomicity.
Disadvantages
• Involves a great deal of message complexity.
• Greater communication overheads as compared to simple optimistic protocols.
• Blocking of site nodes in case of failure of coordinator.
• Multiple forced writes of log, which increase latency.
• Its performance is again a trade off,especially for short lived transactions, like Internet
applications

(Anshu Veda, 2004)

No comments:

Post a Comment