Home > SOA Tips > Guest Commentary
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

GUEST COMMENTARY

Services messaging and mediation


Paul Fremantle
12.04.2007
Rating: -4.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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:

  • HTTP – a number of people use HTTP as a simple messaging format. For example, sending XML messages over HTTP is simple and usually easy to interoperate.
  • SOAP – SOAP is an XML messaging format that allows for many extensions, including Security and Reliable Messaging. SOAP is fundamentally designed to be an interoperable protocol, but some of the newer aspects can be complex to get working across different implementations.
  • JMS – JMS is not a messaging protocol, but instead a standard programming model in Java that supports different underlying messaging protocols. Usually those protocols are specific to the particular JMS implementation.
  • Traditional message queuing – for example, IBM WebSphere MQ/MQSeries™. These use proprietary protocols, but usually offer support for a wide variety of platforms and systems.

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:

  • Encrypting and decrypting messages
  • Monitoring
  • Redirection and routing
  • Message storage
  • Load-balancing and failover

Service orientation 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:

  • Content based routing – for example re-routing orders worth more than $100,000
  • Versioning
  • Transformation – for example using XSLT to re-order or transform XML messages
  • Converting between message styles – for example from CSV to XML

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.


Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Guest Commentary
Investing in SOA in a down economy
Best effort SOA and the SOA Quality Star
Contracts as an organizational approach to alignment
Service semiotics and the SOA illusion
On the road to Web services interoperability
The business analyst vs. the enterprise architect
The great SOA consultant squeeze
The best SOA pilots don't get the services right
The Buckaroo Banzai effect: location independence, service-oriented architecture, and the cloud
SOA principles drive content practices

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2001 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts