Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Transaction Management, Fall 2002 Unconventional transactions Jyrki Nummenmaa

Similar presentations


Presentation on theme: "Distributed Transaction Management, Fall 2002 Unconventional transactions Jyrki Nummenmaa"— Presentation transcript:

1 Distributed Transaction Management, Fall 2002 Unconventional transactions Jyrki Nummenmaa http://www.cs.uta.fi/~jyrki/ jyrki@cs.uta.fi

2 Distributed Transaction Management, Fall 2002 Motivation n Transactions managing design data can be very long, as the design progresses slowly. n Business transactions may progress slowly, as they may involve exchange of electronic documents between companies.

3 Distributed Transaction Management, Fall 2002 Traditional TP for long txns? n Traditional transaction processing may not be appropriate, as l items may get locked for too long, l global commit or rollback may not be feasible, and l global recovery may not be feasible

4 Distributed Transaction Management, Fall 2002 Hierarchical transactions n One approach to solving these problems is to divide the transactions into parts hierarchically. l Each part will be committed separately. l The hierarhical division is, of course, fundamentally different from just distribution. l The transactions in the hierarchy may be distributed or centralised.

5 Distributed Transaction Management, Fall 2002 Hierarchical transaction commit n Principle: a transaction in the hierarchy can be committed, when all of its sub-parts have been committed. n Sub-parts are committed as their work is done. n This way, locking will be less problematic, as locks are released as part-transactions commit.

6 Distributed Transaction Management, Fall 2002 Problematic rollback n If all goes well (all transactions in the hierarhcy commit) n What happens, if there is a need to rollback, and some part-transactions have already been committed? n We need some way to manage with the already committed part-transactions.

7 Distributed Transaction Management, Fall 2002 Simple rollback is not possible n Suppose that one part-transaction in the hierarchy needs to rollback, while some other part-transaction has already committed. n Simple rollback does not necessarily do, as committed transactions may have some side-effects.

8 Distributed Transaction Management, Fall 2002 Restarting the part-transaction n If it is possible to re-start the initially failed part-transaction, then the problem of rolling back the already committed disappears. n This may not be always possible, but should, of course, be done whenever possible.

9 Distributed Transaction Management, Fall 2002 Compensating transactions n One possibility to roll back an already committed (part-)transaction is to use a compensating transaction. n A compensating transaction somehow negates the effects of the original transaction.

10 Distributed Transaction Management, Fall 2002 What cannot be compensated n Examples: l money given from a cashline machine l a money transfer to a bank account l an access given and already used l an electronic document/program downloaded or sent

11 Distributed Transaction Management, Fall 2002 The previous slide was not exactly true... n Although the compensation can not be done automatically, there may be ways to do it through electronic or manual document or message exhange. n This is particularly true for business-to- business transactions between trusted partners.

12 Distributed Transaction Management, Fall 2002 Alternative continuations n In some application fields it may be possible to continue the transaction in some other way, if the first way does not work out, without having to roll back the all or some parts of the transaction. n If some part of a business transaction leads to failure, there may be another equally possible way to do it.

13 Distributed Transaction Management, Fall 2002 Technology for distributed txn management n Java2EE and Microsoft have their own technologies available for middleware implementation. n You can use an API to make a participant and use the coordinator provided by J2EE/Microsoft. n TIP is yet another possibility – but has not been a success.

14 Distributed Transaction Management, Fall 2002 Why this is not enough? n These technologies do not support the hierarchical transaction management. n The companies like to have the control over their transactions. n TIP supports heterogeneous environments, but is vulnerable to failure and attacks.

15 Distributed Transaction Management, Fall 2002 Problems to solve with TIP-like solutions n Security n Trust n Denial-of-service attacks n Recovery, when the protocol fouls up.

16 Distributed Transaction Management, Fall 2002 TIP – denial of service attacks n PULL-based: l A rogue company that knows the transaction ID sends a PULL to a site then close the connection. n PUSH-based l Flood a sites with PUSHes so that it cannot service legitimate requests. n If a site loses its connection to its superior, the rogue sites sends it a RECONNECT command and tells it the wrong result of the commit.

17 Distributed Transaction Management, Fall 2002 TIP – repudiation n Interaction of 2PC and authenticated protocol messages l The semantics of the authenticated messages only apply if the txn is committed. n If a message from A to B is part of a 2PC protocol, then B’s possession of the digital signature proves nothing. l A can claim: Yes, that was sent, but the action was rolled back. l B must prove that the action was committed. B must also prove that the message was part of that txn.

18 Distributed Transaction Management, Fall 2002 Problems to solve with TIP-like solutions : security n It is possible to use Secure- HTTP/SSL/TLS with l encryption and l end-to-end authentication n This works for just security, but developments for trust and denial-of- service attack management will probably require changes here.

19 Distributed Transaction Management, Fall 2002 Problems to solve with TIP-like solutions : trust n If just about any company may participate in the transactions, then trust for the good will of the company is required. This, in particular has to do with denial-of-service attacks and non- repudiation. n Even if participation is limited to companies, whose good will we trust, we still need to trust their implementations.

20 Distributed Transaction Management, Fall 2002 Problems to solve with TIP-like solutions : ”manual” recovery n If the protocol fails and manual recover is necessary, then how will this be done in inter-company transactions? n In other words, operator intervention is needed when the commit protocol fouls up - how will this work on the Internet?

21 Distributed Transaction Management, Fall 2002 Brokerage companies / electronic marketplaces n It would seem from above that there is demand for electronic marketplaces or brokerage companies through which business is done. n Some such marketplaces have been implemented – they have been expensive and there is no evidence as yet that they will meet the expectations.

22 Distributed Transaction Management, Fall 2002 Current trend n Companies write their complicated business transactions in a way in which they manage their own transactions themselves instead of giving the control outside. n This means that in case of troublesome rollback situations, they have to use compensating – but not necessarily 100% automatic – transactions.


Download ppt "Distributed Transaction Management, Fall 2002 Unconventional transactions Jyrki Nummenmaa"

Similar presentations


Ads by Google