Real-Time Integration - Part 1 - The Adapter Layer Message Adapters
CMiC RTI is built on the concept of Message Adapters which naturally fall into two types: Receive Adapters and Transmit Adapters. Adapters are optional components that can be plugged in to any system.
Optional means that they are not required in order to operate CMiC software, and therefore can be separately licensed. Each adapter supports a specific communications protocol, a specific messaging style, and is targeted to a specific type of system (i.e. “speaks a specific dialect” or “conforms to a particular API”).
In summary, adapters facilitate the building of a messaging interface between two disconnected systems.
Receive Adapters
A receive adapter in CMiC software receives messages from a separate external system. The external system could be, but is not necessarily, a separate installation of CMiC software.
A minimum of one receive adapter is necessary in order to perform messaging. With a single receive adapter, CMiC software can perform inter-system messaging functions with any external system software that encodes and decodes messages according to the receive adapter API. In other words, receive adapters allow external systems to talk to a CMiC software installation.
In most cases, transmission adapters will also be required. The only time a transmission adapter would not be required is when the interface only sends data in one direction (i.e. data only flows into CMiC software). In any bi-directional data interface, a receiver and a transmit adapter are required.
Example 1:
The receipt of purchase order records into CMiC from an external ERP or legacy system. In this case, only a receive adapter is required.
Example 2:
The requirement to send and receive data from an external system operating third-party software. In this case, transmit and receive adapters are required.
Example 3:
The requirement to send and receive data between two separate CMiC software installations. In this case, transmit and receive adapters are required.
Transmission adapters, although built generically, must be written to conform to the needs (i.e. the API) of the external system. Transmit adapters allow a CMiC system to talk to a specific external system, using its dialect.
Http-Receive Adapter for CMiC Software
Each adapter supports a specific protocol, uses a particular messaging style, and is targeted to a specific system.
The Protocol
In the initial release, the Receive adapter for CMiC software will support the http protocol with additional protocols to be added as necessary.
Messaging Style
There are two styles of web service messaging in popular use today. One is the WSDL/SOAP/XML-RPC style; the other is the simpler REST style. CMiC is providing an Http-Receive Adapter for CMiC software that is REST-oriented.
The System
By definition, every receive adapter we create will be receiving messages sent to a CMiC system.
Transmit Adapters
As mentioned above, in most cases we need one or more transmit adapters, each one tuned to the needs of a particular external system.
Http-Transmit Adapter for CMiC Software
The protocol and messaging style implemented by a transmission adapter are determined by the external system that it transmits messages to.
The Protocol and Messaging Style
Like the Http-Receive Adapter for CMiC software, it will also use the http protocol and will follow a REST-oriented messaging style. The requirements on the receiver side determine how the transmit adapter is built.
Adapters are Java Servlets
Each CMiC adapter is implemented as a java servlet running in a standard J2EE container.
So who needs Adapters anyway?
The rationale for implementing a single receive adapter is easy to explain.
Messages from external systems are by definition triggered by events that occur outside of CMiC. A method to efficiently, reliably, and securely receive those messages is required. While in theory, many different hooks could be developed to receive messages, allowing each program to deal directly with the specific messages that it handles, it is much more efficient to develop one receive adapter for the entire system. All the algorithmic complexity of receiving and decoding messages, and returning responses to those messages, is isolated in one receiver program. The incoming data is always passed into CMiC in a standard way, and is available to whatever programs need to access it.