Or, if you’ve evaluated using them in production, but decided against it, I’d love to hear about that as well!
It's an incredibly great model for these things. We've been able to scale this system from hundreds to hundreds of millions of users with very little changes to the underlying architecture.
The actor model itself is really good, it makes you think about problems differently, and in my opinion it's better than traditional OOP.
The only issue I have had with Akka is with the tooling around metrics/logging of async calls. The rest, what can I say, it's in production and I am barely on call because of issues- certainly not because I write bug free code, but because I believe the framework is really solid, while the actor model makes you think in a different and probably more simplified way which might help with developing simpler solutions.
I have also the feeling that it's niche, because of simpler frameworks like Springboot that offer most of what you need out of the box and it doesn't require additional "learning".
Using them in production here for 4 years (Akka) with our own actors that dynamically spawn each other depending on the load (along with some messages sent with timers).
You usually have to think about how to correctly handle lost messages or full mailboxes, but once you do, it usually works reliably.
I think actors are more of a low level concurrency Lego block you can use to build higher level stuff with (just like akka streams, etc.)
If you want to use them, I strongly encourage types actors, so unlike Erlang or Elixir and more like Akka or in the Pony language: it really helps with not missing messages because the compiler can make sure you don’t forget anything.
Akka monitoring is not great without paying for the monitoring tool, though.
In general, I’m curious whether there’s significant value in someone who is using Node or Python (for example), to look for a way to use the actor pattern. Or if actors are primarily great when used along with platforms that specifically “elevate” this concurrency model? (e.g. Erlang/Elixir, Java/Scala, .NET)
actors are a tool which is not to used solely. Need encapsulate state? Actors can help. Need concurrency? Perhaps futures are a better fit.
the question you ask is problatic at it sees actors as a single solution.
So even though Go has this green/micro thread behavior behind the scenes (go routines), it’s main innovation is around the concurrency safe queue (the channel) so those threads can communicate.
Now with actors you can imagine more of a pattern where each holds its own state and messages cause them to modify themselves or send messages to other actors. This behaves more like AI in a game simulation and is useful if independence rather than coordination is a good solution to the problem.
For lots of services this is not the case as the fastest path through all the queues is the best path and the problem isn’t about deciding what to do independently or hiding state within the actor but throughput through known paths. So that’s the difference. If you are tagging video with ML you want queues and throughput, if you are reacting to routing networking messages based on simple rules (erlang) you want actors.
If someone were using Go routines and channels, what do you think is the “clear” moment that they would benefit from actors? When the sequence of steps in a workflow are non-deterministic?
For the explicit actors, we use them to model state machines around I/O (e.g. stateful protocols). I've found that the application area is fairly niche, as many patterns of async work are clearer through queues, futures, or streams. The use of actors is insulated from the rest of the application code through interfaces that use futures or streams. But, internally, if you have to manage complex state where events can occur at any time and a mail-box like/internal queue is sufficient, then they tend to be easy to understand... once the initial ramp-up period is over.
Additionally, I've found them to require very little maintenance as developers tend to get to 100% _flow_ test coverage without a lot of difficulty.
And could you share the distinction between typed and untyped actors? Is that related to how the caller addresses/accesses methods on that actor?
Akka has two types of actors: typed and untyped. Typed actors allow the compiler to type check messages, while untyped (or classic actors) perform runtime checking. This also means references to actors can be typed, so if you have multiple implementations of actors that implement the same protocol, you can substitute between the different actors and verify the protocol at compile time.
https://doc.akka.io/docs/akka/current/typed/from-classic.htm...
I had played with Erlang before using Scala/Akka, so untyped actors were a familiar experience. My team decided to use typed actors going forward after an Akka version update since that seems to be the strategic direction of Akka (and it does help to have the compiler complain if we try sending a message that the actor doesn't understand).
We used the actor model for that project because it made it easier to deal with exceptions. Even things that usually worked didn't at some point, and to take into account all that could go wrong would have made it much more diffcult because there was always something new that went wrong.
One difficulty coming from non-actor systems is getting a callback or response from messages. By default, actor messages are outgoing-only so the idea of a callback or response message needs to be implemented on top.
It's impossible to make many useful statements regarding architecture unless there is proper context. Goals, resources, constraints, expectations. Use the right tool for the job.