Enterprise Architectures such as Service Oriented Architecture (SOA) are conceptualized to solve problems of the enterprise domain and one of the most important is the issue of IT resources communicating with each other.
That brings the discussion to Enterprise Application Integration (EAI).
It provides the toolset and processes to allow the disparate and diverse applications to communicate with each other in order to achieve a business objective. SOA is one way of achieving EAI.
EAI provides for:
- Quality of Service: Authentication, Authorization, Store and Forward
- Message Translation
- Message Routing
- Usually implement the VETO Pattern that is:
- Validate: validate the message
- Enrich: add to the message header or payload with the results of the invocation of another service or database
- Transform: translate the input message to the format that the ultimate receiver understands
- Operate: invoke the receiver.
EAI is usually implemented either as a Hub and Spoke Architecture or as a Messaging Bus.
Hub and Spoke:
As the name suggests, utilizes spokes (adapters) that connect to a centralized hub that is responsible of providing the functionality mentioned in the earlier section. A consumer would connect via an adapter (spoke) to an hub (the integration engine) and the hub after embellishing the message invokes the providing spoke. The consumer spoke connects and translates the input message to the hub format. The hub provides the services mentioned above and passes on the message to the subscriber spoke that translates and routes the message to the destination application.
The spokes could be collocated with the hub or could be part of the consumers or providers.
- Easy to manage if there is a singular hub and the spokes are collocated with the hub.
- Application (consumers and publishers) are loosely coupled with each other through the use of the hub.
- Although the hub is centralized, they can be federated or a load balancer can be used to front multiple hubs to provide for scalability and fault tolerance.
The bus architecture is similar to Hub and Spoke with respect to the adapters but:
- Use Messaging
- The core components of the Integration Engine (the hub in the previous case) are themselves separately deployed in different containers. This includes components for authentication, authorization, etc.
It can be defined as the process of identifying and exposing software artifacts on the network as well defined services. These software artifacts could perform a business objective or any other useful purpose. A service can be a consumer as well as a provider to other services.
Enterprise Service Bus (ESB) is an implementation of SOA.
ESB is similar to the messaging bus – the difference being that standards are in place. Standards such as SOAP and HTTP for message format and transport, WSDL to describe services, UDDI to look up services etc.
Advantages of SOA:
- Integration – ease in integration since standards are in place and specialized adapters might not have to be constructed.
- Agility – following from the previous point, a business can have a faster turnaround if adapters do not have to be written
- Reuse and ROI – reuse through the use of open environment and loose coupling.