Actor vs. CSP: Message Passing & State Philosophy

The Actor Model champions isolated state and asynchronous message passing via private mailboxes, where actors never directly access each other's data. In contrast, CSP emphasizes explicit channels for communication, often synchronously, with processes blocking until messages are sent or received, focusing on coordinated interaction.

The top 3

  1. Actor vs. CSP: Asynchronous vs. Synchronous Messaging: The Actor Model primarily uses asynchronous message passing via mailboxes, where senders do not block, contrasting with CSP's synchronous channels that require both sender and receiver to be ready for communication.
  2. State Philosophy: Encapsulation vs. Channel Transfer: The Actor Model emphasizes strict encapsulation of mutable state within each actor, accessible only through messages, whereas CSP processes manage their own state and explicitly transfer data between them via channels, promoting 'sharing memory by communicating.'
  3. Fault Tolerance: Actor Supervision vs. CSP Explicit Handling: Actor systems achieve fault tolerance through supervisor hierarchies, allowing parent actors to monitor and restart failing child actors; CSP models typically require explicit error propagation and handling within communicating processes via channels.

Sources

Open the full topic