Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between message-oriented protocols and stream-oriented protocols [closed]

I am trying to understand the difference between these two computer networking terminologies. I searched over the internet but coudn't get a good idea. Could anybody please explain me or give a link to a page that explains this? Thank you...

like image 313
bala1486 Avatar asked Jun 10 '10 19:06

bala1486


People also ask

What is the difference between message-oriented communication and 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.

What is stream oriented protocol?

Stream Versus Packet — TCP/IP is a stream-oriented protocol, while UDP is a packet-oriented protocol. This means that TCP/IP is considered to be a long stream of data that is transmitted from one end of the connection to the other end, and another long stream of data flowing in the opposite direction.

What is stream oriented communication?

Definition. Stream-oriented communication is a form of communication in which timing plays an important role. Stream-oriented communication is also referred to as continuous streams of data.

What does message-oriented mean?

1. Communication models framed in terms of the transfer of messages or information, or which reduce meaning to explicit content (see also transmission models; compare informational communication).


2 Answers

Message Oriented protocols send data in distinct chunks or groups. The receiver of data can determine where one message ends and another begins. Stream protocols send a continuous flow of data.

Here is an example with mobile phones. Text messages would be a message oriented protocol as each text message is distinct from the other messages. A phone call is stream oriented as there is a continuous flow of audio throughout the call.

Common protocols used on the internet are UDP (message oriented) and TCP (stream oriented). Wikipedia these terms for more information.

Hope this helps

like image 169
Dave Turvey Avatar answered Sep 22 '22 07:09

Dave Turvey


Stream protocols send data byte-by-byte. You can view it as pipe where all going in on one side gets transfered on other side. It is task of other side to determine when it has enough data to make any sense of it.

TCP is classic example of it. Once you send "Hello World" through pipe, there are no guaranties that it will come as such. It may come as each letter by itself, as two words or in one piece. Only thing that you know is that letters will be in same order.

Message protocols are usually built over streams but there is one layer in between which takes care to separate each logical part from another. It parses input stream for you and gives you result only when whole dataset arrives and not all states in between. In previous example, you would only expect whole "Hello World" message or nothing.

This is quite simplified view, but I think it explains biggest difference.

like image 38
Josip Medved Avatar answered Sep 24 '22 07:09

Josip Medved