Message Passing vs. Remote Procedure Call

This article focusses on how and when Message Passing better than Remote Procedure Call and vice-versa

Message Passing and RPC are two major used methods of computer communication. RPC is built on top of MP. MP, on one hand, provides a non-reliable, asynchronous method of communication, RPC, on the other hand, provides reliable and synchronous communication. The arguments between MP and RPC are going to be very similar to the arguments between UDP and TCP. Since, RPC is a layer on top of MP; End-to-End argument applies here. RPC fits better in a client server model while MP fits better in a peer-to-peer/Ad-hoc model of communication.

Message passing RPC
  1. More complication at the programmer.s end but OS is simple
  2. Programmer needs to do explicit marshalling/de-marshalling of the data being sent across
  3. with MP we can achieve good concurrency
  4. less synchronous, hence ideal for application where synchrony is not a required feature
  5. multicast is possible
  6. No dynamic resource discovery (early binding), (though a service like DNS can be used)
  1. More complication at the OS level and programmer.s life is easier
  2. For programmer, it is almost like a local call.
  3. Very less concurrency (threading required to achieve the concurrency, if needed)
  4. Totally synchronous
  5. Multicast will be tedious to achieve. (again looping or threading would be required to achieve the multicast, if needed)
  6. Resource discovery mechanisms are provided (late binding)

Alternative steps a programmer needs to take while using MP:

How does RPC provides these things:

To sum it up, RPC does provide extra functionalities but if they are not required in a certain scenario, these extra functionalities would end up creating lot delays and performance overheads, and hence MP would be a better option. But if you need to pass around complicated data structures and the scenario requires lot of synchronous communications among servers, then RPC would be a preferred choice.

References:
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees