Friday, March 16, 2001 10:03 AM
Basically RPC mechanism forces synchronization of the communicating process on the call message and the return message, That is why it is classified as a synchronous communication mechanism. Commonly used methods for exchanging information between two applications include peer-to-peer and Remote Procedure Calls (RPCs), CORBA, COM, and RMI. These methods have had their place in tightly coupled computing models; CORBA and COM both bind distributed objects tightly together. Tight coupling itself introduces further problems; for example, it is harder to make changes in one component without introducing side effects in others, and version change and version tracking become a headache. These methods also require information to be reduced to a block of data before the data is passed. And data blocks are by themselves not self-describing. Developers must embed descriptions of data structure and content in the code this means longer development times, extra lines of code, and large portions of code devoted to validating information contained in the data.
Distributed architectures also introduce problems for components that must communicate because components can fail in several ways by:
1. Going offline without warning
2. Terminating unexpectedly
3. Not responding to a request quickly enough
4. Messaging services, especially MOM and JMS, are designed to address these problems
MOM is preferred to other communications services, especially RPCs, for corporate intranet and web-based messaging.
1. MOM is primarily used to support deferred communication, whereas peer-to-peer and RPCs are used to support synchronous communication. With RPC, the receiver must be online. But with MOM, the sender can send messages to receivers (e.g., servers) that are down at the time the message is sent.
2. MOM decouples resources. It promotes building loosely coupled systems and thus helps developers build highly modular systems. Component reuse and reliability are increased in so far as a failure in one component is less likely to affect another.
3. MOM views messages as events rather than as method calls in case of RPCs. Clients can send and receive events (messages) via APIs that MOM provides. Applications or application components communicate with each other using MOM.