Mulesoft = ( ESB + API Management)
ESB stands for Enterprise Service Bus which is basically a middleware tool for integrating various applications together over a bus-like infrastructure. Fundamentally, it is an architecture designed to provide a uniform means of moving work among integrated applications. In this way, with the help of ESB architecture we can connect different applications through a communication bus and enable them to communicate without depending on one another.
Implementing ESB
The main focus of ESB architecture is to decouple the systems from each other and allow them to communicate in a steady and controllable way. ESB’s implementation can be done with the help of ‘Bus’ and ‘Adapter’ in the following way −
The concept of “bus”, which is achieved through a messaging server like JMS or AMQP, is used to decouple different applications from one another.
The concept of “adapter”, responsible for communicating with backend application and transforming data from application format to bus format, is used between applications and bus.
The data or message passing from one application to another through the bus is in a canonical format which means there would be one consistent message format.
The adapter can also perform other activities like security, monitoring, error handling and message routing management.
ESB’s Guiding Principles
We can call these principles as core integration principles. They are as follows −
Orchestration − Integration of two or more services to achieve synchronization between data and process.
Transformation − Transforming data from canonical format to application specific format.
Transportation − Handling protocol negotiation between formats like FTP, HTTP, JMS, etc.
Mediation − Providing multiple interfaces to support multiple versions of a service.
Non-functional consistency − Providing mechanism for managing transactions and security also.
Need of ESB
ESB architecture enables us to integrate different applications where each application can communicate through it. Following are some guidelines on when to use ESB −
Integrating two or more applications − Use of ESB architecture is beneficial when there is a need to integrate two or more services or applications.
Integration of more applications in future − Suppose if we want to add more services or applications in future, then it can be easily done with the help of ESB architecture.
Using multiple protocols − In case if we need to use multiple protocols like HTTP, FTP, JMS etc., ESB is the right option.
Message routing − We can use ESB in case if we require message routing based on message content and other similar parameters.
Composition and consumption − ESB can be used if we need to publish services for composition and consumption.