News for hackers. Stuff that matters.
Re:Actor system for the JVM developed by Electronic Arts by toast0 on Thursday April 28, 2022 @07:00PM (#31199297)
> Also, there's strange stuff like naming processes for service discovery, and iirc something is wrong with the way that Erlang does selective receives that disqualifies it from being an actor system, and ultimately more modern Erlang things like ets tables and sharing memory with nifs.

Ets tables are observationally equivalent to an Erlang process per table and sending it a message for each function call. It's not actually implemented that way, but I don't think that is grounds to disqualify it. I don't remember enough details about the naming process, but I think that might be similar; you could send a message to a naming process to set and lookup the names (although you'd have a bit of trouble finding out what the process id of the naming process is, wouldn't you?), it's just not very pragmatic.

Nifs certainly have the potential to break the model of course. I'd think selective receive should be fine too, it's equivalent to reading (or peeking) and saving messages until a matching message is received, processing that message, then processing future messages from the saved queue. It's just implemented in a more pragmatic way.

If immutability is important, then the process dictionary means Erlang doesn't qualify, but again, it's pragmatic.

I'd rather have a pragmatic almost actor system than a dogmatic Actor system that's hard to use.

There are no comments on this comment yet.