Integration patterns can help fill the wide gap between the high-level vision of integration and the actual system implementation. The following describes different integration patterns.
Integration Styles
1. File transfer: Each application produce files that contain the information the other applications must consume. Integrators take the responsibility of transforming files into different formats. Produce the files at regular intervals according to the nature of business.
2. Shared Database: Integrate applications by having them store their data in a single shared database and define the schema of the database to handle all the needs of the different applications.
3. Remote Procedure Invocation: Develop each application as a large-scale object or component with encapsulated data. Provide an interface to allow other applications to interact with the running application.
4. Messaging: Use messaging to transfer packets of data frequently, immediately, reliably and asynchronously using customizable formats.
Messaging Systems and Messaging Patterns
Messaging makes applications loosely coupled by communicating asynchronously which also makes the communication more reliable because the two applications do not have to be running at the same time. Messaging makes the messaging system responsible for transferring data from one application to another so the applications can focus on what data they need to share as opposed to how to share it.
Messaging applications transmit data through different messaging systems such as Channels, Messages, Pipes and Filters, Routing, Transformation, Endpoints. The messaging systems provide a set of connections that enables the applications to communicate by transmitting information in predetermined, predictable ways.
Most widely used messaging patterns
Publish-Subscribe: When an event is published into the channel, the copy of the message is delivered to each of the output channels. Each output of the channel has only one subscriber which is allowed to consume a message only once. Using JMS, a public-subscribe channel implements the Topic interface. The sender uses a TopicPublisher to send messages, each receiver uses its own TopicSubscriber to receive messages.
Point-to-Point: Only one receiver consumes any given message. The channel can have multiple receivers that can consume multiple messages concurrently, but only one of them can successfully consume a particular message.
Using JMS, a point-to-point channel implements the Queue interface. The sender uses a QueueSender to send messages, each receiver uses its own QueueReceiver to receive messages.