r/SoftwareEngineering • u/FatefulDonkey • Sep 05 '25
Why did actor model not take off?
There seems to be numerous actor model frameworks (Akka) but I've never run into any company actually using them. Why is that?
75
Upvotes
39
u/iBoredMax Sep 05 '25
Erlang and Elixir use it. When the pattern can be enforced at the VM level, it’s pretty good. Not sure about Akka, but the actor model in something like Ruby is a total farce.
13
u/jimminybilybob Sep 05 '25 edited Sep 05 '25
I've used it in two companies. Well established products in the telecoms and networking domains.
I think it has a lot of benefits in common with a microservices architecture, but with different scaling and orchestration characteristics. Since Microservices has been pretty trendy in a lot of the industry for a while, maybe it's eaten into the actor model's typical use cases. (Yes I know they can be complementary).
Edit: also, observability can be tricky to get right with an actor model.
21
u/[deleted] Sep 05 '25
I believe that the actor model fundamentally takes more memory and is slower due to using message passing instead of just modifying state in memory.
You can see the effect of this in things like the Tech Empower benchmarks where Akka is slower even than Spring, never mind the high performance frameworks.
But in contrast to other slow frameworks like Django, Actors are also trickier to use and think about.
So Actor based code is slower (higher server costs) and harder to write (higher dev costs) but more resilient.
Well the truth is that most projects can achieve acceptable levels of availability and resiliency with other tactics, like having a cluster of application servers with failover, without using Actor based code.
So you would only use Actor based frameworks for projects where resiliency really is the most important thing. But most projects should avoid Actor based frameworks in order to save on dev and server costs.
7
u/[deleted] Sep 05 '25
Because the industry runs on buzzwords and dirty hacks.
You may like this model, you may not like it... But adoption has very little to do with efficiency or simplicity.
3
u/AdrianHBlack Sep 05 '25
It has in some industries. Telecommunications and soft real time projects (WhatsApp, Discord, even Leagues of Legends chat) use Erlang and Elixir for instance. It think it’s mostly because they’re not really well known and people are afraid to learn and to use them
There is also the false idea that it’s less efficient than x, y or z languages, when in reality it still uses less resources, it’s less prone to crash and needs less redundancy, and anyway how many companies actually need the performance benchmarks are talking about
(Also benchmarks are usually shitty anyway)
To be honest I think the software engineering industry would greatly benefit from people learning and using languages with a really good Developer Experience too and just generally getting a sense of how stuff is done differently in more niche languages
2
u/triplix Sep 05 '25
Swift has a version of actors baked in the language.
2
u/BosonCollider Sep 08 '25 edited Sep 08 '25
Because CSP or locks is often a better fit, especially if you don't enforce immutability in the language so that you can pass owning references across threads safely.
CSP wise, lots of languages have some kind of blocking channel or queue abstraction that blocks until the payload is received. It fits very well into an event loop and it integrates very well with blocking linux abstractions and with TCP. Unsynchronized messages where you have to manually synchronize to figure out if they were received are not as nice. Blocking channels can implement semaphores while actors/messages can only implement weak synchronization primitives.
For shared mutable state, mutexes are easier to work with than an owning actor, and the actor model complicates things. Having an STM abstraction is more useful than actors here.
The actual benefit of the actor model is that in erlang/elixir you have the same interface locally and remotely, which has pros and cons
2
u/mredding Nov 20 '25
The Actor Model is Alan Kay's description of OOP. You pass messages to objects that have autonomy and agency. You don't command the object,
object.open_umbrella(); you tell themobject << "Hey, it's raining.". This isn't you giving up control - you built the object itself, as well as the message. You know it's going to open the umbrella. Or, maybe you program it to have several optional outcomes, maybe it'll instead run to get out of the rain, and the decision is made with a heuristic you configured when the object was initialized.Object/Actor, same difference. The object has the agency to act upon the message itself. It knows what to do, and (beyond configuration/initialization) doesn't need to be told how to do it.
The problems I see are a) no one knows the actor model and can't be fucked to learn it. And b) it doesn't scale well.
1
u/volatilebool Sep 05 '25
You have to be in the right domain for them to make sense. IoT or anything where you need near real time. Also many systems can get away without using them, so people don’t want to learn a different paradigm. Also just general confusion about “actors”.
Here is a good write up about it by one the engineers of Microsoft Orleans (their “virtual” actor framework)
https://temporal.io/blog/sergey-the-curse-of-the-a-word
1
u/ub3rh4x0rz Sep 05 '25
I think in most contexts, applying learnings from actor model is overall more useful than strictly applying literal actor model. Combination of dominant tech stacks not natively supporting it the way BEAM does and inherent performance challenges with implementing it yourself.
One could argue microservices take the actor model to the extreme and that k8s beat BEAM as the runtime for that sort of thing
1
u/bluemage-loves-tacos Sep 05 '25
Mostly, there's just not that much need for them. They had/have a higher barrier to entry for most engineering teams who might consider them, so unless the layoff can be validated, different technologies will win out.
I played with Akka and it was kind of cool, but didn't have a use case that I could reasonably use it for since it would mean training the team in how to use it, understanding how to debug and monitor things, etc. Just didn't make sense.
1
u/jubaer997 Sep 06 '25
Erlang/Elixir?
1
u/calamarijones Sep 07 '25
I use the actor model every day at work on speech recognition services at Amazon at extremely high scale (100k TPS at peak). It actually saved us from a previous service’s haphazard callback structure and has been pretty easy to understand by devs. The only part that sucks is the tear down.
I think over applying it to every problem is not a great idea but as the structure of a pipeline service it’s been great.
1
u/kyuff Sep 08 '25
Many, if not most, backend services today process data. That means a typical operation read and store data from a storage.
In other words, often the process itself is stateless.
With that in mind, there is not much gained in an Actor model.
Especially in modern infrastructure like Kubernetes where stateless microservices thrive and its hard to find that particular actor running in a random pod behind a round robin service.
1
u/robhanz Sep 09 '25
It requires a very different way of thinking than most programmers are used to.
1
u/gaiya5555 Sep 10 '25
A lot of people dismiss Akka with comments like “it’s slow,” “it uses too much memory,” or “it’s hard to reason about,” and claim that’s why it isn’t widely used. I think that misses the point. The actor model (and Akka’s implementation of it) exists to address a very fundamental problem: multiple threads contending for the same object. By using message passing and giving each actor its own single-threaded execution context, you avoid the lock-based concurrency issues at the root. This model can be incredibly effective for eliminating race conditions across all sorts of engineering problems.
The real reason it’s not more widely adopted isn’t because it’s inherently flawed - it’s because most developers are simply more familiar and comfortable with locks and traditional concurrency patterns. It’s a different way of thinking, and a lot of people would rather stick with what they know than adopt a new paradigm.
1
u/External_Mushroom115 Oct 27 '25
Conceptually an actor is a fairly simple thing to reason about. Decomposing or designing something from scratch as a system of Actors is another thing though. I would draw a parallel here with Event Sourcing: Actors and ES are application architecture. Something you need to go all-in with to have the benefits outweigh the complexity. Such systems for example do upscaled pretty well but you need to understand the constraints, consequences, etc
For these reasons, introducing an Actor system in an existing code base is not trivial either.
Secondly, do correct me if I'm wrong here, Actor models are async by nature. That adds mental complexity to the system which again raises the bar.
1
u/Old_Half6359 Nov 05 '25
I was wondering the same thing. There are situations where distributed system with stateless app doesn't fit well e.g. apps that should support millions of connections.
As Java has Akka(or Pekko which is a forked version), Java already has a great ecosystem for actor programming model. Yet they seem to be not widely used. Instead the industry standard for Java applications is to use the spring boot framework. So I wondered what if we could integrate the two and started writing an MVP that integrates the two. It's currently in active development phase and it feels like it's worth a try.
https://github.com/seonWKim/spring-boot-starter-actor
1
u/Agitated_Run9096 Sep 05 '25
Big Tech has stifled all innovation, and the computer science / engineering in general, for anything that was seen as competition to their biggest income source.
Why use actors when you can build out a fleet of queues and microservices in the cloud for 10x the cost.
-8
u/[deleted] Sep 05 '25
These kind of frameworks are made by senior engineers to make them important since none can understand it 😆
1
u/[deleted] Sep 06 '25
[removed] — view removed comment
1
u/[deleted] Sep 10 '25
[removed] — view removed comment