Transactions in an SOA World - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

Transactions in an SOA World

Description:

Managed vs. Un-Managed. Summary. Transactions in an SOA World ... An Un-Managed transaction is not managed by the transaction manager of the OpenEdge platform. ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 51
Provided by: PSC64
Category:

less

Transcript and Presenter's Notes

Title: Transactions in an SOA World


1
Transactions in an SOA World
Christian Stiller
Applied Architect
2
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

3
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
4
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

5
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

6
Host Based
Application
DO Transaction..
FOR EACH..
REPEAT..
DO ON ERROR..
Update or Read EXCLUSIVE-LOCK..
7
Host Based
Client-Server
Application
Client
8
Client-Server
n-Tier / Stateless
Client
DO Transaction..
DO ON ERROR..
REPEAT..
FOR EACH..
AppServer
Server
Update or Read EXCLUSIVE-LOCK..
9
n-Tier / Stateless
OERA
10
OERA Transactions
11
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

12
Definition Distributed Transaction
A distributed transaction is a single
transaction that updates two or more databases.
OpenEdge Data Management Database Admin
13
Distributed Transaction
Banking Application
Withdrawal
Deposit
X
14
Distributed Transaction 2 Phase Commit
  • Ensures transaction consistency across all
    databases
  • All commit or none
  • Commit in 2 Phases
  • Complete or Roll Back

15
Distributed Transaction (2PC)
Banking Application
Withdrawal
Deposit
16
Distributed Transaction Limbo Transaction
X
Banking Application
Withdrawal
Deposit
17
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

18
SOA Transactions
  • Functionality separated into Services
  • Application comprises many Services
  • Services as a separate platform
  • System Independent Entities

19
SOA Transaction Issues
  • Multiple services resulting in multiple endpoints
  • Loosely coupled systems
  • Maintaining Txns only possible in closely
    coupled systems
  • Services based on any platform
  • Resources cant be kept in a locked state
  • Alternate Recover methods

20
Whats 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

21
Possible Solutions
  • Compensation
  • Transaction Coordinator

22
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

23
Definition Compensation
Compensation is an action taken when something
goes wrong or when there is a change of plan.
IBM Systems Journal April 2002
24
Compensation
(5) Error/Exception thrown
(7) Call Compensation
(1) Calls
(3) Calls
Service 1
Service 2
Service 3
(6) Return error
(9) Return Failure
(2) Change DB
(4) Fails
(8) Apply Compensation
25
Compensation Issues
  • Asynchronous services
  • Where to store state details

26
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Conclusion

27
Definition Transaction Coordination
Orchestration of transactions through a
transaction manager or process coordinator.
SOA Systems Feb 2007
28
Coordination Service
Coordinator Service
(1) Call
(2) Call
(4) Return
(5) Call
(7) Return Fail
(11) Return Failure
(8) Call Compensation
(10) Return
Service 3
Service 1
Service 2
(3) Change DB
(6) Fails
(9) Apply Compensation
29
Coordination Advantages
  • Fixes Asynchronous issues of Compensation
  • Manages state service information
  • Central management of transaction compensation

30
Money Transfer
Log
Coordinator Service (generates transaction id and
maintains ACID properties)
(5) Call
(2) Call
(8) Return status
(12) Return status
(9) Call
(3) Return id
(1) request
Client
Initiation Service
Credit Service
Debit Service
(7) Return status
(4) Return id
(11) Return status
(10) Update DB
(6) Update DB
31
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

32
OpenEdge Reference Architecture
Data Sources
33
Definition Managed Transaction
A Managed Transaction is managed by the
transaction manager that is built into the
OpenEdge platform. A Managed Transaction can
only access Managed Data Sources
OERA Quick Reference Guide
34
Definition Un-Managed Transaction
An Un-Managed Transaction is a transaction that
updates information in an Un-Managed Data Source
or Enterprise Service. An Un-Managed transaction
is not managed by the transaction manager of the
OpenEdge platform.
OERA Quick Reference Guide
35
Managed or Un-Managed Transaction?
Managed
36
Managed or Un-Managed Transaction?
Managed
37
Managed or Un-Managed Transaction?
Un-Managed
38
Managed or Un-Managed Transaction?
Managed
39
Managed or Un-Managed Transaction?
Un-Managed
40
Enterprise Services
Un-Managed
41
Money Transfer
Log
Coordinator Service (generates transaction id and
maintains ACID properties)
(5) Call
(2) Call
(8) Return status
(12) Return status
(9) Call
(3) Return id
(1) request
Credit Service
Client
Initiation Service
Debit Service
(7) Return status
(4) Return id
(11) Return status
(10) Update DB
(6) Update DB
42
Money Transfer ESB
Log
Dynamic Process Launcher
Coordinator Service (generates transaction id and
maintains ACID properties)
(5) Call
(2) Call
(8) Return status
(12) Return status
(9) Call
(3) Return id
(1) request
Credit Service
Client
Initiation Service
Debit Service
(7) Return status
(4) Return id
(11) Return status
(10) Update DB
(6) Update DB
43
Money Transfer BPEL
Log
BPEL Service
Coordinator Service (generates transaction id and
maintains ACID properties)
(5) Call
(2) Call
(8) Return status
(12) Return status
(9) Call
(3) Return id
(1) request
Client
(4) Return id
(7) Return status
(11) Return status
(10) Update DB
(6) Update DB
44
BPEL Compensation Handler
Fault Handler
Process (Scope 1)
Compensation Handler S2
Scope 2 Snapshot of Scope 2
Compensation Handler S3
Scope 3 Snapshot of Scope 3
Time
45
Agenda
  • Definition
  • Through the ages
  • Distributed Database Transactions
  • SOA Transactions
  • Compensation
  • Coordinator
  • Managed vs. Un-Managed
  • Summary

46
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

47
For More Information, go to
  • PSDN
  • Service-oriented Architecture (SOA)
    (http//www.psdn.com/library/kbcategory.jspa?categ
    oryID55)
  • Forums http//www.psdn.com/library/forumindex.jspa
  • Web Sites
  • Sonic Software www.sonicsoftware.com

48
Questions?
49
Thank you foryour time
50
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com