Download presentation
Presentation is loading. Please wait.
Published byGriselda Richard Modified over 9 years ago
1
Copyright © Choreology Ltd. March 2002 Choreology® The Interplays of Commerce OASIS Business Transaction Protocol: Multi-party Coordination for Commercial Collaborations peter.furniss@choreology.com alastair.green@choreology.com tony.fletcher@choreology.com March 2002
2
Choreology® The Interplays of Commerce 2 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Goals Inter-organizational multi-party coordination Targetting Web Services, but not only WS Accommodate Long-running Transactions
3
Choreology® The Interplays of Commerce 3 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Requirements Coordination of autonomous parties Relationships are governed by contracts, rather than the dictates of a central design authority Drop less ACID Multiple possible successful outcomes to a transaction Relaxed isolation, volatile results Interoperation Using XML, over multiple communications protocols Discontinuous service Work unit lifespans exceed sub-system MTBFs
4
Choreology® The Interplays of Commerce 4 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 The key BTP roles Application Client sideService side Protocol Client Initiator/Terminator Service Transaction Decider (Composer or Coordinator) Participant Enroller Factory
5
Choreology® The Interplays of Commerce 5 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Ask Factory to Create top coordinator Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Enroller Factory BEGIN / BEGUN&CONTEXT creates
6
Choreology® The Interplays of Commerce 6 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Send Application Message with CONTEXT Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Enroller Factory CONTEXT
7
Choreology® The Interplays of Commerce 7 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Service creates and causes ENROL of Participant Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Factory Enroller creates ENROL / ENROLLED
8
Choreology® The Interplays of Commerce 8 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Send Application Reply with CONTEXT_REPLY Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Enroller Factory CONTEXT_REPLY
9
Choreology® The Interplays of Commerce 9 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 CONFIRM_TRANSACTION Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Factory Enroller CONFIRM_TRANSACTION
10
Choreology® The Interplays of Commerce 10 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Two-phase Confirmation: PREPARE phase Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Factory Enroller PREPARE / PREPARED
11
Choreology® The Interplays of Commerce 11 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Two-phase Confirmation: Outcome phase Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Factory Enroller CONFIRM / CONFIRMED
12
Choreology® The Interplays of Commerce 12 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 TRANSACTION_CONFIRMED Reply Application Client sideService side Protocol Client Initiator/Terminator Service CoordinatorParticipant Factory Enroller TRANSACTION_CONFIRMED
13
Choreology® The Interplays of Commerce 13 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cancellation Example showed CONFIRM/CONFIRMED Terminating application can also issue CANCEL_TRANSACTION Or the CONFIRM_TRANSACTION can fail, leading to TRANSACTION_CANCELLED CANCEL/CANCELLED exchange with Participant
14
Choreology® The Interplays of Commerce 14 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Service and Participant: Provisional effect and Counter-effect Forward Operations create a provisional effect … … and durably record information needed by Participant Participant uses log to perform final effect or to counter-effect A (provisional ) finalise A counter A Log of A Participant Service CONFIRM CANCEL Service sideClient side
15
Choreology® The Interplays of Commerce 15 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Provisional, final and counter effects Provisional effect Apparently – the application’s forward operation Really – just do what is needed to do either final or counter Do something, log (persist) information for final or counter Final effect – action on CONFIRM Final effect is action on CONFIRM Complete the operation so it did happen Use the information in the log, discard log Counter effect – action on CANCEL Counter-effect is action on CANCEL Make it that the application did not happen (or unhappened) Use the information in the log, discard the log May be perfect or have side effects
16
Choreology® The Interplays of Commerce 16 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 2PC ACID Example #1: Compensation strategy Provisional Effect includes committed database updates or message enqueues E.g. debit credit card account Final effect is no-op Counter-effect involves compensatory action E.g. contra-credit credit card In whole or in part depending on business contract Example #2: XA RM Provisional Effect posits but does not commit database updates or MQPUTs Final effect invoke xa_commit Throw away RM undo logs Counter-effect is to invoke xa_rollback Process RM undo logs
17
Choreology® The Interplays of Commerce 17 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Service decides what a Participant covers Service can combine provisional effects into one Participant Single confirm or cancel signal Application specific Service had the right to create and enrol two participants A B finalAB counterAB Operation Group Log of A, B Participant Service CONFIRM CANCEL Service sideClient side
18
Choreology® The Interplays of Commerce 18 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Superior-Inferior Relationship - outcome Superior Inferior PREPARE CONFIRM CANCEL PREPARED CONFIRMED CANCELLED Composer Coordinator Sub-composer Sub-coordinator Sub-composer Sub-coordinator Participant
19
Choreology® The Interplays of Commerce 19 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Transaction Tree - 1 Superior [e.g. Coordinator] Inferior [Participant] Inferior [Participant] Inferior [Participant]
20
Choreology® The Interplays of Commerce 20 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Transaction Tree - 2 Superior [e.g. Coordinator] Inferior [Participant] Inferior [Participant] Inferior [Participant] Inferior/Superior [e.g. Sub-coordinator]
21
Choreology® The Interplays of Commerce 21 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Transaction Tree - 3 Superior [Composer] Inferior [Participant] Inferior [Participant] Inferior [Participant] Inferior/Superior [e.g. Sub-coordinators]
22
Choreology® The Interplays of Commerce 22 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Coordination Hub: control and outcome relationships Application Client Service Protocol Client Initiator/Terminator Service Participant Factory Enroller Coordination Hub Transaction Decider (Composer or Coordinator) control outcome
23
Choreology® The Interplays of Commerce 23 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions: The Concept Superior Composer Inferior Participant Shipping Atom Inferiors Participants ServicesBuyer Goods Atom Inferior Coordinators Superior Cohesion Terminator #1 #2
24
Choreology® The Interplays of Commerce 24 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions: PREPARE both Atoms Superior Composer Inferior Participant Inferiors Participants ServicesBuyer Inferior Coordinators Superior Cohesion Terminator P P PREPARE #1 #2 PREPARE_INFERIORS #1, #2 Shipping Atom Goods Atom
25
Choreology® The Interplays of Commerce 25 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions: both are PREPARED Superior Composer Inferior Participant Inferiors Participants ServicesBuyer Inferior Coordinators Superior Cohesion Terminator INFERIOR_ STATUSES #1 P’d #2 P’d P’d PREPARED Shipping Atom Goods Atom #1 #2
26
Choreology® The Interplays of Commerce 26 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions: CONFIRM #1 ( CANCEL #2) Superior Composer Inferior Participant Inferiors Participants ServicesBuyer Inferior Coordinators Superior Cohesion Terminator CONFIRM CANCEL CONFIRM CANCEL CONFIRM_TRANSACTION #1 Shipping Atom Goods Atom #1 #2
27
Choreology® The Interplays of Commerce 27 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions: #1 CONFIRMED, #2 CANCELLED Superior Composer Inferior Participant Inferiors Participants ServicesBuyer Inferior Coordinators Superior Cohesion Terminator INFERIOR_ STATUSES #1 CO’d #2 CA’d CO’d CA’d CONFIRMED CANCELLED Shipping Atom Goods Atom #1 #2
28
Choreology® The Interplays of Commerce 28 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Cohesions rely on “Open-top” Coordinator Cohesion Composer “Open-top” Atom Coordinators Cohesion Terminator CONFIRM / CONFIRMED #1 CONFIRM_TRANSACTION #1 INFERIOR_ STATUSES #1 CO’d #2 CA’d PREPARE / PREPARED CANCEL / CANCELLED PREPARE / PREPARED #2
29
Choreology® The Interplays of Commerce 29 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Example: Cross-company Securities Trading Hedge Fund ABN Amro NomuraCommerzDKB O S O S O S O S Stock and option – from different market makers
30
Choreology® The Interplays of Commerce 30 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Example: Cross-company Securities Trading Hedge Fund ABN Amro NomuraCommerzDKB O S O S O S O S Each market maker makes two guaranteed time-qualified quotes = PREPARED, from 2 participants each
31
Choreology® The Interplays of Commerce 31 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Example: Cross-company Securities Trading Hedge Fund ABN Amro NomuraCommerzDKB O S O S O S O S Hedge fund chooses one of each, cancels the others (or lets them timeout)
32
Choreology® The Interplays of Commerce 32 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Participant time-out Inferior can limit duration of its preparedness Inferior threatens to auto-cancel or confirm after (at least) n seconds Inferior qualifies the PREPARED message Prevents coordinator hogging service provider’s resources Independent organization likely to demand this power Risks contradiction – which will be reported Superior can negotiate the time limit Superior qualifies the PREPARE message Prevents service wasting coordinator’s time
33
Choreology® The Interplays of Commerce 33 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Failure Recovery Protocol incorporates recovery after failure Superior system, Inferior system or network may fail Must try to re-establish Superior-Inferior relationship Allows outcomes to be replayed Standard “presumed abort” protocol No durable record (log) equals absence of decision Default decision (in absence of evidence to contrary): CANCEL Bi-directional recovery initiation Superior can attempt to contact logged Inferiors Inferior can attempt to contact logged Superior
34
Choreology® The Interplays of Commerce 34 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Active phase recovery Allows Superior/Inferior re-synch after failures Standard 2PC protocols allow recovery only after prepared BTP treats failure as a potential interruption Standard 2PC protocols treat any failure as cause to cancel Permitted, not required Presume-abort still applies – just it isn’t compulsory Useful for long-running transactions Useful with interruptible communications
35
Choreology® The Interplays of Commerce 35 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Messaging All BTP messages are XML documents Can be compounded for optimization “One-shot requests”: only 2 WAN messages instead of 6 Application response + ENROL/PREPARE “One wire” application topologies All traffic between two business entities over a single, authenticated link Binding of abstract set to SOAP Defined in the specification Other bindings are possible To any underlying communications protocol stack
36
Choreology® The Interplays of Commerce 36 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Qualifiers Qualifiers can be embedded in messages Some are defined within BTP specification Implementers/applications can define their own Identified by URI Allows extensions to protocol messages trading parties could use to add security data Implementor could use to add full nested transactions Allows application data to travel with protocol Example: confirm a two-way quote Must include “buy” or “sell” in CONFIRM
37
Choreology® The Interplays of Commerce 37 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Business Transactions and Business Process BTP complements BP/Collaboration frameworks A coordinated, mutually understood outcome requires Special messages and acknowledgements Consistent, durable record of decisions Asynchronous failure recovery operations These features are tricky, error-prone and intrusive “Build or buy” BTP lets business people concentrate on business process Puts housekeeping work in the background Minimizes application exchanges Reduces complexity of collaborative process schemas or scripts Reduces conformance testing Deploy new trading protocols or conventions more quickly
38
Choreology® The Interplays of Commerce 38 www.choreology.com BTP Overview – OMG Web-services. Copyright © Choreology Ltd. March 2002 Do Business Together with Business Transactions Ensuring Collaboration for XML Services Internal Business Process Collaboration ProcessBTP Internal Business Process Collaboration ProcessBTP
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.