My Profile
Gifts
Active Members
TodayLast 7 Days
more...
|
Transaction processing
Posted Date: 03 Jul 2008 Resource Type: Articles Category: General
|
Posted By: Ratheesh Member Level: Gold Rating: Points: 7
|
Transaction processing ------------------------- Transaction processing is a computer-based group of logical operations. In order for transaction processing to work, all the operations must succeed or fail as a group. A simple example of transaction processing is paying a utility bill from your bank account. The process of paying a bill from your account consists of debiting your account by say, 100 US dollars (USD), and crediting your utility provider’s account.
This may seem like a simple transaction, but it may actually consist of several sub-operations. If the debit of 100 USD was successful, but the credit did not go through to the utility provider’s account, then the transaction would fail. Your 100 USD would be lost somewhere in the transaction. The transaction processing system allows all the operations to be grouped into a single transaction in order to prevent problems in consistency.
Systems capable of transaction processing must pass tests for atomicity, consistency, isolation and durability, otherwise known as the ACID test. Transactions are known as atomic, meaning that the transaction will either happen or not. If one account is debited, then another account has to be credited.
The transaction processing system must always be consistent with its own rules. If errors occur in the transaction on either side, then the transaction will fail. Isolating transactions means that other processes never see information during the transaction. They may see information before or after the transaction, but not during the transaction. For example, if two people are booking the last theatre seat at the same time, they can both see the seat before the booking, but only one person will succeed in booking that seat.
Transactions must be durable. This means that when that final seat in the theatre has been booked and you have received notification that the seat is yours, it is permanently recorded. No matter what problems occur to the system, there are back-ups in place in the transaction processing system to ensure that the record stays permanent.
Transaction processing systems have been available since the 1970s, and nearly all businesses use them. The advent of the Internet has seen a boom in transaction processing systems and software. Over the years, the cost of buying and implementing the necessary software has dropped so much that most businesses can apply it profitably. Banking from home, booking a holiday on the net, shopping and working from home are all now readily available and less time consuming, thanks to transaction processing. commit and roll back --------------------- In transaction systems, commit and roll back refers to the set of actions used to ensure that an application program either makes all changes to the resources represented by a single unit of recovery (UR), or makes no changes at all. The two-phase commit protocol provides commit and rollback. It verifies that either all changes or no changes are applied even if one of the elements (like the application, the system, or the resource manager) fails. The protocol allows for restart and recovery processing to take place after system or subsystem failure.
The two-phase commit protocol is initiated when the application is ready to commit or back out its changes. At this point, the coordinating recovery manager, also called the syncpoint manager , gives each resource manager participating in the unit of recovery an opportunity to vote on whether its part of the UR is in a consistent state and can be committed. If all participants vote YES, the recovery manager instructs all the resource managers to commit the changes. If any of the participants vote NO, the recovery manager instructs them to back out the changes. This process is usually represented as two phases.
In phase 1, the application program issues the syncpoint or rollback request to the syncpoint coordinator. The coordinator issues a PREPARE command to send the initial syncpoint flow to all the UR agent resource managers. In response to the PREPARE command, each resource manager involved in the transaction replies to the syncpoint coordinator stating whether it is ready to commit or not.
When the syncpoint coordinator receives all the responses back from all its agents, phase 2 is initiated. In this phase the syncpoint coordinator issues the commit or rollback command based on the previous responses. If any of the agents responded with a negative response, the syncpoint initiator causes all of the syncpoint agents to roll back their changes.
|
Responses
|
| Author: SSN 03 Jul 2008 | Member Level: Gold Points : 2 | This is good and very helpful article. I have got lots of useful informations regarding the Transactions, Commit and rollback. Commit and rollback is most probably used to security of data.. Thanks.. keep posting articles like this which may help to others to increase their knowledge and idea... Note the para given below: it contains very useful information regarding Commit and rollback
The two-phase commit protocol is initiated when the application is ready to commit or back out its changes. At this point, the coordinating recovery manager, also called the syncpoint manager , gives each resource manager participating in the unit of recovery an opportunity to vote on whether its part of the UR is in a consistent state and can be committed. If all participants vote YES, the recovery manager instructs all the resource managers to commit the changes. If any of the participants vote NO, the recovery manager instructs them to back out the changes. This process is usually represented as two phases.
thanks regards Naushad
|
|