Databases Reference
In-Depth Information
In addition to the services shown in the diagram, we may have clients that are not
written to use the canonical address lookup. In this case, we need to provide a proxy
that transforms the native input request to/from the canonical form. This allows us
to be isolated from the requirements of the clients of the service. If a client requires
its own interface to the address lookup service, we can easily provide that through a
proxy without the need to impact the rest of the system, again reducing coupling.
An important optimization
The previous approach provides a very robust way of isolating service consumers
and service requestors from the native formats and locations of their partners.
However, there must be a concern about the overhead of all these additional proxy
services and also about the possibility of a client accessing a native service directly.
To avoid these problems, the Service Bus provides a local transport mechanism
that can be specified as part of the binding of the proxy service. The local transport
provides two things for us:
It makes services only consumable by other services in the Service Bus, they
cannot be accessed externally
It provides a highly optimized messaging transport between proxy
services, providing in-memory speed to avoid unnecessary overhead in
service hand-offs between proxy services
These optimizations mean that it is very efficient to use the canonical form, and so
the Service Bus not only allows us great flexibility in how we decouple our services
from each other, but it also provides a very efficient mechanism for us to implement
that decoupling. Note, though, that there is a cost involved in performing XSLT or
XQuery transformations. This cost may be viewed as the price of loose coupling.
Using the Mediator for virtualization
As discussed earlier, we can also use the Mediator for virtualization within an SCA
Assembly. The Mediator should be used to ensure that interface into and out of SCA
Assemblies use canonical form. We can also use XSL transforms in Mediator in a
similar fashion to Service Bus to provide mappings between one data format
and another.
To do this, we would select the canonical format WSDL as the input to our composite
and wire this to the Mediator in the same way as we did in Chapter 2 , Writing your
First Composite . We can then double-click on the Mediator to open it and add a
transformation to convert the messages to and from the canonical form.
 
Search WWH ::




Custom Search