In this chapter, we will start with the essentials of Enterprise Service Bus. Given below is a detailed explanation about ESB along with its advantages, disadvantages and a couple of diagrams for easier understanding.
ESB stands for Enterprise Service Bus. ESB in its simplest form is a middleware which acts as an information highway aiding multiple applications to communicate.
In the enterprise world, we develop solutions for many things. These solutions may use different technologies and different data formats. It becomes cumbersome to use these solutions together due to compatibility variance of communication or data format in these technologies. Therefore we need a technology that will allow loosely coupled integration between these different solutions.
ESB aims to simplify this problem of integration by becoming a ‘HUB’ that sits in the middle of all your applications and facilitates message routing between them. ESB serves as a mediator, acting as information highway, taking care of data transformation routing, leaving the Coder or the Developer to focus on his own application logic.
Understanding ESB becomes very simple when we understand the problem for which it was especially designed and the solution becomes easy. One should have a clear understanding of how to enable many disparate systems, written in different languages and running on different machines using different data formats to share information and form an integrated business platform.
In the enterprise platform, it is common for multiple applications to collaborate and provide business functionality as a whole, but integration of these applications is the most recurring problem. It becomes even difficult with time as applications grow.
Each application may input and output data in their own format. This approach works well if the number of applications is less, but as the number of applications grows, the integration wheels also need to be churned with a better approach. For instance, if a particular application for a business needs to be changed, its output or input data format for all the applications having dependency on that Master application are affected.
Such an approach serves as the biggest hurdle for the Integration which expects a tightly coupled architecture. This is where ESB comes into the picture. Each application need not communicate directly with other application; instead, all the applications communicate with the ESB and the ESB handles the routing of information and internal data format conversion.
Following are a few points which explain why Enterprise Service Bus is essential.
ESB aims to simplify the problem of integration with variant compatible applications.
It acts as a Middleware, which serves as a mediator of all your applications and facilitates message routing between them.
Instead of every application interfacing with every other application directly, each application now just has one interface to the ESB.
The ESB is responsible for translating messages to/from a common format and routing them to their destinations.
The major saving in this approach comes as a boon if you have to replace any of your existing applications. Instead of writing a whole bunch of new interfaces, you now only have one interface to be concerned about (between your application and the ESB).
SOA and ESB are commonly used interchangeably, but they are completely different.
SOA is a design pattern which allows application to expose its functionalities as a service over network via communication protocols, whereas ESB is a model which facilitates communication between disparate systems, but ESB can be used as a backbone while implementing SOA.