38 Patterns: Implementing Self-Service in an SOA Environment
These aspects imply a need for middleware to support an SOA implementation.
Some of the functions that might be provided by the middleware are:
򐂰 Map service requests from one protocol and address to another
򐂰 Transform data formats
򐂰 Support a variety of security and transactional models between service
consumers and service providers and recognize that consumers and
providers might support or require different models
򐂰 Aggregate or disaggregate service requests and responses
򐂰 Support communication protocols between multiple platforms with
appropriate qualities of service
򐂰 Provide messaging capabilities such as message correlation and
publish/subscribe, to support different messaging models such as events and
asynchronous request/response
This middleware support is the role of an ESB.
3.2.2 Definition of an ESB
An ESB provides an infrastructure that removes any direct connection between
service consumers and providers. Consumers connect to the bus and not the
provider that actually implements the service. This type of connection further
decouples the consumer from the provider. A bus also implements further value
add capabilities. For example, security and delivery assurance can be
implemented centrally within the bus instead of having this buried within the
applications.
Integrating and managing services in the enterprise outside of the actual
implementation of the services in this way helps to increase the flexibility and
manageability of SOA.
The primary driver for an ESB, however, is that it increases decoupling between
service consumers and providers. Protocols such as Web services define a
standard way of describing the interface to a service provider that allow some
level of decoupling because the actual implementation details are hidden.
However, the protocols imply a direct connection between the consumer and
provider.
Although it is relatively straight forward to build a direct link between a consumer
and provider, these links can lead to an interaction pattern that consists of
building multiple point-to-point links that perform specific interactions. With a
large number of interfaces, this quickly leads to the build up of a complex
spaghetti of links with multiple security and transaction models. Routing control is
distributed throughout the infrastructure, and probably no consistent approach to
Chapter 3. SOA and the Enterprise Service Bus 39
logging, monitoring, or systems management is implemented. This environment
is difficult to manage or maintain and inhibits change.
A common approach to reducing this complexity is to introduce a centralized
point through which interactions are routed, as shown in Figure 3-4.
Figure 3-4 Direct connection and central hub integration styles
Direct Connection
Hub and Spoke
Service
Consumer
Service
Consumer
Service
Consumer
Service
Provider
Service
Provider
Service
Provider
Service
Consumer
Service
Consumer
Service
Consumer
Service
Provider
Service
Provider
Service
Provider
Hub:
ESB

Get Patterns: Implementing Self-Service in an SOA Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.