News for hackers. Stuff that matters.
Re:Actor system for the JVM developed by Electronic Arts by pdpi on Thursday April 28, 2022 @10:49AM (#31193150)
Objects, actors, and (micro-)services are basically the exact same concept at different scales.
Re:Actor system for the JVM developed by Electronic Arts by spinningslate on Thursday April 28, 2022 @11:52AM (#31194065)
To some approximation. The Actor Model formalism [0] requires certain properties, notably:

1. Communication solely by asynchronous message passing

2. A mailbox per actor that means the reception of messages and the processing of them is decoupled (i.e. an actor can receive new messages even when processing a previously-received message).

The OO model in general supports that paradigm. Pretty much all mainstream OO languages are synchronous by default though. Call a method and the caller is suspended until the method returns. Multiple clients can call methods on the same object concurrently, but doing that safely requires some form of locking/protection to be implemented in the target object. Stated alternatively: threads in mainstream OO languages run "across" objects, whereas each actor has its own thread in the Actor model.

There are certainly similarities - in the sense that both actors and objects encapsulate state, with reading/writing occurring through well-defined interfaces (messages and methods respectively). But the threading model is quite different - it's not just a matter of scale.

[0] https://en.wikipedia.org/wiki/Actor_model

EDIT: corrected grammar & formatting.

Re:Actor system for the JVM developed by Electronic Arts by usrusr on Thursday April 28, 2022 @05:20PM (#31198357)
Thanks for making me feel old by not including agents in the list. Those seem even more similar to actors. At least until someone mentions BDI, then it's suddenly an entirely different universe.