transactions != business processes william cox, ph.d. oasis symposium on reliable infrastructure new...

20
Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Upload: ronald-peters

Post on 11-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Transactions!=

Business Processes

William Cox, Ph.D.OASIS Symposium on Reliable Infrastructure

New Orleans

26 April 2004

Page 2: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

2

Outline

• Motivation and History

• Common Misconceptions

• Need for Transactions

• BPEL and WS-BA not equivalent

• Common Misconceptions (reprise)

• Summary

• References

Page 3: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

3

Motivation

• Business Processes and [long-running distributed] Transactions have some similarities

• Misconceptions about their relationship– Both what that relationship is, and what it should/could be

• If transactions support business processes, and business processes can do transactions…

• Deeper look

Page 4: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

4

History

• XA (X/Open) ACID Transactions

• OMG Object Transaction Service

– And Extended Structures for OTS

• BTP (similar goals but more complex)

• BPEL4WS (BEA, IBM, MS 2002)

• WS Business Process Execution Language OASIS Technical Committee

• Our examples and sketches are based on recent versions of– BPEL4WS 1.1 [BPEL]

– WS-BusinessActivity 1.1 [WS-BA]

– WS-Coordination 1.1 [WS-C]

Page 5: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

5

Long-running transactions

• Many Business Transaction Specs– Business Transaction Process (OASIS TC 2000, C Draft 2002)

– WS-Transaction/WS-Coordination (BEA/IBM/Microsoft 2002-2003-2004)

– WS-CAF (Sun/Oracle/Iona 2003, OASIS TC)

• Termination protocols, coordination protocols

• Consistent results of an activity

Page 6: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

6

Outline

• Motivation and History

• Common Misconceptions

• Need for Transactions

• BPEL and WS-BA not equivalent

• Common Misconceptions (reprise)

• Summary

• References

Page 7: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

7

Common Misconceptions

• Heard around the industry:– Since a transaction tree is similar to a business process graph, business

processes can do transactions– If you have business processes you don’t need transactions– If you have business processes you ONLY need atomic transactions– WS-BusinessActivity requires WS-Coordination which requires a single

coordinator, and that’s a problem for distributed systems– Transactions can be hidden completely within a business activity, so if

you need them you can use anything you want (and mix and match)– If business processes need transactions, and transactions can be

implemented by business processes, isn’t this an infinite recursion?– You don’t need transactions for business process failure recovery– Interoperation of transaction protocols isn’t needed

Page 8: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

8

Need for Distributed Transactions

• Inter-enterprise error recovery– Too much recovery is manual, expensive, and slow

• A phone call can be expensive and not just in $$

– Don’t want a custom recovery algorithm for each pair of partners!

– This is biggest economic benefit of distributed transactions

• Conciseness of expression– BPEL is a clumsy way to express transactional semantics

Page 9: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

9

A Business Process

• Consider a lender who wants to create as part of a loan approval process a BP to get credit reports from three different credit bureaus then calculate a credit score

Page 10: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

10

A Business Process (continued)

• Each Credit Bureau may have different– Logging

– Recovery

– Legal requirements”

• Which in turn forces the lender to deal with three different recovery mechanisms

• “… the absence of [a] well-defined protocol forces me to…over engineer error handling for every service and system as a whole.” - CNA Insurance email to BTP-comment list, 2003

Page 11: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

11

Outline

• Motivation and History

• Common Misconceptions

• Need for Transactions

• BPEL and WS-BA not equivalent

• Common Misconceptions (reprise)

• Summary

• References

Page 12: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

12

WS-BA emulating BPEL?

• No• WS-BA is a protocol, not an execution environment• WS-BA doesn’t express BPEL constructs such as

– Switch– While– Links– Message Properties– Expressions and assignment

• No separate notion of state in WS-BA

Page 13: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

13

BPEL emulating WS-BA?

• Yes, but not quite:• BPEL join conditions are clumsy for WS-BA

semantics– No Boolean optimization; all branches must evaluate

• So use PICK– But PICK order of selection is implementation-defined

• Exponential state expansion to deal with incomplete branches– WS-BA user can program join conditions without

limitations of BPEL

Page 14: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

14

BPEL emulating WS-BA?(continued)

• BPEL expresses too much and too little– BPEL is a programming environment

• But hard to use vs Java, C#, etc

• Distributed agreement is not part of BPEL– Within a platform-specific implementation– BPEL recognizes need for WS-TX or

equivalent

Page 15: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

15

BPEL emulating WS-BA?(continued)

• BPEL a hard way to express common transactional situations

• BPEL is prescriptive on SOAP headers– Hard to layer without changes to the spec

Page 16: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

16

Outline

• Motivation and History

• Common Misconceptions

• Need for Transactions

• BPEL and WS-BA not equivalent

• Common Misconceptions (reprise)

• Summary

• References

Page 17: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

17

Common Misconceptions (reprise)

• Since a transaction tree is similar to a business process graph, business processes can do transactions– Similar doesn’t mean the same. BPEL can’t effectively do BA

• If you have business processes you don’t need transactions– You’ll need transactions for distributed agreement. Are you using web

services for process steps?

• If you have business processes you ONLY need atomic transactions– Below the level of this talk. Atomic transactions aren’t distributed.

• WS-BusinessActivity requires WS-Coordination which requires a single coordinator, and that’s a problem for distributed systems– A non-issue. Who’s running your business process, by the way?

Page 18: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

18

Common Misconceptions (reprise)

• Transactions can be hidden completely within a business activity, so if you need them you can use anything you want (and mix and match)– But if you care about recovery and need application logic you need to

expose

• If business processes need transactions, and transactions can be implemented by business processes, isn’t this an infinite recursion?– No. You don’t want to use business processes to implement transactions,

only to describe their semantics.

• You don’t need transactions for business process failure recovery– No you don’t. But you’ll save money and time by using transactions

• Interoperation of transaction protocols isn’t needed– Unless you have more than one business partner, and use more than one

transaction protocol among your partners

Page 19: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

19

Summary

• Recovery for multiple partnerships is hard. WS-BA can help

• WS-BA cannot express business processes as can BPEL

• BPEL can superficially describe BusinessActivity transactions, but cannot express their semantics in a meaningful and effective manner

• Don’t try to push application logic into transaction protocols. Use transaction protocols to support application logic

• Don’t believe everything you hear around the industry

Page 20: Transactions != Business Processes William Cox, Ph.D. OASIS Symposium on Reliable Infrastructure New Orleans 26 April 2004

Cox OASIS Symposium 20040426a

20

References

• WS-Coordination• WS-BusinessActivity• IBM Links

http://www-106.ibm.com/developerworks/views/webservices/standards.jsp

Alphabetization problems--some under “WS-”, some under “Web Services”

• Microsoft Linkshttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/wsatspecindex.asp

• BEA Linkshttp://dev2dev.bea.com/technologies/webservices/standards.jsp

Interoperability and Feedbackhttp://www-106.ibm.com/developerworks/offers/WS-Specworkshops/ws-tx200402post.html

http://msdn.microsoft.com/webservices/community/workshops/transactionws032004.aspx

• WS Business Process Execution Language OASIS Technical Committee– http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel