|< Free Open Study >|| |
As web services become widely implemented they will provide the major framework for integration between companies in the future. As this occurs web services agents will be involved in ever more complex interactions between multiple services supported by different companies. The example services we have examined in this chapter only gather information from services to present to the user. Web services agents and web services can also be used collect information from the user and distribute this information to many services. Web service agents could be used to make travel arrangements or to purchase office supplies from the lowest priced supplier. These scenarios require a web service agent to deal with complex transactions.
In this section, we'll provide a brief overview of how transactions are normally handled. We'll then look at some of the topics that are being researched to deal with the unique problems of dealing with transactions in complex, servlet agent environments.
A transaction is a series of actions or operations that transform a system from one consistent state to another consistent state. For example, if I wanted to move $50 from my savings to my checking account, I would subtract $50 from one account and add $50 to the other. In this case, it takes two operations in order to complete the transaction. If only one of the operations was performed, the system would no longer be in a stable state. It would either have $50 too much (my preference certainly) or might have lost $50. This sort of problem is not new to distributed computing, but it is new to web services and web agents.
Transactions were originally created with databases in mind. As distributed computing grew in importance, the concepts were extended to deal with distributed computing environment. Yet, the basic definition of a series of operation that transforms a system from one consistent state to another consistent state remains. Every transaction must be Atomic, Consistent. Isolated, and Durable - ACID.
Atomicity is also known as the "all or nothing" property. All component parts of a transaction must occur none should occur. This means a transaction is a single unit of operation.
Consistency means that the system moves from one stable state to the next stable state. Each state, the beginning and end states must be stable. This means that if I started with $200 in my combined accounts and I shift money between my accounts, then I should still have two hundred dollars when I am done. The money may be distributed between the accounts differently but the total will remain the same.
Isolation of transactions means that one transaction does not have an effect on another transaction while the transaction is occurring. Transactions cannot expose their intermediate results. They must be completed (by committing or rolling back) before other transactions have access to the results. Each transaction will always see a consistent system state. This is necessary because otherwise if two concurrent transactions were to access the same data item it would be impossible to insure a consistent state at the end of either transaction.
Durability ensures that once a transaction has completed, it is permanent. If the system is not changed by another transaction, the system will remain in its current state. Durability also implies a certain amount of persistence to the state of the system.
Transactions and the computing theories surrounding them were created in the context of databases. In most of these cases, transactions can be completed in seconds or minutes. Web services and web service agents may deal with large numbers of other services, with each one taking significant lengths of time. The normal transaction model does not work as well in this situation. This is true for two reasons:
Web services transactions are spread across diverse systems with different transaction management tools
Web service transactions may span great lengths of time (even days) and tie up resources while waiting for a commit
Technologies that address these issues will play a significant role in the development of web service agents and web services in the future. XAML and XLANG are two technologies that are now trying to rise to meet these challenges.
XAML (http://www.xaml.org/index.html) is a standard being developed by a group of companies to help bring transactions to the world of web services. XAML is supposed to expose transaction manager services as web services. The basic idea is to allow complex web services to be built using transaction managers to insure that each piece of the transaction either occurs or is rolled back.
Another standard (being developed and supported by Microsoft) is XLANG (http://www.gotdotnet.com/team/xml_wsspecs/xlang-c/default.htm). XLANG is not a transaction management standard but a part of it does cover the concept of Long Running Transactions (LTR). These transactions might take days or weeks to accomplish instead of seconds or minutes. The concept for handling these transactions involves a corrective action. In our bank account example, we have a LTR if the $50 was removed from my checking account and a check was sent by postal mail to my savings account. If something fails, like there was not enough money in the account, the check will bounce. A corrective action would be applied to make sure the $50 check is taken from my savings account.
Another common scenario is what happens when a less important the part of a transaction fails. For example, we may elect to have an online purchase insured when shipped. The transaction now involves three parties, the shipper, the insurer and you the customer. If for some reason the insurance carrier was unwilling to insure the package the transaction would normally fail. But the package may be inexpensive and not important to you if it is lost. In this case there is an alternative action that can allow the rest of the transaction to move forward. The alternatives are to either ship without insurance, or find another insurer. If one of these is acceptable, the transaction continues.
Transaction management in web services and agent environments is still a very new technology and there are few available toolkits to even allow experimentation at this time. Yet transaction management will be an important technology for the future of web services. IBM, Microsoft and Hewlett Packard seem to be leading the technology discussions around web services and transactions at this time. This will be an interesting area to watch in the future.
|< Free Open Study >|| |