There are two fundamental models of interprocess communication:
(1) shared memory: singal, semaphore, monitor, memory-mapped file.
(2) message passing: socket(the primitive way, Direct or communications), pipe(Indirect communications), MSMQ, RPC (COM, DCOM, .Net Remoting, WCF, CORBA, Java RMI, etc., are just RPC systems)
So far we have discussed two different types of interprocess communication: semaphores and monitors. These methods work well on computers with shared memory, but they are not effective on distributed systems. Semaphores and monitors provide no machine to machine communication capability. The last method we will discuss,Message passing, solves this problem. Two primitives, SEND and RECEIVE are used in the message passing scheme. The SEND primitive sends a message to a destination process while the RECEIVE primitive receives a message from a specified source process. Message Passing works on distributed systems because these messages can be sent from machine to machine through a network.
For message passing,
- Exchange messages over a communication link
- Methods for implementing the communication link and primitives (send/receive):
- Direct or Indirect communications (Naming)
- Symmetric or Asymmetric communications
- Automatic or Explicit buffering
- Send-by-copy or send-by-reference
- fixed or variable sized messages