Inter Process Communication (IPC)

Inter Process Communication (IPC) allows processes running on different networked computers to send messages to each other.

Types of Communication #

  • Unicast: message is send to single process
  • Broadcast: message is send to all processes
  • Multicast: message send to group of $i$ ($1 < i < n$) processes

Message passing #

Provides send and receive operations

  • Blocking: the sender process is blocked until a response to the message is received

  • Non-blocking: sender is only delayed the time it copies the message to the buffer

  • Synchronous message passing: uses blocking, simpler than asynchronous, no buffering

  • Asynchronous message passing: at least one process uses non-blocking send/receive, more parallelism, more flexibility but more complex and needs buffering. Sender is still blocked when the buffer is full.

  • Connectionless: messages are transmitted as independent units

    • Higher performance but unreliable
    • Simpler
    • Example: UDP
  • Connection-oriented: reliable communication in both directions

    • No data loss, modification, duplicates
    • More complex
    • Example: TCP

Remote Procedure Call (RPC) #

Allows processes to call functions in other address spaces (on the same or) remote machines. Goal to achieve distribution transparency, but difficult in practise: due to parameter passing, failures and performance

RPC Failure Semantics #

Defines the behaviour of how often procedure is executed when failures occur:

  • Maybe: client sends request to server and server responds with result, does nothing special for handling communication or processes failures
  • At-least-once: client saves requests in memory and sends message periodically until a response is received
  • At-most-once: additionally, the server does duplicate detection and saves responses, sends response periodically until acknowledged is received from the client
  • Exactly-once: requests are saved to stable storage and save/unsave is atomic so sate can be recovered after crashes

Remote Method Invocation #

'related' distribution transparency