business transactions
DESCRIPTION
Business Transactions. Agenda. Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung. Web Services 101. Web Services sind hip! Breites Angebot von Services - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/1.jpg)
![Page 2: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/2.jpg)
Business Business TransactionsTransactions
![Page 3: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/3.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung
![Page 4: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/4.jpg)
Busi
ness
Tra
nsac
tion
s
Web Services 101
Web Services sind hip! Breites Angebot von Services Aggregation dieser Komponenten ist
der neue Weg, Anwendungen zu bauen.
SOAP als Basis für die Kommunikation bietet ein Reihe von Vorteilen.
![Page 5: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/5.jpg)
Busi
ness
Tra
nsac
tion
s
Alles Neu ! Alles Besser ?
Löst Port 80 alle Probleme ?
Waren alle Probleme ungelöst ?
![Page 6: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/6.jpg)
Busi
ness
Tra
nsac
tion
s
Trouble in Paradise
Fremde Komponenten verhalten sich nicht immer so wie erwünscht.
Vefügbarkeit und Latenzzeit können Problem werden.
Behandlung der möglichen Fehlerszenarien ist sehr komplex.
![Page 7: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/7.jpg)
Busi
ness
Tra
nsac
tion
s
Fault (In)Tolerance Grosse Systeme sind fehleranfällig.
OO macht Systeme robuster.
Verteilte Systeme sind fehleranfälliger. Programmiermodell kann helfen.
Heterogene Systeme sind eine echte Herausforderung !
Muss der Gesetzgeber muss her ?
![Page 8: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/8.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung
![Page 9: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/9.jpg)
Busi
ness
Tra
nsac
tion
s
Grundlagen Transaktionen
Eine klassische Transaktion ( TA ) ist ein ‘unit of work’, die entweder erfolgreich abgeschlossen wird, oder vollkommen ohne Auswirkung bleibt.
Die wichtigen Eigenschaften von TA werden markant ‘ACID’ abgekürzt:
Atomicity: unteilbar, ganz oder gar nicht. Consistency: ein gültiger Zustand wird in
eine anderen, gültigen Zustand überführt. Isolated: Jede TA scheint ‘Highlander’ zu
sein. Durable: Der Ausgang der TA bleibt
dauerhaft gespeichert.
![Page 10: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/10.jpg)
Busi
ness
Tra
nsac
tion
sTransaktionen 1. Generation
Tx.begin();
UPDATE amount = amount + 100 FROM account
WHERE id = 1000;
UPDATE amount = amount - 100 FROM account
WHERE id = 1001;
Tx.commit();
![Page 11: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/11.jpg)
Busi
ness
Tra
nsac
tion
s
Verteilte Transaktionen (1)
Verteilte Transaktionen basieren auf dem Two-Phase Commit (2PC) Protokoll.
Eine Transaktion beginnt und es werden modifizierende Operationen durchgeführt.
Teilnehmende Resourcen erfahren (irgendwie) von der Transaktion
Fertig, das 2PC Protokoll beginnt :
![Page 12: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/12.jpg)
Busi
ness
Tra
nsac
tion
s Phase1
Verteilte Transaktionen (2)
Der Coordinator befragt jede Resource nach ihrem ‘Befinden’ :
VoteReadOnly VoteCommit VoteRollBack
![Page 13: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/13.jpg)
Busi
ness
Tra
nsac
tion
s Phase2
Verteilte Transaktionen (3)
Nachdem alle Resources positiv abgestimmt haben veranlasst der Coordinator die dauerhafte Speicherung (meist unter Nutzung einer DB).
Das ‘Rollback’-Veto einer Resource reicht aus, um die ganze Transaktion zu invalidieren.
Der Coordinator und die Resourcen muessen sich um das Recovery kümmern.
![Page 14: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/14.jpg)
Busi
ness
Tra
nsac
tion
s
Verteilte Transaktionen !
Einfaches Programmiermodell für den Nutzer. Bewährter Industriestandard. Black-Boxing :
Komposition zur Laufzeit. konsequentes ‘information hiding’. Jede Resource entscheidet nur für sich.
Optimierungspotentiale : Lokale Sub-Coordinatoren. Asynchrones 2PC-Protokoll. Minimierung des Context-Overheads.
![Page 15: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/15.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID
Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung
![Page 16: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/16.jpg)
Busi
ness
Tra
nsac
tion
s
Probleme…
Um die ACID-Eigenschaften sicherzustellen müssen zumindest für die Dauer des 2PC Locks auf wertvollen Resourcen gehalten werden.
Eine kontrollierte / zuverlässige Umgebung ist Voraussetzung ( typisches Einsatzfeld von CORBA / RMI / DCOM-Anwendungen ).
Unbrauchbar bei unvorhersagbarer Latenzzeit. unbekannter Verfügbarkeit. unkontrollierter Nutzermenge.
Deshalb : OTS über SOAP reicht nicht !
![Page 17: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/17.jpg)
Busi
ness
Tra
nsac
tion
s
Mehr Probleme… Längere Dauer -> erhöhtes Fehlerrisiko.
SOAP ist nicht das schnellste Protokoll ! Physikalische Entfernung der Teilnehmer. Mehr Komplexität -> längere Bearbeitung.
Mehr Teilnehmer -> höheres Rollback-Risiko.
Ablehnungswahrscheinlichkeiten summieren sich. ( 0,93 10 < 0,5 )
Time Outs werden wahrscheinlicher. Der Recovery-Fall wird Standard !
![Page 18: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/18.jpg)
Busi
ness
Tra
nsac
tion
s
Episode IV: A New Hope
Der Bedarf an Transaktionen bei Web Services ist unumstritten !
Glücklicherweise haben Forscher schon lange darüber nachgedacht.
Es gab Versuche, einen anerkannten Standard für ‘extended Transactions’ zu schaffen.
Z.B. OMG : ‘Activity Service Specification’ OASIS BTP passt am Besten !
![Page 19: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/19.jpg)
Busi
ness
Tra
nsac
tion
s
ACID korrodiert !
Aufgabe zumindest der ACI-Eigenschaften.
Atomicity: Die TA überlebt trotz einzelner Fehler / Rollbacks.
Consistency: Durch Verzicht auf langlebige Locks kann die Konsistenz nicht garantiert werden.
Isolation: Teile einer TA können schon vor ihrem Gesamt-Abschluss sichtbar werden.
![Page 20: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/20.jpg)
Busi
ness
Tra
nsac
tion
sProblem- / Lösungsbereiche
Persistenz ACID
DB
![Page 21: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/21.jpg)
Busi
ness
Tra
nsac
tion
sProblem- / Lösungsbereiche
Persistenz
Verteilung
ACID
DB
XA / OTS
![Page 22: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/22.jpg)
Busi
ness
Tra
nsac
tion
sProblem- / Lösungsbereiche
Persistenz
Verteilung
DifferenzierterAusgang
Multi-Protokoll
MinimalesLocking
ACID
DB
XA / OTS
BTP
![Page 23: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/23.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP)
SOAP, ebXML, usw. Zusammenfassung
![Page 24: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/24.jpg)
Busi
ness
Tra
nsac
tion
s
OASIS BTP Spec
Business Transaction Protocolwww.oasis-open.org/committees/business-transactions
Kick Off : 13. 03. 2001 Termin 1.0 : Ende Dezember ?
![Page 25: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/25.jpg)
Busi
ness
Tra
nsac
tion
sOASIS BTP Technical Committee
– BEA Systems, Inc.– Bowstreet, Inc.– Choreology Ltd.– Entrust, Inc.– Hewlett-Packard Co.– Interwoven Inc.– IONA Technologies PLC– SeeBeyond Inc.– Sun Microsystems Computer Corp.– Talking Blocks Inc.
![Page 26: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/26.jpg)
Busi
ness
Tra
nsac
tion
s
Business Transaction Protocol
BTP ist ein Inter-Operation Protokoll, das definiert, wie sich transaktionale (Web) Services zu verhalten haben.
Und es wird festgelegt, welche Nachrichten während einer Transaktion ausgetauscht werden.
Basis ist das 2PC für kleine ( lokale ) Teile, die zu größeren, nicht-ACID Transaktion zusammengefügt werden.
Die Spezifikation definiert keine API !( siehe aber JSR 156 )
Einige Firmen haben Implementierungen zugesagt, bzw. haben Demos fertig:
HP Choreology/Bowstreet TalkingBlocks BEA ...
![Page 27: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/27.jpg)
Busi
ness
Tra
nsac
tion
s
BTP – Anforderungen
Mehrere erfolgreiche Ausgänge einer Transaktion sind zulässig.
Auswirkungen von Operationen müssen nicht isoliert / dauerhaft sein.
Transaktionsteilnehmer können zeitweise unerreichbar sein.
Kommunikation basierend auf XML. Verschiedene Transportprotokolle sind
zulässig.
![Page 28: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/28.jpg)
Busi
ness
Tra
nsac
tion
s
Begriffe : Atom / Cohesion
Ein Atom ist die BTP Bezeichnung für eine ‘Standard’ -Transaction ( atomar ).
Innerhalb eines Atoms gelten die Regeln des bekannten 2PC. Der Ausgang eines Atoms ist Alles-Oder-Nichts.
Atome können zu Cohesions aggregiert werden.
Business-Regeln bestimmen den Ausgang einer Cohesion in Bezug auf den Ausgang der zugrundeliegenden Atomen.
![Page 29: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/29.jpg)
Busi
ness
Tra
nsac
tion
s
Coordinator
Atome werden von einem Coordinator gesteuert. ‘In Process’ : die Applikation steuert selbst. ‘Out of Process’ : ein spezieller Dienst
übernimmt die Coordinator-Aufgabe. Im Inter-Enterprise-Bereich bietet sich eine
‘Trusted-Coordinator’-Dienstleistung an. Der Coordinator muss fehler-tolerant sein:
Das Ergebnis muss im Stable Storage gesichert sein, bevor es an die einzelnen Teilnehmer propagiert wird.
Im Recovery-Fall dient das Log als Basis für das ‘replay completion’ der koordinierten Transaktion.
![Page 30: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/30.jpg)
Busi
ness
Tra
nsac
tion
s
Atom Example
Atom
Client Application
Coordinator Credit CardClearance Book Shop
![Page 31: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/31.jpg)
Busi
ness
Tra
nsac
tion
s
Atom3
Coordinator Hierarchien
Coordinator 1
Atom2Atom1
Atom5Atom4
Atom7Atom6
![Page 32: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/32.jpg)
Busi
ness
Tra
nsac
tion
s
Atom3
Coordinator Hierarchien
Coordinator 2
Coordinator 1
Atom2
Coordinator 3
Coordinator 4
Atom1
Atom5Atom4
Atom7Atom6
![Page 33: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/33.jpg)
Busi
ness
Tra
nsac
tion
sAtomare Gesetzmäßigkeiten
Der Atom Coordinator ist reaktiv Prepare und Commit des Coordinators ( damit
des Atoms ) werden von ‘aussen’ gesteuert. Beliebige Blockierung von Resourcen möglich.
Die Atoms können ihr Vote ‘qualifizieren’ : Zeitangabe, wie lange ein Atom bereit ist, auf
das Commit zu warten. Danach : Einseitige Annahme über den
AusgangUnilateral confirm / cancel.
Mehrfaches Prepare pro Atom ist zulässig. Rücksetzen der Time-Outs.
![Page 34: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/34.jpg)
Busi
ness
Tra
nsac
tion
sComposer = Cohesion Manager
Der Composer übernimmt die Steuerung der Cohesions ( nicht-atomaren Business TA ).
In-Process / Out-Of-Process. Make Or Buy ( / Use ). Der Composer entscheidet über den Ausgang der
nicht-atomaren TA anhand des Ausgangs der zugeh. Atoms und der Business Logik.
Durch Composer als Teilnehmer an einer Cohesion kann ein Baumstruktur erzeugt werden.
Ein subordinate Composer verhält sich nach aussen wie ein Atom.
![Page 35: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/35.jpg)
Busi
ness
Tra
nsac
tion
s
BTP Schichten
AnwendungAnwendung
Cohesion Cohesion ComposerComposer
Atom Atom CoordinatorCoordinator
ACID Resource ACID Resource
![Page 36: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/36.jpg)
Busi
ness
Tra
nsac
tion
s
Cohesion
Cohesion
Cohesion Composer
Client Application
Atom 1 Atom 2 Atom N
![Page 37: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/37.jpg)
Busi
ness
Tra
nsac
tion
s
Cohesion = Businesslogik
Cohesion
Composer
Application
Atom A1 Atom A2 Atom AN
ConfirmCancelCancel
(A1=Cancel, A2=Cancel, AN=Cancel)
![Page 38: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/38.jpg)
Busi
ness
Tra
nsac
tion
s
Atom3
Cohesion Hierarchien
Cohesion 2
Cohesion 1
Atom2
Cohesion 3
Cohesion 4
Atom1
Atom5Atom4
Atom7Atom6
![Page 39: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/39.jpg)
Busi
ness
Tra
nsac
tion
s Atom
Atom Demo: Organising a Night Out
Application Message
BTP Message
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
SOAP
WebRestaurant Participant
SOAP
SOAPSOAP
SOAP
![Page 40: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/40.jpg)
Busi
ness
Tra
nsac
tion
sAtom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Create Atom
Atom ID
Create AtomAtom ID
WebRestaurant Participant
![Page 41: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/41.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Book Taxi
Enrol
Book Taxi
Enrol
Application Message !
![Page 42: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/42.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Book Table
WebRestaurant Participant
Enrol
Enrol
Book Table
![Page 43: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/43.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Book Seats
WebRestaurant Participant
Enrol
EnrolBook Seats
![Page 44: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/44.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
PreparePrepare
PreparePrepare
Prepare
![Page 45: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/45.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Vote confirmVote confirm
Vote confirm
Vote confirm
Vote confirm
Vote confirm
![Page 46: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/46.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
ConfirmConfirm
ConfirmConfirm
Confirm Confirm
![Page 47: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/47.jpg)
Busi
ness
Tra
nsac
tion
s
Oder…
![Page 48: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/48.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
PreparePrepare
PreparePrepare
Prepare
![Page 49: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/49.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Vote confirmVote confirm
Vote cancel
Vote cancel
Vote confirm
Vote confirm
![Page 50: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/50.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
CancelCancel
Cancel
![Page 51: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/51.jpg)
Busi
ness
Tra
nsac
tion
s
Atom ID
Atom Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Atom cancelled
Atom cancelled
![Page 52: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/52.jpg)
Busi
ness
Tra
nsac
tion
s
Weniger ‘Kultur’ ...
Cohesions erlauben die ‘Aufweichung’ der ACID-Anforderung.
Die Buchung der Theaterkarten wird als ‘nice to have’ eingestuft.
Die Transaktion kann trotzdem zu einem erfolgreichen Abschluss kommen.
Ohne Abendessen geht es aber nicht !
![Page 53: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/53.jpg)
Busi
ness
Tra
nsac
tion
s
Cohesion
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Create Cohesion
Cohesion ID
Create CohesionCohesion ID
WebRestaurant Participant
![Page 54: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/54.jpg)
Busi
ness
Tra
nsac
tion
s
Cohesion
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Create Atom, associate withCohesion
Atom 1
Create Atom,associate withCohesion
Atom 1
WebRestaurant Participant
![Page 55: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/55.jpg)
Busi
ness
Tra
nsac
tion
s Cohesion
Atom 1
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Book Taxi
Enrol(Atom 1)
Book Taxi
Enrol(Atom 1)
![Page 56: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/56.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 1
Cohesion
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Book Table
WebRestaurant Participant
Enrol(Atom 1)
Enrol(Atom 1)
Book Table
![Page 57: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/57.jpg)
Busi
ness
Tra
nsac
tion
sCohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Create Atom, associate withCohesion
Atom 2
Create Atom,associate withCohesion
Atom 2
WebRestaurant Participant
Cohesion
![Page 58: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/58.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 2
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Book Seats
WebRestaurant Participant
Enrol(Atom 2)
Enrol(Atom 2)
Book Seats
Cohesion
![Page 59: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/59.jpg)
Busi
ness
Tra
nsac
tion
sCohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Prepare
WebRestaurant Participant
Prepare
Cohesion
![Page 60: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/60.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 1
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
PreparePrepare
Prepare
Cohesion
![Page 61: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/61.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 1
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Vote confirmVote confirm
Voteconfirm
Cohesion
Voteconfirm
![Page 62: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/62.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 2
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Prepare
Prepare
Cohesion
![Page 63: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/63.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 2
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
Vote cancel
Vote cancel
Cohesion
![Page 64: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/64.jpg)
Busi
ness
Tra
nsac
tion
sCohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
PrepareAtom 1: confirmAtom 2: cancel
WebRestaurant Participant
Cohesion
PrepareAtom 1: confirmAtom 2: cancel
![Page 65: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/65.jpg)
Busi
ness
Tra
nsac
tion
sCohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
Confirm
WebRestaurant Participant
Cohesion
Confirm
![Page 66: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/66.jpg)
Busi
ness
Tra
nsac
tion
s
Atom 1
Cohesion Demo: Organising a Night Out
Client Application
SOAP server
SOAP server
BTP Service
SOAP server
WebTaxi Participant
WebTheatre Participant
SOAP server
WebRestaurant Participant
ConfirmConfirm
Confirm
Cohesion
![Page 67: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/67.jpg)
Busi
ness
Tra
nsac
tion
s
Taxi
Night Out Beispiel : Ergebnisse
Atom 1
Cohesion
Restaurant Theatre
Atom 2
![Page 68: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/68.jpg)
Busi
ness
Tra
nsac
tion
s
Ausgang der Transaktion
‚Commited‘ ‚Rollbacked‘
Klassisches 2 PC
![Page 69: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/69.jpg)
Busi
ness
Tra
nsac
tion
s
Ausgang der Transaktion
‚Commited‘ ‚Rollbacked‘
Klassisches 2 PC
BTP Outcome
![Page 70: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/70.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung
![Page 71: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/71.jpg)
Busi
ness
Tra
nsac
tion
s
BTP Messaging
BTP SOAP Binding hat höchste Priorität.
BTP messages basieren nicht auf SOAP-RPC.
Das BTP SOAP Binding nutzt kein WSDL.
Die Umfang der BTP Messages ist beachtlich gross.
RTFM.
![Page 72: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/72.jpg)
Busi
ness
Tra
nsac
tion
s
BTP Messaging :‘Prepare’PREPARE
<btp:prepare id?> <btp:target-additional-information> ...additional address information... </btp:target-additional-information> <btp:inferior-identifier>...hexstring...</btp:inferior-identifier> ? <btp:reply-address> ? ...address... </btp:reply-address> <btp:transaction-identifier>...hexstring...</btp:transaction-identifier> ? <btp:inferiors-list> ?
<btp:inferior-handle>...hexstring...</btp:inferior-handle> + </btp:inferiors-list> <btp:qualifiers> ? ...qualifiers... </btp:qualifiers></btp:prepare>
![Page 73: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/73.jpg)
Busi
ness
Tra
nsac
tion
s
BTP Messaging : SOAP<soap:Envelope xmlns:soap=... > <soap:Header> <btp:messages xmlns:btp="urn:oasis:names:tc:BTP:xml"> <btp:context superior-type="atom"> <btp:superior-address> <btp:binding>soap-http-1</btp:binding> <btp:binding-address>http://example.com/soaphandler</btp:binding-address> <btp:additional-information>btpengine</btp:additional-information> </btp:superior-address> <btp:superior-identifier>1001</btp:superior-identifier> <btp:qualifiers> ... </btp:qualifiers> </btp:context> </btp:messages> </soap:Header>
<soap:Body> <ns1:orderGoods xmlns:ns1=...> <custID>ABC8329045</custID> <itemID>224352</itemID> <quantity>5</quantity> </ns1:orderGoods> </soap:Body></soap:Envelope>
![Page 74: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/74.jpg)
Busi
ness
Tra
nsac
tion
s
BTP Messaging : SOAP<soap:Envelope xmlns:soap=... > <soap:Header> <btp:messages xmlns:btp="urn:oasis:names:tc:BTP:xml"> <btp:context superior-type="atom"> <btp:superior-address> <btp:binding>soap-http-1</btp:binding> <btp:binding-address>http://example.com/soaphandler</btp:binding-address> <btp:additional-information>btpengine</btp:additional-information> </btp:superior-address> <btp:superior-identifier>1001</btp:superior-identifier> <btp:qualifiers> ... </btp:qualifiers> </btp:context> </btp:messages> </soap:Header>
<soap:Body> <ns1:orderGoods xmlns:ns1=...> <custID>ABC8329045</custID> <itemID>224352</itemID> <quantity>5</quantity> </ns1:orderGoods> </soap:Body></soap:Envelope>
![Page 75: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/75.jpg)
Busi
ness
Tra
nsac
tion
s
XA State Table
![Page 76: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/76.jpg)
Busi
ness
Tra
nsac
tion
s
Table z@z : Superior state table – normal forward progression
I1 A1 B1 C1 D1 E1 E2 F1 F2receive ENROL/rsp-req A1receive ENROL/no-rsp-req B1receive RESIGN/rsp-req Y1 C1 C1 C1receive RESIGN/no-rsp-req Z Z Z Zreceive PREPARED Y1 E1 E1 E1 F1receive PREPARED/cancel Y1 E2 E2 E2 F1receive CONFIRMED/auto Q1 H1 H1 H1 F1receive CONFIRMED/response F2 F2receive CANCELLED Y1 Z Z J1 J1 K1receive HAZARD P1 P1 P1 P1 P1 P1 P3receive INF_STATE/active/y Y1 A1 B1 D1receive INF_STATE/active B1 D1receive INF_STATE/unknown Z Z Zsend ENROLLED B1send RESIGNED Zsend PREPARE D1 E1 E2send REQUEST_CONFIRMsend CONFIRM F1send CANCELsend CONTRADICTIONsend SUP_STATE/active/y B1send SUP_STATE/active B1send SUP_STATE/preparedin/y E1 E2send SUP_STATE/preparedin E1 E2send SUP_STATE/unknowndecide to request confirm S1 S1 S1decide to prepare D1decide to confirm F1 F1decide to cancel G1 G1 G1 Zremove persistent information Zrecord contradictiondisruption I Z Z Z Z Z Z Z F1disruption II D1 D1disruption III B1 B1disruption IV
State Table ( Auszug )
Table z@z : Superior state table – query after completion and completed states
Y1 Zreceive ENROL/rsp-req Y1receive ENROL/no-rsp-req Y1receive RESIGN/rsp-req Y1 Y1receive RESIGN/no-rsp-req Z Zreceive PREPARED Y1 Y1receive PREPARED/cancel Y1 Y1receive CONFIRMED/auto Q1 Q1receive CONFIRMED/response Z Zreceive CANCELLED Y1 Y1receive HAZARD P2 P2receive INF_STATE/active/y Y1 Y1receive INF_STATE/active Y1 Zreceive INF_STATE/unknown Z Zsend ENROLLED send RESIGNED send PREPARE send REQUEST_CONFIRM send CONFIRM send CANCEL send CONTRADICTION
Table z@z : Superior state table – cancellation and contradiction
G1 G2 G3 G4 H1 J1 K1 L1receive ENROL/rsp-req receive ENROL/no-rsp-req receive RESIGN/rsp-req G3 Z G3 receive RESIGN/no-rsp-req Z Z Z receive PREPARED G1 G2 receive PREPARED/cancel G1 G2 receive CONFIRMED/auto L1 L1 H1 L1receive CONFIRMED/response receive CANCELLED G4 Z G4 J1 K1 receive HAZARD P4 P4 receive INF_STATE/active/y G1 G2 receive INF_STATE/active G1 G2 receive INF_STATE/unknown Z Z Z Z send ENROLLED send RESIGNED send PREPARE send REQUEST_CONFIRM send CONFIRM send CANCEL G2 G2 Z Z send CONTRADICTION send SUP_STATE/active/y send SUP_STATE/active send SUP_STATE/preparedin/y send SUP_STATE/preparedin send SUP_STATE/unknown decide to request confirm decide to prepare decide to confirm F1 K1 decide to cancel L1 G4 remove persistent information record contradiction R1 R1disruption I Z Z Z Z Z Z F1 Zdisruption II G2 G2 E1 E1 G2disruption III D1 D1 disruption IV B1 B1
Table z@z : Superior state table – hazard and request confirm
P1 P2 P3 P4 Q1 R1 R2 S1receive ENROL/rsp-req receive ENROL/no-rsp-req receive RESIGN/rsp-req C1receive RESIGN/no-rsp-req Zreceive PREPARED S1receive PREPARED/cancel S1receive CONFIRMED/auto Q1 R1 R1 S1receive CONFIRMED/response Z R2 Zreceive CANCELLED R1 R1 Zreceive HAZARD P1 P2 P3 P4 R1 R1 Zreceive INF_STATE/active/y S1receive INF_STATE/active S1receive INF_STATE/unknown P1 P2 P4 R2 R2 Zsend ENROLLED send RESIGNED send PREPARE send REQUEST_CONFIRM S1send CONFIRM send CANCEL send CONTRADICTION R2 send SUP_STATE/active/y send SUP_STATE/active send SUP_STATE/preparedin/y send SUP_STATE/preparedin send SUP_STATE/unknown decide to request confirm decide to prepare decide to confirm decide to cancel remove persistent information Z record contradiction R1 R1 R1 R1 R1 disruption I Z Z Z Z Z R1 Zdisruption II D1 F1 G2 disruption III B1 disruption IV
![Page 77: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/77.jpg)
Busi
ness
Tra
nsac
tion
s
Java Binding
JSR 156XML Transactioning API for Java ‚JAXTX‘
Initiiert von HP ( Mark Little ), IBM, IONA,und Choreology.
Abstimmung über den Specification Request am 5.11.2001.
Erwartete Fertigstellung : Sommer 2002
![Page 78: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/78.jpg)
Busi
ness
Tra
nsac
tion
s
Related ... XAML Transaction Authority Markup Language
deprecated
ebXML High Level, Ebene Geschäftslogik. Nicht Fehlertolerant.
WSFL Skript-basierte Steuerung von Web Services. Nicht Transaktional.
![Page 79: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/79.jpg)
Busi
ness
Tra
nsac
tion
s
Agenda
Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung
![Page 80: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/80.jpg)
Busi
ness
Tra
nsac
tion
s
Zusammenfassung
Transaktionen sind ein entscheidender Baustein für das zuverlässige Durchführen von nicht-trivialen Prozessen.
BTP ist die Lösung für transaktionale Web Services.
Freiheit zur Komposition von Prozessen aus ACID- und nicht-ACID Teilnehmern
Die Geschäftslogik entscheidet über den Ausgang der Transaktion, nicht die starre Infrastruktur.
Die Spezifikation ist ( fast ) fertig, der Weg ist frei für Implementierungen.
![Page 81: Business Transactions](https://reader034.vdocuments.pub/reader034/viewer/2022052604/56813b46550346895da42409/html5/thumbnails/81.jpg)
Busi
ness
Tra
nsac
tion
s
Resourcen OASIS BTP:
http://www.oasis-open.org/committees/business-transactions OMG OTS Spec:
http://www.omg.org/technology/documents/formal/transaction_service JAXTX JSR 156:
http://www.jcp.org/jsr/detail/156.jsp HP XTS Software:
http://www.arjuna.com/xts/ Choreology :
http://www.choreology.com/~btp/ KLuP
http://www.klup.de