Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2023 14:31
What would you like to do?
Rebuttal of "Message passing to shared stateful objects/actors/processes is still a form of shared state."

Message passing to shared stateful objects/actors/processes is still a form of shared state. You cannot "replace shared state with message passing".


My understanding is that this is a profound misunderstanding of the actor model.

My understanding is that the actor model involves zero shared state. (That is, zero shared state between actors. An actor may or may not also not share state temporarily within itself (where itself is its current behavior), or temporally, between incarnations of itself (cf "Sussman and Steele ... concluded Actors were essentially closures that never return but instead invoke a continuation" from The History of Scheme" paper).)

The closest I currently see to anything that could be thought of as "state", but is not if you think about it, is an "address" that is rationally presumed to be the "mailbox" of some actor, or a "message" that is rationally presumed to encode some information. In reality neither is "state" but is instead just some integer among the infinite range of possible integers that is presumed by the sender to encode some information. An integer that is supposedly an "address" that corresponds to a "mailbox" may not actually be so. (And even if it does , the "mailbox" may be non-operational. And even if it is working, there may be no associated actor reading from it, eg it may have died.) Similarly a message may be rationally presumed to have some meaning according to the sender, and that sender may rationally presume it will be decoded by the recipient accordingly, but in reality there's no guarantee it will ever be received, nor any constraint on how it will be interpreted, let alone any guarantee it will result in the behavior the sender rationally "hopes" will occur.

Nothing is shared, just information flowing from one point to another, with rational hopes that some "computational" things will happen, and that those things in turn follow some rational rules, but the whole point of the Actor model is that this is as far as you can realistically go if you are considering physically implemented concurrently communicating computational processes in the general case, and that it isn't safe to not go that far because, as Joe Armstrong, Sir Tony Hoare, and Carl Hewitt vigorously agreed, "the test for capturing the essence of concurrency is that you can use the same language for design of hardware and software because the interface between those will become fluid and we've got to have a hierarchical design philosophy in which you can program each individual ten nanoseconds at the same time as you program over a 10 year time scale, and sequentiality and concurrency enter at both those scales so bridging the scale of of granularity and of time and space is what every application has to do".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment