Message Oriented Communication (MOC) has been around for a while. You may have heard of it before and are considering using it on some of your applications or systems, but are still wondering about its benefits over the traditional method of exchanging information in distributed environments. In this blog post, I will address MOC, what it does and why you should use it.
What is Message Oriented Communication in Distributed System?
Message Oriented Communication in Distributed System is one of the most popular communications paradigm that allows us to achieve high performance, scalability, and fault tolerance simultaneously.
Message-oriented middleware (MOM) is software or hardware infrastructure supporting sending and receiving messages between distributed systems. MOM allows application modules to be distributed over heterogeneous platforms and reduces the complexity of developing applications that span multiple operating systems and network protocols.
Message Passing refers to the communication between processes, whereas message queues refer to a linked list of messages stored within the kernel. Messages are put into the queue by a message producer and retrieved from it by a consumer
A message queue is software-engineered for sending messages between processes, applications, and servers. It enables an asynchronous communication methodology. A message queue receives and sends messages between loosely coupled microservices, applications, sockets, and other endpoints.
The benefit of using a message queue is that the sender application does not need to wait for the receiver application to process the data. It can continue its work immediately, while the receiver pulls in the data later on.
Differentiate between Message oriented & Stream oriented communications
Message oriented communication | Stream oriented communication |
---|---|
Message oriented communication is the one in which the sender sends a message and the receiver will receive it. | Stream oriented communication is the one in which the sender sends a stream of data and the receiver receives a continuous flow of data till the sender stops sending data. |
UDP (user datagram protocol) uses manage oriented communication | TCP (transmission contact protocol) uses stream-oriented communication |
Data is sent by application in discrete packages called messages. | Data is sent with no particular structure. |
Communication is connectionless, data is sent without any setup. | Communication is oriented, and the connection is established before comm. |
It is unreliable best effort delivery without acknowledgment. | It is reliable, data is acknowledged. |
Retransmission is not performed. | Lost data is reframed automatically. |
Low overhead. | High overhead. |
No flow control. | Flow control using sent protocol like sliding |
Transmission speed is very high as compared to stream-oriented. | Transmission speed is lower as compared to message orientation. |
Suitable for applications like audio, and video where speed is more critical than the loss of messages. | Suitable for applications like e-mail systems where data must be persistent through delivered late. |
Related:
Categories: Computer Science