Freitag, 27. Januar 2012

BPEL and transactions - part 5 (last part)

About transaction standards and protocolls. Here is part 5 of "BPEL and transactions".

Transaction standards and protocols

The execution of distributed transactions poses new requirements to a transaction environment. Services have to be executed and managed in heterogenous systems.



Most transactions standards are based on the Distributed Transaction Coordinator Model.Those standards are distinguished from another by the length of the transaction. Some standards are suited for short-lived transactions, because during execution resources are blocked. Others are more suited for long transacton times.

Identification of a transaction by transaction context

The context of the transaction has to be managed during the existence of the transaction and also it must be broadcasted to all engaged systems.

The occurence of an error may not lead to inconsistencies in many different systems.


Transaction standard:  Web Service Atomic Transaktion (WS-AT)

With the adoption of WS-AT the ACID properties can be implemented over distributed services on different application servers. As resources are locked during execution, WS-AT is only suitable for short-living processes. The WS-AT standard is supported by different middleware manufacturers.


Web Service Atomic Transaktion (WS-AT) in Oracle SOA Suite

The Oracle Weblogic Server 11gR1 (10.3.3) and Oracle SOA Suite 11g R1 PS2 (11.1.1.3) support the WS-AT standard version 1.2. For being able to use WS-AT on a WLS, the domain must be configured for WS-AT. The start of the transactions has to be set through a property in the BPEL process and at the references WS-AT has to be activated. When calling external references the transaction participation has to be transfered.

Transaction participation

Never: the service executes in an own transaction
Supports: the service participates at the transaction
Mandatory: the service participates at the transaction. If there is no transaction available, an exceptio message/fault is thrown.


Other error options:

-system errors
-deadlocks
-protocol errors
-network errors
-hardware errors
-timeout

Error handling when the coordinator fails

Before the sending of the prepare message, all participants must be logged. The response message of all participants must also be logged. With the logs the coordinator can restart at the point of failure.

Error handling when a participant fails

All requests are logged, just like the response messages.With the logs the coordinator can restart at the point of failure.

Summary

With the adoption of WS-AT the ACID properties can be implemented over distributed services on different application servers. All participants must support the WS-AT standard. If possible distributed transactions should not be too complex. Frequently a transaction, which is distributed over different heterogenous systems and products is complex and error-prone. Local transactions should be use where it is possible.

Montag, 23. Januar 2012

BPEL and transactions - part 4

And here is part 4 of "BPEL and transactions". This time I write about BPEL and error detection in a transactional enviroment.

BPEL and error detection

To trigger a compensation action, every service has to return a fault in case of error. In case of synchronous services faults are returned by default. With asynchronous services no fault is returned. A "receive element" would wait forerver for the result of the service (endless loop).




Pick element

The pick element contains the two cases "on Message" and "on Alarm". It waits until the called asynchronous process returns a result ("on Message") or the maximum waiting time ("on Alarm") is reached and then executes the corresponding block.

Dienstag, 17. Januar 2012

T-Shape professionals

After visiting one of his presentations, I was just reading a book by Prof. Dr. Gunter Dueck with the title "Professionelle Intelligenz - Worauf es morgen ankommt". That translates roughly to "Professional Intelligence - What will be important tomorrow".

Especially the concept of T-Shape IT professionals appeals to me. For those of you who are not familiar with that, take a look at Wikipedia:
http://en.wikipedia.org/wiki/T-shaped_skills

The T-Shape professional has a mixture of skills. On the one hand he has very deep, maybe expert-level knowledge of one special area (the I in the T). On the other hand he is not only an expert in that field, but has a strong basic knowledge in other generell areas concerning his job (the - in the T). For example being a great JEE-Developer is sometimes not enough in the modern IT world. You may also have to have knowledge in more generel domains like busines processes, project management, team work, presentation techniques, sales and marketing or other social skills.

In this way T-Shape professionals become much more valuable for their company, because they are much more applicable. I think this is getting more and more important. Expecially being an IT consultant!

An interesting article about T-Shape in german language can be found here:
http://www.perspektive-mittelstand.de/T-Shaped-Professionals-Die-IT-Fachkraft-der-Zukunft/management-wissen/3775.html

Here is also an english article, which is a bit older.
http://fixcv.com/t-shaped-people-jobs-and-recruiting-4828.html

Montag, 16. Januar 2012

BPEL and transactions - part 3

About controlling transactions in the Oracle SOA Suite MEDIATOR component. Here is part 3 of "BPEL and transactions".

Control of transactions in Mediator

When the mediator component of Oracle SOA Suite is called from an external process, a new transaction will be created. If a parent transaction exists and mediator can use this, it will do so.





With sequential (syncronous) routing rules, all rules will be executed in one transaction. In case of error there will be a rollback of all routings. The fault policies of the mediator are NOT being executed.




In case of parallel routing rules, a new transaction is created for every new rule. In case of error a rollback will be executed. Here, the fault policies of the mediator are executed and can be used to react to errors.



First, sequential routing rules are executed in one transaction. After that every parallel rule is executed in its own transaction.

Freitag, 13. Januar 2012

SOA/BPM guidelines article

The german magazine "Computerwoche" published an interesting link to an article on SOA/BPM guidelines/code of practice:
http://soa-know-how.de/index.php?id=45

This article is in german language.

BPEL and transactions - part 2

Here is part 2 of "BPEL and transactions". This is about how to control transactions in BPEL. Have fun!

Control of transactions in BPEL

There 2 alternatives of executing a transaction in BPEL or a composite.
1. inherit the parent transaction, if one exists
2. execution in a new transaction

The control of the transaction is conducted by properties. Unfortunately exist different properties in Oracle SOA Suite 10g and 11g. The control of the transactions can be done by "breakpoint acitivities".
In Oracle SOA Suite 11g there are properties in the composite to control transactions. For "exposed services" and/or "external references" the property "Transaction Participation" can be set to "Never", "Supports", "Mandatory" or "WSDLDriven". In the bpel component the property "bpel.config.transaction" can be set to "requiresNew" or "required".




A syncronous invoke without transaction properties



A syncronous invoke with BPEL property "bpel.config.transaction" set to "required"



The local transaction is being completed by BPEL by a "breakpoint activity" or at the end of the flow (dehydration). Following "breakpoint activities" exist:
- Receive (unless it is the first receive and the flow is part of the parent transaction)
- OnMessage
- Wait (is being commited after some seconds)
- OnAlarm
- Invoke (if partner link is idempotent)
- End of flow (if process has its own transaction)
A syncronous invoke with partner link property "idempotent" set to false.


Montag, 9. Januar 2012

BPEL and transactions - part 1

Some time ago I held a presentation about "BPEL and transactions". I will take the important parts of that and publish it here. I split it into several parts. This ist part 1.

General considerations

A transaction is a logical unit consisting of one or many operations.
The 4 ACID properties of transactions are: Atomacy, Consistency, Isolation and Durability.
Usually, during the processing of a transactions some components of a systems are locked to avoid inconsistencies.



Try-Cancel-Confirm mechanism

One possible solution is the Try-Cancel-Confirm mechanism.
TRY: the call of reservation service
PENDING: the system reserves the resource for a specific time
CONFIRM: when all operations were succesfull, the reservation is being confirmed
CANCEL: if an error occured during execution, every change is being canceled
Disadvantage: The Locking of the resource (reservation) is only possible for a short amount of time
TRY, CONFIRM and CANCEL operations must be provided by the called service.

Solution in BPEL: Compensation

- methods to reverse the changes being done so far
- often  the execution of the inverse operation (or rollback) is not enough
- "logical UNDO" = method, which executes a functional, complete reversal/cancelation
- for example a cancelation of an order in a remote system, sending of an correction e-mail,...
- the reversal method must be provided by the service

Compensation pattern
To be continued...

Freitag, 6. Januar 2012

iPhone and SOA

My colleage Guido Neander did a presentation "How to stake iPhones into a SOA landscape" at the DOAG Conference last November. It's about sending events and messages (alerts) to an iPhone-App. The events and alerts are generated by a business process which is implemented with the Oracle SOA Components and the Oracle Database. The presentation is in german language. If you're interested in this presentation, please contact me: arne.platzen@mt-ag.com. If you're a DOAG-Member you can download it here: http://www.doag.org/formes/servlet/DocNavi?action=getFile&did=3049753&file=2011-K-SOA-Guido_Neander-Gewusst_wie__IPhone-Anbindung_in_SOA-Landschaften-Praesentation.pdf

What to expect here!

In this Blog I'm going to share my experiences of SOA and Integration projects with you, share interesting articles and documents, as well as post general stuff concerning modern IT. I hope some of you will follow me. Feel free to contact me: arne.platzen@mt-ag.com

Welcome!

Welcome.
My name is Arne Platzen. I work as an IT consultant for MT AG, Germany, for more than 5 years now, having 12+ years experience in the IT-Sector. Originally coming from deep Oracle-World of developing with PL/SQL, Oracle Forms, Oracle Reports and Oracle Designer, I moved on to discover new worlds and new civilisations, which means the Oracle Fusion stack. I developed Eclipse RCP Applications and Web Applications with the Oracle Application Development Framework (ADF).
After shifting more and more to integration projects, I started working with Oracle SOA Suite, OSB and the Weblogic Server. Currently, I am head of the Competence Center for Oracle SOA in my company and work as a consultant for SOA and integration, doing conceptional and architectural work in different projects.