Message Passing
Summary: A style of inter-process communication where data is sent as self-contained messages, rather than by sharing memory.
Sources: chapter4
Last updated: 2026-04-18
Message passing is a common alternative to shared-memory communication in distributed systems. It allows processes to be decoupled and can improve scalability and fault tolerance.
Implementation
- Actor Model: A programming model where logic is encapsulated in “actors” that communicate solely by sending and receiving messages (source: chapter4).
- Message Brokers: Intermediaries that store and distribute messages asynchronously between producers and consumers (source: chapter4).
- RPC (Remote Procedure Call): A model that attempts to make a remote network call look like a local function call, often using message passing behind the scenes (source: chapter4).
Benefits
- Decoupling: Senders and receivers don’t need to know about each other’s implementation details.
- Scalability: Message passing is well-suited for distributed systems because it doesn’t require sharing memory.
- Fault Tolerance: If a node fails, the system can often recover by re-sending or re-routing messages.