Search This Blog

Friday, August 17, 2007

Stepping into Apache Synapse

Apache Synapse is a mediation framework for Web services, based on
the Apache Axis2 project, a set of XML, security, and Web services
related projects and standards. Synapse provides a lightweight service
bus and the basic infrastructure for the implementation of a Service
Oriented Architecture. In this article, you will learn the basic
architecture of Synapse and how to configure it. Synapse supports
most of the tasks of a service bus in a SOA. Synapse is inherently
extensible even though it is designed to support a large set of
useful functions out-of-the-box. The main functions of Synapse
can be divided into three major areas: (1) Connect: Connecting
systems. Synapse is designed to support connecting systems with
different transports with different protocols and Quality of
Service (QoS). The protocols/transports that Synapse currently
supports include SOAP/HTTP,SOAP/HTTPS, SOAP/JMS, SOAP/SMTP,
XML/HTTP, XML/JMS and many more. Synapse offers termination and
initiation of QoS tasks like Reliable Messaging and WS Security.
Synapse can route messages based on XPath expressions or Regular
expressions applied over the message header or content to an
endpoint reference. Virtualization is achieved by routing the
messages from virtual/logical URIs to real EPRs. (2) Manage:
Managing interactions. Synapse supports Failover and Load-balancing
to multiple endpoints. In the failover case, there are several sets
of endpoints grouped as a failover group. When a particular endpoint
fails to deliver the message, Synapse will try to deliver the message
to other endpoints in the group. During load-balancing, Synapse will
balance the load among the load-balancing endpoint group depending
on the algorithm provided for load-balancing. Synapse also lets you
trace the messages flowing in the enterprise by enabling tracing in
the mediation. Authorization and authentication tasks for an
organization can be delegated to Synapse through mediation, by using
WS Security. (3) Transform: Transforming messages. Synapse can be
used for message transformations through mediation with various
languages, including most of the scripting languages, with the Bean
Scripting Framework (BSF) and most importantly with XSLT. Apart from
that, Synapse offers protocol switching, for example -- SOAP to JMS
or XML/HTTP to SOAP. Mediation inside Synapse is designed with care,
and there are two possible types of mediations that can happen inside
Synapse. They are: (a) Message Mediation -- managing and transforming
the messages flowing between the client and a service in an enterprise,
and (b) Service Mediation -- Mediating messages coming into a specific
service by specifying the target URI as a Synapse mediation service.

No comments: