upvote
You are right. I inherited an early version of a product built in the Actor model, and we quickly had to go to a hybrid approach doing some of the things you describe.

Specifically, we introduced a single actor that manipulated shared state and was responsible for some critical IO. Other actors could see the shared state in a non-blocking manner, so there ended up being a lot of "refresh my shared state" or "abort if the shared state changed".

My longer-term conclusion was that the actor model wasn't correct for the product, because it obscured the procedural nature of what happened in each operation. It should have been multithreaded (or green threads) with each operation spawning a thread; and then classical read/write locks (with timeouts) on shared state. In some cases where batching happened (for some API calls), some kind of message passing would be needed, but the parent thread would need to block on the thing that does the batch.

reply
It's non-blocking through the use of stackless futures. The ReplyTo gives you enough to get back to your future, so you can restore your state and continue execution. It might feel like splitting hairs, but it lets you get rid of threads. As for "callback hell", you only get the async/await pattern inside stateless tasks that can send a message back to the parent actor when the task is complete. Then the parent actor can update its own internal state "atomically" with no interruptions.

Is it a panacea? No, certainly not. But I do think it provided some interesting capabilities and tradeoffs that are useful to think about.

reply
Fire and forget versus fork and join.

Fire and forget is mostly useless. One of the many counter-examples is the existence of TCP and QUIC. Raw UDP has legitimate use-cases, but falls short for many other real-world use-cases.

reply
> In the simplest form it continues to serve other messages, making the actor reentrant, which can create incredibly surprising scenarios as code executes while you don't expect to changing actor fields in unexpected ways.

That's probably why GUI programming is so hard and every GUI sucks.

Anything that happens outside RAM requires you to respond to every possible input in the middle of any possible operation

reply
I'm not sure if actors are still a popular paradigm in UI programming, which I think it's where most people who used it had a chance to encounter it. Win32 certainly used to use it as did traditional Qt, but modern systems have moved to more of a MVC approach.
reply
Oldschool UIs would often just unapologetically freeze or make a ding sound if you did things out of order.

In Win32, when you show a message box, that MessageBox or DialogBox function doesn't return until the dialog box closes. Inside the function is a separate event loop (or message pump, by the Win32 name) and whenever it gets a user input event unrelated to the dialog, it plays a ding noise, flashes the dialog box, and ignores it. The whole time it's on-screen, the program is sitting there with a bunch of stuff on its stack, probably blocking in the middle of an event handler. And yet nobody found this unintuitive to use or to program!

(This is obvious to anyone who's programmed Win32 but I figure a lot of HN readers have only done web)

reply
Re-entrancy

Thread-safety

What is old os new again.

Unix also learned this the hard way with signals and job control. Signals are still footguns.

reply
I dunno, after I learned that every syscall can just spit back an error because it was interrupted and this is how threading works on single core systems was mind blowing to me. Signals don't actually suck themselves, it's just that our tools are total shaite at handling them.
reply
Yeah, what people usually forget to mention about 'we had this great concept in the 70s, why is no one using it' is that people HAVE used it, and found out it has problems and subsequently moved on because of said problems.
reply