Monday, November 9, 2009

Mediator

Mediator is a new component(originally Oracle Service Bus before it was replaced by the AcquaLogic Bus)that has been added to Oracle SOA Suite 11g.

This article explains the difference between Mediator and OSB.
The "The Big BPEL-ESB-OSB cook-off" by ToddBiske analyses the role of each one.


What does the Mediator do?
  • It mediates components/services within an SOA Composite Application.
  • Routes the requests to the Services
  • Data Transformation between formats and protocols
  • It DOES NOT do service localisation and it cannot act as a Gateway to the Services.
How is it different from Oracle Service Bus?
  • The main difference is in the scope. Mediator performs intra-composite mediation while Oracle Service Bus performs inter-composite mediation which means that it mediates different composites together.
What should be done by a Mediator?
  • In Oracle, every BPELProcess is a Composite Service. This Composite could be invoking multiple BPEL Processes or Components. The Contract is defined at the Composite Service and the Mediator plays the role of mediation between this Contract and the various contracts for other components within the Composite. 
  • I think that it is a good practice to create a Mediator in all Composites even if the Composite has a single BPEL Process. The Mediator will help take care of additional operations that could be added to this Service in future.
  • I think that it is a good practice to do all data transformations at the Mediator.
  • Mediator can also perform routing of requests to different Services. But, I think that one should explore if this can be delegated to BPEL as its core stength is to orchestrate the services.
  • Anything that does not belong to a process has to be extracted out and put in the Mediator. For example, if the process needs the data in a certain format then that transformation can be done at the Mediator or the OSB but not in the BPEL.

No comments:

Post a Comment