Tuesday, April 28, 2009

Exercise 19: TP monitors and transaction protocols

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

ACID is combine with the words: Atomicity, Consistency, Isolation and Durability. ACID is properties sets that sure the database transactions work reliable. In the database architecture, a transaction is a single logical process or a set of sequential process to preform a task. For an example, transfer of funds from one bank account to another is called a transaction process. Although it might involve multiple individual operations in different bank accounts within the database (Wikipedia, N.A.).

Atomicity - the DBMS ensure either all of the tasks of a transaction are done or none of them.
Consistency - before start and over of a transaction, ensure the database remains in a consistent state.
Isolation - the data in an intermediate state during the transaction processing cannot be accessed or saw by other operations.
Durability - After the transaction have been done successful, that transaction will become persistent and not be undone.

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

TP monitor provides an execution environment for resource managers and applications. TP monitor launches a server to perform the request, when requests arrive from local or remote clients. Before creating a server for a request, the TP monitor authorizes the client to the service. The client must be authenticated by the TP monitor as a particular person or group of persons. TP monitor also records the security check or security violation in an audit trail (Gray & Reuter, 1993). TP monitor handle two important processes (Ince, 2002):
  • Manage the concurrent execution of threads and processes, ensure the ACID properties in a transaction
  • Ensure the consistent update in a share update transcation of data when other transaction wsih to acces the shared data.

TP monitor does not replace the operating system completely, though that might be possible. The operating system can handle batch, time-sharing and communication. TP monitor trake care of online transaction processing (OLTP) and distributed transaction(Gray & Reuter, 1993).

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

Load balancing with traditional and transactional:
A load-balancing solution connects multiple servers work together, make them look like a single and high-powered network resource to those accessing the system. It does this by selectively forwarding connections to the many servers arrayed behind it in a equitable manner, according to the operational health of the server and the nature of the query (Intel, 2000).

The traditional load balancing solutions check the health of the server, in order to determine which machines are able to handle the incoming request. This can be traced either by testing the server with an artifical client, or by sending it a series of scripts that can try out critical pages and look at the responses. This simply responding to occasional health tests is no longer adequate for today's right content in a timely manner (Intel, 2000).

The transactional load-balancing (or transactional content awareness) solution monitor actual transactions on an ongoing basis. The more important the transaction,the more necessary it is that both parties involved are certain it has been completed. An automated teller machine (ATM) system, valuable exchanges of money and information, it is important to be sure that transactions have been completed properly. Load balancing must be transaction-aware (Intel 2000).

RPC and conversations:
Remote procedure call (RPC) is a interprocess communication technique. RPC allows communication between client and server software (Microsoft, 2000). The general communication of RPC is very simple and patterned like human conversation habits (HXP, 2004). RPC work in computers and use network for communication channel, but conversations are communication between people and use air for media channel.


RPC works over the Internet, Intranet and local host:


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

The two-phase commit (2PC) ensure that either all the databases are udpated or none of them (Webopedia, N.A.):

  • 1st phase: requested changes of the database by a transaction are initially stored temporarily by each database. The transaction monitor and issues a pre-commit command to each database which requires an acknowledgment (Webopedia, N.A.). Voting phase which ensure that all sites are ready to commit (Veda & Mittal, 2004).
  • 2nd phase: If the monitor receives the proper response from each database, the monitor issues the commit command. The commit command causes all database to simultaneously make the transaction permanent changes (Webopedia, N.A.). Decision phase which ensure uniformity at abort or commit at all sites (Veda & Mittal, 2004).
The one-phase commit (1PC) protocol overlaps the voting phase with the execution of transaction and just has a decision phase. The Implicit Yes Voting and the Coordinate Log are implemented in the 1PC protocol. 1PC can not the deferred consistency constraints (Veda & Mittal, 2004).

2PC is better than 1PC (Veda & Mittal, 2004):

  • Ensures atomicity even in deferred constraints
  • Ensures independent recovery of all sites
  • As it takes place in 2 phases, it can handle network failures, disconnections and in their presence assure atomicity that 1PC cannot.
Reference

  1. Gray, J. and Reuter, A. (1993), Transaction processing: concepts and techniques, Morgan Kaufmann Publishers, Inc.
  2. HXP (2004), Rpc - remote procedure call, Healthcare Xchange Protocol, Retrieved at http://hxp.sourceforge.net/rpc.html on 29th April, 2009.
  3. Ince, D. (2004), Developing distributed and e-commerce applications, 2nd edition, Addison-Wesley.
  4. Intel (2000), Transactional load-balancing systems: delivering true server availability, Intel.
  5. Microsoft (2000), Remote procedure call, Microsoft TechNet, Retrieved at http://technet.microsoft.com/en-us/library/cc958781.aspx on 29th April, 2009.
  6. Veda, A. and Mittal, K. (2004), Project report: one and two phase commit protocols, Kanwal Rekhi School of Information Technology.
  7. Webopedia (N.A.), Two-phase commit, Webopedia, Retrieved at http://www.webopedia.com/TERM/T/two_phase_commit.html on 29th April, 2009.
  8. Wikipedia (N.A.), Acid, Wikipedia, Retrieved at http://en.wikipedia.org/wiki/ACID on 28th April, 2009.

No comments:

Post a Comment