Tuesday, October 19, 2010

Enterprise Service Bus

Enterprise Service Bus (ESB) is an architecture style that provides plumbing for heterogeneous systems (legacy, client-server, SOA, message-oriented middleware, MOM) in an enterprise to collaborate in order to carry out the business processes.

ESB decouples tiers within a system by brokering messages sent among the tiers. ESB controls flow of messages to command handlers and subscribers.

ESB utilizes the following primary constructs:
  • Messages/Events - ESB orchestrates routing of the messages to systems to support stateful and stateless business processes. ESB employs adapters to transform messages into a format suitable for the target system on the ESB
  • Standards-based messaging - Supports complex Message Exchange Patterns (MEPs) such as Web Services, Messaging Middleware, Intelligent routing, Request/Response communication, One-way event notification
  • Service Registry - Provides a common directory of all services provided by systems in the Enterprise. Service Registry provides another layer of indirection to where these Services are physically present. The participants in ESB access all services through the Service Registry and are agnostic to physical addresses of these services
ESB attempts to reduce strong coupling between systems by providing for abstractions over underlying Services, APIs and Messaging Systems. ESB ensures delivery of messages:
  • To the Right place (system)
  • At the right time (messages are delivered in correct sequence and within specified timeframes)
  • In the right format (ESB uses adapters to convert messages into appropriate formats for seamless consumption by target systems)
ESB goes beyond traditional Hub and Spoke architecture prevalent in Enterprise Application Integration (EAI) by supporting a distributed architecture for message routing and transformation. All systems communicate in the same way with the ESB. ESB transforms and routes the message to the target consumer per the configuration. ESB also provides mechanisms for monitoring messages as they are move through the enterprise.

Some of the services provided by ESB include:

  • Relay - Shuttles messages from one system to another (perhaps, off-premise) system through firewalls
  • Queue - Delivers messages to queues to be picked by the target system
  • Topic - Provides pub-sub services. Systems can subscribe to events published by other systems. ESB delivers the events to subscribers