Ch12-1: Message Service System and Distributed Computing Notes
The Message System Paradigm
Definition and Overview - The Message System paradigm, also referred to as Message-Oriented Middleware (MOM), represents a sophisticated elaboration of the fundamental message-passing paradigm utilized in distributed computing. - In this paradigm, a specialized message system serves as a central intermediary among various separate and independent processes. - The system effectively acts as a "switch" for messages, enabling processes to communicate in an asynchronous and decoupled manner.
Operational Mechanism - Sender Action: A sender process deposits a message within the message system. Once the message is sent, the sender does not need to wait for a response; it is immediately free to move on to other computational tasks. - System Role: The message system takes responsibility for the message and forwards it to a specific message queue associated with each intended receiver. - Independence: Because of this middleware, the processes involved do not need to be active simultaneously or be directly connected to one another.
Message System Models
There are two primary subtypes of message system models used to facilitate communication:
Point-to-Point (PTP)
Publish-Subscribe (Pub/Sub)
The Point-To-Point Message Model
Core Concept: In the Point-to-Point model, the message system acts as a delivery agent that forwards a message from the sender directly to the message queue of a single specific receiver.
Comparison to Basic Message Passing: Unlike basic message-passing models, the middleware in the Point-to-Point model provides a dedicated message depository. This allows the sending and receiving actions to be fully decoupled.
Process Workflow: - The sender deposits a message into the message queue of the receiving process via the middleware. - The receiving process extracts messages from its dedicated queue at its own pace and handles each one accordingly.
Asynchronous Abstraction: This paradigm provides a significant abstraction for asynchronous operations, ensuring the sender is not blocked by the receiver's state or readiness.
The Publish/Subscribe Message Model
Topic-Based Communication: In this model, messages are not addressed to specific recipients but are instead associated with a specific topic or event.
Subscribing: Applications or processes that are interested in the occurrence of a specific event must "subscribe" to that event or topic within the message system.
Publishing: When a relevant event occurs or a topic is updated, a process "publishes" a message announcing the event.
Distribution Mechanism: The middleware message system identifies all current subscribers for that topic and distributes the message to every one of them.
Multicasting and Group Communication: This model offers a powerful abstraction for multicasting. The publish operation allows a single process to multicast to a group of processes, while the subscribe operation allows processes to listen for such multicasts.
Toolkits and Historical Context
History: The Message-Oriented Middleware (MOM) paradigm has a long-standing history in the field of distributed applications. Message Queue Services (MQS) have been in active use since the 1980s.
Industry Examples: - IBM MQ-Series: A prominent example of a message queue facility (formerly known as MQSeries). - Microsoft’s Message Queue (MSMQ): Microsoft’s implementation of the message system paradigm. - Java’s Message Service (JMS): A Java API that allows applications to create, send, receive, and read messages, supporting both PTP and Pub/Sub models.
Sources of Information and External Resources
IBM MQ-Series: Information can be found at http://www-4.ibm.com/software/ts/mqseries/
Sun’s JMS Tutorial: Comprehensive documentation available at http://java.sun.com/products/jms/tutorial/html/jmsTOC.fm.html
Microsoft’s Message Queue (MSMQ): Technical library resources available at http://msdn.microsoft.com/library/psdk/msmq/msmq