© 2008 progress software corporation1 soa-33: transactions in a soa world what happens next? flight...

23
© 2008 Progress Software Corporatio SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change DB (5) Calls (6) Fails Clie nt (1) Calls (4) Change DB

Upload: leslie-barrett

Post on 18-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World

What happens next?

Flight Booking

Hotel Booking

Car Booking

(3) Calls

(2) Change DB

(5) Calls

(6) Fails

Client

(1) Calls

(4) Change DB

Page 2: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

SOA-33: Transactions in an SOA World

(Practical Examples)

Mike OrmerodApplied Architect

Page 3: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation3 SOA-33: Transactions in a SOA World

Definition : Transaction

“A transaction is a set of related changes to the database that the database either

completes in its entirety or discards, leaving no modification to the database.”

OpenEdge® Development: ABL Handbook

Page 4: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation4 SOA-33: Transactions in a SOA World

ACID Properties

Atomic – All or nothing Consistent – Start & End in a Consistent state Isolated – transactions appear isolated from

all other operations Durable – once notified, the transaction will

persist

Page 5: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation5 SOA-33: Transactions in a SOA World

Definition : Distributed Transaction

“A distributed transaction is a single transaction that updates two or more

databases.”

OpenEdge Data Management: Database Admin

Page 6: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation6 SOA-33: Transactions in a SOA World

SOA Transactions

Functionality separated into Services• Application comprises many Services

Services as a separate platform System Independent Entities

Page 7: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation7 SOA-33: Transactions in a SOA World

SOA Transaction Issues

Multiple services resulting in multiple endpoints

Loosely coupled systems• Maintaining Txn’s only possible in closely

coupled systems Services based on any platform Resources can’t be kept in a locked state Alternate Recover methods

ARCH-13: Transactions in an SOA World

Page 8: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation8 SOA-33: Transactions in a SOA World

What’s needed

Uniquely identify transaction across services Guarantee that data is delivered and

notifications sent Some form of compensation for when it goes

wrong Handle errors in asynchronous services

Page 9: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation9 SOA-33: Transactions in a SOA World

Possible Solutions

1. Compensation

2. Transaction Coordinator

Page 10: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation10 SOA-33: Transactions in a SOA World

Definition : Compensation

“Compensation is an action taken when something goes wrong or when there is a

change of plan.”

IBM Systems Journal– April 2002

Page 11: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation11 SOA-33: Transactions in a SOA World

Compensation

Flight Booking

Hotel Booking

Car Booking

(3) Calls

(2) Change DB

(5) Calls

(6) Fails

(7) Error/Exception

thrown

(8) Return error

(9) Call Compensation

(10) Apply

Compensation

(14) Return Failure

Client

(1) Calls

(4) Change DB

(11) Return Error

(12) Call Compensation

(10) Apply

Compensation

Page 12: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation12 SOA-33: Transactions in a SOA World

Compensation Issues

Asynchronous services Where to store state details

Page 13: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation13 SOA-33: Transactions in a SOA World

Definition : Transaction Coordination

“Orchestration of transactions through a transaction manager or process

coordinator.”

SOA Systems – Feb 2007

Page 14: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation14 SOA-33: Transactions in a SOA World

Coordination Advantages

Fixes Asynchronous issues of Compensation Manages state & service information Central management of transaction &

compensation

Page 15: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation15 SOA-33: Transactions in a SOA World

Coordination Service

Service 1 Service 2 Service 3

Coordinator Service

(2) Call

(5) Call

(6) Change DB

(7) Return (8) Call

(9) Fails

(10) Return

Fail(11) Call

Compensation

(12) Apply

Compensation

(13) Return(16) Return

Client

(1) Call

(3) Change DB(15) Apply

Compensation

(4) Return

(14) Call

Compensation

(17) Return

Fail

Page 16: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation16 SOA-33: Transactions in a SOA World

OpenEdge Reference Architecture

PresentationPresentation

Business ComponentsBusiness Components

Data AccessData Access

Data SourcesData Sources

Co

mm

on

Infrastru

cture

Co

mm

on

Infrastru

cture

Enterprise ServicesEnterprise Services

Page 17: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation17 SOA-33: Transactions in a SOA World

Vacation Booking - ABL

Flight Booking

Hotel Booking

Car Booking

Coordinator Service

(2) Call

(5) Call

(6) Change DB

(7) Return (8) Call

(9) Fails

(10) Return

Fail(11) Call

Compensation

(12) Apply

Compensation

(13) Return(16) Return

Client

(1) Call

(3) Change DB(15) Apply

Compensation

(4) Return

(14) Call

Compensation

(17) Return

Fail

Business ComponentsBusiness Components

Data AccessData Access

Business ComponentsBusiness Components

Data AccessData Access

Business ComponentsBusiness Components

Data AccessData Access

Business WorkflowBusiness Workflow

Page 18: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation18 SOA-33: Transactions in a SOA World

Vacation Booking - ESB

Service 1 Service 2 Service 3

Coordinator Service

(2) Call

(5) Call

(6) Change DB

(7) Return (8) Call

(9) Fails

(10) Return

Fail(11) Call

Compensation

(12) Apply

Compensation

(13) Return(16) Return

Client

(1) Call

(3) Change DB(15) Apply

Compensation

(4) Return

(14) Call

Compensation

(17) Return

Fail

Enterprise Service BusEnterprise Service Bus

Page 19: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation19 SOA-33: Transactions in a SOA World

Vacation Booking - BPEL

Service 1 Service 2 Service 3

Coordinator Service

(2) Call

(5) Call

(6) Change DB

(7) Return (8) Call

(9) Fails

(10) Return

Fail(11) Call

Compensation

(12) Apply

Compensation

(13) Return(16) Return

Client

(1) Call

(3) Change DB(15) Apply

Compensation

(4) Return

(14) Call

Compensation

(17) Return

Fail

Enterprise Service BusEnterprise Service Bus BPEL Service

Page 20: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation20 SOA-33: Transactions in a SOA World

In Summary

ACID is good, taken in short doses! Plan, Design & Architect for target

implementation Choose the appropriate transaction model for

you Consider ESB & BPEL

Page 21: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation21 SOA-33: Transactions in a SOA World

Questions?

Page 22: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation22 SOA-33: Transactions in a SOA World

Thank You

Page 23: © 2008 Progress Software Corporation1 SOA-33: Transactions in a SOA World What happens next? Flight Booking Hotel Booking Car Booking (3) Calls (2) Change

© 2008 Progress Software Corporation23 SOA-33: Transactions in a SOA World