1. Give a description in your own words of the ACID properties of a transaction.
ACID properties of a transaction represents atomicity, consistency, isolation and durability of the transaction.
Atomicity:
Atomicity refers to the ability of the DBMS to guarantee that either all of the tasks of a transaction are performed or none of them are. For example, the transfer of funds from one account to another can be completed or it can fail for a multitude of reasons, but atomicity guarantees that one account won’t be debited if the other is not credited.
Consistency:
The Consistency property ensures that the database remains in a consistent state before the start of the transaction and after the transaction is over. Consistency states that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.
Isolation:
Isolation refers to the requirement that other operations cannot access or see the data in an intermediate state during a transaction. This constraint is required to maintain the performance as well as the consistency between transactions in a Database management system.
Durability:
Durability refers to the guarantee that once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won’t need to abort the transaction.
Reference :
What is ACID, Retrieved May 27 , 299 from
http://en.wikipedia.org/wiki/ACID
2. Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?
Transaction processing monitor, a program that monitors a transaction as it passes from one stage in a process to another. The TP monitor’s purpose is to ensure that the transaction processes completely or, if an error occurs, to take appropriate actions.
TP monitors are especially important in three-tier architectures that employ load balancing because a transaction may be forwarded to any of several servers. In fact, many TP monitors handle all the load balancing operations, forwarding transactions to different servers based on their availability.
The types of jobs performed through the TP monitor are: process management, transaction management, and client/server communication management. TP monitor can stop an operation system being overwhelmed by maintaining a pool of processes and queues transactions so that the clients can take turn to use the pool.
Reference :
TP Monitor, Retrieved May 27 , 299 from
http://www.webopedia.com/TERM/T/TP_monitor.html
3. What is difference in load balancing with traditional and transactional MOM, RPC and conversations?
RPC- Remote Procedure Call is a synchronous communication where the calling application must stop processing or is blocked from proceeding until receiving the response from the remote procedure. RPC is simple but performance is a great concern. In particular, RPC requires lot of processing power and the numerous exchanges between the client and server cause high memory usage and network traffic.
MOM – Message Orientated Middle ware support asynchronous communication in 2 models, the point to point messaging and message queue models. The advantage of message queue is that the remote program does not require being active while message is sent by the calling program. Both the calling and remote program can process at the own pace without disruption by the middle ware.
However, Transaction Process Monitoring has greater performance advantage in load balancing over both RPC and MOM. TP monitoring would implement the following in load balancing:
i. Use queued input buffer to protect against peak in the workload.
ii. Priority scheduling to prioritize messages.
Reference;
Linthicum, D.S. (1998). Middleware performance. Retrieved May 27, 2009 from http://www.dbmsmag.com/9808d07.html.
4. Why is a two-phase commit protocol better than a one-phase atomic commit protocol?
With one-phase atomic commit protocol, a server could make a decision unilaterally to abort transaction. As a result, the consistency of the transaction would be affected.
Two-phase commit protocol (2PC, sometimes referred as TPC [1] ) is a distributed algorithm that lets all nodes in a distributed system agree to commit a transaction. The protocol results in either all nodes committing the transaction or aborting, even in the case of network failures or node failures. However, the protocol will not handle more than one random site failure at a time so this is better than the previous.
Reference;
http://wapedia.mobi/en/Two-phase-commit_protocol