5/01/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 is stands for Atomicity, Consistency, Isolation, and Durability. Actually ACID properties provide a high processing reliabilty to transaction. For example, Atomicity is the operation sequence which must be an atomic, either all or no operations are performed; Consistency is the the operation which must leave data consistently, and all defined relations must be maintained.
Isolation let the transaction separate from all other transactions. Durability is the operations which are permanently placed on the system.

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

TP monitor is stands for TeleProcessing monitor or Transaction Processing monitor, encyclopedia2 (2009) states that it a control program that manages the transfer of data between multiple local and remote terminals and the application programs that serve them. It may also include programs that format the terminal screens and validate the data entered.In a distributed client/server environment, a TP monitor provides integrity by ensuring that transactions do not get lost or damaged. It may be placed in a separate machine and used to balance the load between clients and various application servers and database servers. It is also used to create a high availability system by switching a failed transaction to another machine. A TP monitor guarantees that all databases are updated from a single transaction.

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

Qusay H. Mahmoud (2004) tell me that RPC calls require more bandwidth than a similar MOM interaction. Bandwidth is an expensive performance overhead and is the main obstacle to scalability of the RPC mechanism. The RPC model is designed on the notion of a single client talking to a single server; traditonal RPC has no built-in support for one-to-many communications. The advantage of an RPC system is the simplicity of the mechanism and straightforward implementation. The advantage that has over MOM is the guarantee of sequential processing. With the synchronous RPC model, you can control the order in which processing ocurs in which processing occurs in the system. For example, in an RPC system you can be sure that at any one time all the new orders received by the system have been added to the database and that they have been added in the order of which they were received. However, with an asynchronous MOM approach this cannot be guaranteed, as new orders could exist in queues waiting to be added to database. This could result in a temporal inaccuracy of the data in the database. We are not concerned that these updates will not be applied to the database, but that a snapshot of the current database would not accurately reflect the actual state of orders placed. RPC is slow but consistent; work is always carried out in the correct order. These are important considerations for sections in a system that requires data to have 100% temporal integrity.

In conclusion, the RPC model is ideal if you want a strongly typed/object-oriented (OO) system with tight coupling, compile-time semantic checking and an overall more straightforward system implementation. In contrast, if the distributed systems will be geographically dispersed deployments with poor network connectivity and stringent demandss in reliability, flexibility and scalability, then MOM is the ideal solution.

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

I find useful tuturial from Agora (2007) and it tells me that

In a one-phase commit protocol, the coordinator communicates commit or abort to all participants until all acknowledge.
  • When a client/coordinator requests a commit, it does not allow a server to make a unilateral decision to abort a transaction.
  • A server may have to abort the transaction, for example, in the case of deadlock.

In a two-phase protocol, any participant can abort its part of the transaction. Transaction is committed by consensus.

  • When the client asks the coordinator to commit the transaction, the two-phase commit protocol is executed.

After reading that powerpoint, i find there is a serious problem in one-phase commit protocol that if a process cannot perform the operation, there's no way to tell the coordinator! In contrast, two-phase commit protocol has a well communication that is better than one-phase commit protocol, which avoids from this scenario.

Referances:

Encyclopedia2 (2009). "TP monitor". Received 5th May, 2009 from URL - http://encyclopedia2.thefreedictionary.com/TP+monitor

Qusay H. Mahmoud (2004). When to use MOM or RPC. Middleware for communications.John Wiley and Sons Publishers (p7)

Agora (2007). " Lecture 12 -Distributed transcations".Received 5th May, 2009 from URL - https://agora.cs.illinois.edu/download/attachments/26989/lect-12.ppt

沒有留言:

發佈留言