Wednesday, May 19, 2010

Exercise 11

1. Give a description in your own words of the ACID properties of a transaction.
Atomic means that all portions of a transaction will process successfully or none of them will.


The ACID model is one of the oldest and most important concepts of data theory. It sets forward 4 goals that every database management system must strive to achieve: Atomicity, Consistency, Isolation, and Durability. Any database that fails to meet any of these 4 goals should not be considered reliable.Transactions are sequences of operations or smaller sub tasks to be executed all together successfully or else the entire transaction is void.

Atomicity: requires that all operation of a transaction be completed; if not, the transaction is completed aborted. If a transaction has 4 steps, all 4 steps must be successfully completed; otherwise, the entire transaction is aborted. So in other words, a transaction is treated as a single, indivisible, logical unit of work.

Consistency: indicates the permanence of consistent state. If for some reason a transaction is executed that violates data consistency rules, the entire transaction must be rolled back and the data restored to a state of consistent with those data rules. An example of this is within databases that a string is trying to write to a integer field in the database. This is not sticking to the rules of the database and is therefore breaking the state of the data, only an integer value can be stored in this field which would then take this to the next consistent state.

Isolation: means that the data used during the execution of a transaction cannot be used by a second transaction until the first one is completed. This property is particularly useful in multiuser database environments because several users can access and update the database at the same time.
Durability: ensures that any transaction committed successfully will not be lost, undone, even in the event of a system failure. A good example of this is say you make a payment on a banking website and you receive the receipt however this is never passed through to the database because of a server failure during the time of the transaction. This would be the ACID "D" rule.

Consistant means that if a transaction is repeated then the same result will eventuate.
Isolated means that the transaction is not affected by other transactions (Vogels, 2007).
Durable means that the result are stored permanently.

Reference
Vogels,W.(2007). Eventually consistent. Retrieved May 3, 2010 from http://www.allthingsdistributed.com/2007/12/eventually_consistent.html

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

Transaction Processing or TP Monitor is a control program that monitors, controls and manages a transaction as it passes from one stage in a transaction process to another through various local and remote terminals and various application programs ensuring that the transaction process is completed and the transaction is not lost in between.(Toolbox for IT, n.d.)

TP monitors are especially important in three-tier architectures that employ load balancing because a transaction may be forwarded to any of several servers. Many TP monitors handle all the load balancing operations, forwarding transactions to different servers based on their availability.(Webopedia, 2001)

A TP monitor stops an operating system from being overwhelmed in the following way:
A server has an upper limit of “N” concurrent operations which it can perform at 100% utilization. An operating system does not manage the number of concurrent operations which it can perform after 100% utilisation. Beyond that point, the cost of each additional operation decreases the server’s utilisation below 100%. Transaction processing monitoring maintains the server stays at 100%. (Tyrex, n.d.)

A TP monitor does this by efficient resource utilisation. The TP monitor is responsible for managing loads, synchronizing operations, pooling connections, recycling threads, and giving performance metrics.(Tyrex, n.d.)

If the server is only capable of performing a small number of transactions, typically it will reach maximum TPM (transactions per minute) before thrashing ( swapping memory pages in and out), context switching, or concurrent I/O takes it toll. It might not be able to service enough connections even before reaching the point of TPM. In such scenarios TP monitoring is typically used to enhance performance through resource pooling and recycling, and to place limits on resource consumption to guarantee some quality of service. (Tyrex, n.d)

References.

Webopedia. (2001 ). TP monitor. Retrieved May 10, 2010 from http://www.webopedia.com/TERM/T/TP_monitor.html

Toolbox for IT. (n.d.). TP Monitors. Retrieved May 10, 2010 from http://it.toolbox.com/wiki/index.php/TP_Monitors

Tyrex. (n.d.). TP Monitoring Primer. What TP Monitoring Does. Retrieved May 11, 2010 from http://tyrex.sourceforge.net/tpmonitor.html

No comments:

Post a Comment