Message Oriented Middleware
Message Oriented Middleware
All these models make it possible for one software component to affect the
behavior of another component over a network. They are different in that RPC-
and ORB-based middleware create systems of tightly-coupled components,
whereas MOM-based systems allow for a looser coupling of components. In an
RPC- or ORB-based system, when one procedure calls another, it must wait for the
called procedure to return before it can do anything else. In
these synchronous messaging models, the middleware functions partly as a super-
linker, locating the called procedure on a network and using network services to
pass function or method parameters to the procedure and then to return results.
Figure 1–3 shows the way a MOM system can enable communication between two
synchronous messaging systems (for example, two RPC-based systems). The left
side of the figure shows an application that distributes client, server, and data store
components on different networked nodes for improved performance. This is a
discount airline reservation system: an end user pays a fee to use this service,
which allows it to find the lowest available fare for given destinations and times.
The data store holds information about registered users and about airlines that
participate in this program. Based on the user’s request, logic on the server queries
participating airlines for prices, sorts through the information, and presents the
three lowest bids to the user. The right side of the picture shows an RPC-based
system that represents the ticket/reservation system for any one of the participating
airlines. The right side of the picture would be replicated for as many airlines as the
discounter is connected to. For each such airline, the data store would hold
information about available flights (seating, flight times, and prices). The server
component would update that information in response to data input by the end
user. The airline server also subscribes to the MOM service, accepting requests for
information from the discount reservation system and returning seating and pricing
information. If a customer decides to purchase a discounted ticket on a PanWorld
flight, the server component for that system would update the information in the
data store and then either generate a ticket for the requester or send a message to
the discounting service to generate the ticket.
Figure 1–3 Combining RPC and MOM Systems
This example illustrates some of the differences between RPC and MOM systems.
The difference in the way in which distributed components are coupled has already
been mentioned. Another difference is that while RPC systems are often used to
distribute and connect client and server components in which the client component
is directly accessed by an end-user, with MOM systems, client components are
often heterogeneous software systems that can only interoperate by means of
asynchronous messaging.
A more serious problem with MOM systems arises from the fact that MOMs are
implemented as proprietary products. What happens when your company, which
depends on SuperMOM-X acquires a company that uses SuperMOM-Y? To
resolve this problem, a standard messaging interface is needed. If both
SuperMOM-X and SuperMOM-Y implemented this interface, then applications
developed to run on one system could also run on the other. Such an interface
should be simple to learn but provide enough features to support sophisticated
messaging applications. The Java Message Service (JMS) specification, introduced
in 1998, aimed to do just that. The next section describes the basic features of JMS
and explains how the standard was developed to embrace common elements of
existing proprietary MOM products as well as to allow for differences and further
growth.
Previous: Preface