32
$\begingroup$

I'm trying to wrap my head around what the real differences between the Actor Model of concurrency and Communicating Sequential Processes (CSP) model of concurrency.

So far the best that I have been able to come up with is that the Actor Model allows the number and layout of nodes to change while CSP has a fixed structure of nodes.

$\endgroup$
3
  • 1
    $\begingroup$ See also The Actor Model at ~14:45 on Channel 9, where Carl Hewitt discusses the Actor Model in some depth. He notes a difference between actors and CSP is the use of channels for communication in CSP versus direct communication in the Actor Model. $\endgroup$
    – Whymarrh
    Jul 12, 2015 at 17:02
  • $\begingroup$ @Whymarrh Interestingly, the original CSP paper cs.cmu.edu/~crary/819-f09/Hoare78.pdf doesn't seem to make channels an integral part of the proposal. Processes are supposed to directly talk to each other by their names (though in a synchronous fashion). So I guess if the comparison is between current iterations of the idea, e.g. as seen in Golang or Clojure's core.async, then this is true, but Daniel's answer about the synchronous nature of the communication seems more accurate regarding the original CSP idea. $\endgroup$
    – xji
    May 13 at 21:27
  • $\begingroup$ Though the WP article en.wikipedia.org/wiki/Communicating_sequential_processes and a summary springer.com/computer/theoretical+computer+science/… does mention that it has evolved substantially since Hoare originally proposed it in 1978, so probably now it indeed always refers to implementations using channels. $\endgroup$
    – xji
    May 13 at 22:10

1 Answer 1

22
$\begingroup$

I believe one core difference is that in CSP, processes synchronize when messages are received (i.e. a message cannot be sent from one process unless another process is in a receiving mode), while the Actor model is inherently asynchronous (i.e. messages are immediately sent to other processes' address, irrespective of whether they're actively waiting on a message or not).

There should be another answer that is more well-developed, however.

$\endgroup$
10
  • 1
    $\begingroup$ That's pretty much the answer I would have written. In the original actor model (Hewitt, Agha), the receiving process did not even automatically provide access to the name of the sender, though more modern realisations (such as Scala's actors) do. The other difference is that actors enable the sending of actor ids in the messages, as hinted in the question, whereas this is not possible in CSP. (Also possible in the pi-calculus, but not in CCS.) $\endgroup$ Aug 17, 2010 at 18:30
  • 1
    $\begingroup$ So, basically, it's all about the mailbox? $\endgroup$ Sep 3, 2010 at 22:29
  • $\begingroup$ What about the differences listed here: en.wikipedia.org/wiki/… and en.wikipedia.org/wiki/… ? Another important difference, for earlier versions of CSP, is unbounded nondeterminism (see those links). $\endgroup$ Sep 9, 2010 at 3:24
  • 3
    $\begingroup$ I'm not sure if this the core difference, since CSP can have buffered channels allowing asynchronous message sending. Perhaps it's more about the process id, in CSP processes are anonymous, while actors are named. $\endgroup$ Aug 17, 2015 at 2:39
  • $\begingroup$ @CMCDragonkai It seems that in the original CSP paper, cs.cmu.edu/~crary/819-f09/Hoare78.pdf, explicitly addresses these two points: $\endgroup$
    – xji
    May 13 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.