Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw.

Ähnliche Präsentationen


Präsentation zum Thema: "Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw."—  Präsentation transkript:

1

2 Business Transactions

3 Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

4 Business Transactions 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.

5 Business Transactions Alles Neu ! Alles Besser ? Löst Port 80 alle Probleme ? Waren alle Probleme ungelöst ?

6 Business Transactions 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.

7 Business Transactions 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 ?

8 Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

9 Business Transactions 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.

10 Business Transactions Transaktionen 1. Generation Tx.begin(); UPDATE amount = amount + 100 FROM account WHERE id = 1000; UPDATE amount = amount - 100 FROM account WHERE id = 1001; Tx.commit();

11 Business Transactions 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 :

12 Business Transactions Phase1Phase1 Phase1Phase1 Verteilte Transaktionen (2) Der Coordinator befragt jede Resource nach ihrem Befinden : VoteReadOnly VoteCommit VoteRollBack

13 Business Transactions Phase2Phase2 Phase2Phase2 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.

14 Business Transactions 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.

15 Business Transactions Extended Transactions Die Konzepte für xTX sind lange Forschungsgegenstand. Einsetzbare Realisierungen von xTX werden entwickelt. OMG Activity Service Specification OASIS BTP ist eine wichtige Spezifikation.

16 Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

17 Business Transactions 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 !

18 Business Transactions 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 !

19 Business Transactions 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 !

20 Business Transactions 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.

21 Business Transactions Problem- / Lösungsbereiche PersistenzACID DB

22 Business Transactions Problem- / Lösungsbereiche Persistenz Verteilung ACID DB XA / OTS

23 Business Transactions Problem- / Lösungsbereiche Persistenz Verteilung Differenzierter Ausgang Multi- Protokoll Minimales Locking ACID DB XA / OTS BTP

24 Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

25 Business Transactions OASIS BTP Spec Business Transaction Protocol www.oasis-open.org/committees/business-transactions Kick Off : 13. 03. 2001 Termin 1.0 : Ende Dezember ?

26 Business Transactions OASIS 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.

27 Business Transactions 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...

28 Business Transactions 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.

29 Business Transactions 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.

30 Business Transactions 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.

31 Business Transactions Atom Example Atom Client Application Coordinator Credit Card Clearance Book Shop

32 Business Transactions Atom3 Coordinator Hierarchien Coordinator 1 Atom2Atom1 Atom5Atom4 Atom7Atom6

33 Business Transactions Atom3 Coordinator Hierarchien Coordinator 2 Coordinator 1 Atom2 Coordinator 3 Coordinator 4 Atom1 Atom5Atom4 Atom7Atom6

34 Business Transactions Atomare 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 Ausgang Unilateral confirm / cancel. Mehrfaches Prepare pro Atom ist zulässig. Rücksetzen der Time-Outs.

35 Business Transactions Composer = 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.

36 Business Transactions BTP Schichten Anwendung Cohesion Composer Atom Coordinator ACID Resource

37 Business Transactions Cohesion Cohesion Composer Client Application Atom 1Atom 2Atom N

38 Business Transactions Cohesion = Businesslogik Cohesion Composer Application Atom A 1 Atom A 2 Atom A N Confirm Cancel (A 1 =Cancel, A 2 =Cancel, A N =Cancel)

39 Business Transactions Atom3 Cohesion Hierarchien Cohesion 2 Cohesion 1 Atom2 Cohesion 3 Cohesion 4 Atom1 Atom5Atom4 Atom7Atom6

40 Business Transactions Atom Atom Demo: Organising a Night Out Application Message BTP Message Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server SOAP WebRestaurant Participant SOAP

41 Business Transactions Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Create Atom Atom IDCreate AtomAtom ID WebRestaurant Participant

42 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Book Taxi Enrol Book Taxi Enrol Application Message !

43 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Book Table WebRestaurant Participant Enrol Book Table

44 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Book Seats WebRestaurant Participant Enrol Book Seats

45 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Prepare

46 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Vote confirm

47 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Confirm

48 Business Transactions Oder…

49 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Prepare

50 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Vote confirm Vote cancel Vote confirm

51 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Cancel

52 Business Transactions Atom ID Atom Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Atom cancelled

53 Business Transactions 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 !

54 Business Transactions Atom 2 Cohesion Demo: Organising a Night Out Application Message BTP Message Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server SOAP WebRestaurant Participant SOAP Atom 1 Cohesion

55 Business Transactions Cohesion Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Create Cohesion Cohesion ID Create Cohesion Cohesion ID WebRestaurant Participant

56 Business Transactions Cohesion Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Create Atom, associate with Cohesion Atom 1 Create Atom, associate with Cohesion Atom 1 WebRestaurant Participant

57 Business Transactions Cohesion Atom 1 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Book Taxi Enrol (Atom 1) Book Taxi Enrol (Atom 1)

58 Business Transactions Atom 1 Cohesion Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Book Table WebRestaurant Participant Enrol (Atom 1) Book Table

59 Business Transactions Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Create Atom, associate with Cohesion Atom 2 Create Atom, associate with Cohesion Atom 2 WebRestaurant Participant Cohesion

60 Business Transactions Atom 2 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Book Seats WebRestaurant Participant Enrol (Atom 2) Book Seats Cohesion

61 Business Transactions Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Prepare WebRestaurant Participant Prepare Cohesion

62 Business Transactions Atom 1 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Prepare Cohesion

63 Business Transactions Atom 1 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Vote confirm Cohesion Vote confirm

64 Business Transactions Atom 2 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Prepare Cohesion

65 Business Transactions Atom 2 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Vote cancel Cohesion

66 Business Transactions Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Prepare Atom 1: confirm Atom 2: cancel WebRestaurant Participant Cohesion Prepare Atom 1: confirm Atom 2: cancel

67 Business Transactions Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server Confirm WebRestaurant Participant Cohesion Confirm

68 Business Transactions Atom 1 Cohesion Demo: Organising a Night Out Client Application SOAP server BTP Service SOAP server WebTaxi Participant WebTheatre Participant SOAP server WebRestaurant Participant Confirm Cohesion

69 Business Transactions Taxi Night Out Beispiel : Ergebnisse Atom 1 Cohesion Restaurant Theatre Atom 2

70 Business Transactions Ausgang der Transaktion CommitedRollbacked Klassisches 2 PC

71 Business Transactions Ausgang der Transaktion CommitedRollbacked Klassisches 2 PC BTP Outcome

72 Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

73 Business Transactions 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.

74 Business Transactions BTP Messaging :Prepare PREPARE...additional address information......hexstring... ? ?...address......hexstring... ? ?...hexstring... + ?...qualifiers...

75 Business Transactions BTP Messaging : SOAP soap-http-1 http://example.com/soaphandler btpengine 1001... ABC8329045 224352 5

76 Business Transactions BTP Messaging : SOAP soap-http-1 http://example.com/soaphandler btpengine 1001... ABC8329045 224352 5

77 Business Transactions XA State Table

78 Business Transactions State Table ( Auszug )

79 Business Transactions Java Binding JSR 156 XML 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

80 Business Transactions Related... XAML Transaction Authority Markup Language deprecated ebXML High Level, Ebene Geschäftslogik. Nicht Fehlertolerant. WSFL Skript-basierte Steuerung von Web Services. Nicht Transaktional.

81 Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw. Zusammenfassung

82 Business Transactions 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.

83 Business Transactions 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

84 Business Transactions Fragen...... jetzt......später : kuehne@klup.de


Herunterladen ppt "Business Transactions Agenda Einführung Grundlagen Transaktionen Zwei Welten: web services / ACID Business Transaction Protocol (BTP) SOAP, ebXML, usw."

Ähnliche Präsentationen


Google-Anzeigen