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

Post on 18-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

© 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

SOA-33: Transactions in an SOA World

(Practical Examples)

Mike OrmerodApplied Architect

© 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

© 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

© 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

© 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

© 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

© 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

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

Possible Solutions

1. Compensation

2. Transaction Coordinator

© 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

© 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

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

Compensation Issues

Asynchronous services Where to store state details

© 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

© 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

© 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

© 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

© 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

© 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

© 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

© 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

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

Questions?

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

Thank You

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

top related