So message passing means how a message can be sent from one end to the other end. Either it may be a client-server model or it may be from one node to another node. The formal model for distributed message passing has two timing models one is synchronous and the other is asynchronous.
The fundamental points of message passing are:
- In message-passing systems, processors communicate with one another by sending and receiving messages over a communication channel. So how the arrangement should be done?
- The pattern of the connection provided by the channel is described by some topology systems.
- The collection of the channels are called a network.
- So by the definition of distributed systems, we know that they are geographically set of computers. So it is not possible for one computer to directly connect with some other node.
- So all channels in the Message-Passing Model are private.
- The sender decides what data has to be sent over the network. An example is, making a phone call.
- The data is only fully communicated after the destination worker decides to receive the data. Example when another person receives your call and starts to reply to you.
- There is no time barrier. It is in the hand of a receiver after how many rings he receives your call. He can make you wait forever by not picking up the call.
- For successful network communication, it needs active participation from both sides.
- Let us consider a network consisting of n nodes named p0, p1, p2……..pn-1 which are bidirectional point to point channels.
- Each node might not know who is at another end. So in this way, the topology would be arranged.
- Whenever the communication is established and whenever the message passing is started then only the processes know from where to where the message has to be sent.
Advantages of Message Passing Model :
- Easier to implement.
- Quite tolerant of high communication latencies.
- Easier to build massively parallel hardware.
- It is more tolerant of higher communication latencies.
- Message passing libraries are faster and give high performance.
Disadvantages of Message Passing Model :
- Programmer has to do everything.
- Connection setup takes time that’s why it is slower.
- Data transfer usually requires cooperative operations which can be difficult to achieve.
- It is difficult for programmers to develop portable applications using this model because message-passing implementations commonly comprise a library of subroutines that are embedded in source code. Here again, the programmer has to do everything on his own.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.