10 Enabling SOA Using WebSphere Messaging
1.3 Using an enterprise service bus
An enterprise service bus (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, as the actual implementation details
are hidden. However, the protocols imply a direct connection between the
consumer and provider.
Although it is relatively straightforward 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 (Figure 1-3) 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 logging, monitoring, or systems management is
implemented. This environment is difficult to manage or maintain and inhibits
change.
Figure 1-3 Direct connection integration style
Direct Connection
Service
Consumer
Service
Consumer
Service
Consumer
Service
Provider
Service
Provider
Service
Provider
Chapter 1. Introduction 11
A common approach to reduce this complexity is to introduce a centralized point
through which interactions are routed, as shown in Figure 1-4.
Figure 1-4 Central hub integration style
This hub and spoke architecture is a common approach that is used in
application integration architectures. In a hub, the distribution rules are separated
from applications. The applications connect to the hub and not directly to any
other application. This type of connection allows a single interaction from an
application to be distributed to multiple target applications without the consumer
being aware that multiple providers are involved in servicing the request. This
connection can reduce the proliferation of point-to-point connections.
Note that the benefit of reducing the number of connections only truly emerges if
the application interfaces and connections are genuinely reusable. For example,
consider the case where one application needs to send data to three other
applications. If this is implemented in a hub, the sending application must define
a link to the hub, and the hub must have links that are defined to the three
receiving applications, giving a total of four interfaces that need to be defined. If
the same scenario was implemented using multiple point-to-point links, the
sending application would need to define links to each of the three receiving
applications, giving a total of just three links. A hub only offers the benefit of
reduced links if another application also needs to send data to the receiving
applications and can make use of the same links as those that are already
defined for the first application. In this scenario, the new application only needs
to define a connection between itself and the hub, which can then send the data
correctly formatted to the receiving applications.
Hubs can be federated together to form what is logically a single entity that
provides a single point of control but is actually a collection of physically
distributed components. This is commonly termed a bus
. A bus provides a
Hub and Spoke
Service
Consumer
Service
Consumer
Service
Consumer
Service
Provider
Service
Provider
Service
Provider
Hub:
ESB

Get Enabling SOA Using WebSphere Messaging 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.