Introduction
What is mediation and why is it important?
Service-oriented architecture is fundamentally about integrating distributed systems. Those distributed systems communicate using messages. Typically these messaging systems can be thought of as e-mail for applications instead of people. This short technical tip will describe a few of those messaging options and explain how you can get a more flexible, reactive and manageable infrastructure by adding smart mediation to that messaging.
Mediation is simply the act of adding extra processing to those messages without disrupting the existing applications at each end. To give a really simple, but powerful example, look at Web caching proxies. These sit between a browser and the Web server and, without changes to the browser or server, can significantly speed up Web interactions. They do this by intercepting calls to the server and, if possible, responding with previously cached responses. A good example of a Web caching proxy is Squid.
Messaging styles
Being able to mediate messages requires that the mediation system knows the format and protocol of those messages. For example, the Web caching proxy relies on the messages using the HTTP protocol. Typically service-oriented architectures use on of the following messaging styles:
Cross-cutting mediations
There are an important class of mediations that do not rely on understanding the contents of the message. For example, the caching model does not rely on the cache understanding the Web page content – instead it relies on standard headers that indicate which pages can be cached and for how long. Another good example of a cross-cutting mediation is logging. It is simple to deploy a logger that logs each message, the time and destination.
Further examples of cross-cutting mediation include:
Service orientati
To continue reading for free, register below or login
To read more you must become a member of SearchSOA.com
');
// -->

on is an extension to message orientation
Message-based interactions have been around for a long time. What is the key differentiator between a message-based system and a service? Fundamentally it is about using open content as well as open protocols. For example, not only do SOAP systems use XML as a message content format, but there is also a model ( Web Services Description Language – WSDL) that allows you to associate XML Schemas to service messages. This is important for mediation, because now we can start to mediate based on message content as well.
Message-based mediations include:
A simple example of mediation
One of the key benefits of mediation can be summed up by the words "divide and conquer.". In other words, solve different problems in different places. Here is a simple example. Suppose you already have a simple XML/HTTPS message-based service, but your security team would like you to use the WS-Security protocol to add digital signatures. One option would be to take the existing XML/HTTP application and rewrite it or reconfigure it to run in an environment that supports SOAP and WS-Security.
Unfortunately this can be a time consuming activity. Mediation offers a simpler solution – add an intermediary that manages the WS-Security and SOAP processing and then passes the XML body to the existing application. This can dramatically reduce time, especially compared to rewriting existing working code. Systems that support this form of mediation include hardware appliances from Reactivity (acquired by Cisco Systems Inc.) and Datapower (acquired by IBM), and open source software solutions such as Apache Synapse.
About the author
Paul Fremantle is vice president of technical sales at WSO2, an open source SOA integrator. He also is co-chair of the OASIS WS-RX Technical Committee and a project leader for Apache Synapse.