TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Are you using actors in production? Why/Why not?

56 pointsby lostintangentabout 3 years ago
In the realm of distributed computing, it seems like there are folks that believe very strongly in the actor pattern. However, they generally seem to be pretty niche? That said, this perspective could be entirely due to my bubble, and so I was curious to hear from folks that are using them in production, and how well they’ve worked out in practice.<p>Or, if you’ve evaluated using them in production, but decided against it, I’d love to hear about that as well!

10 comments

jhggabout 3 years ago
At Discord our entire real time system is built ontop of Elixir. Everything is an &quot;actor&quot; in that model. Every single Discord server, websocket connection, voice call, screenshare, etc... distributed using a consistent hash ring.<p>It&#x27;s an incredibly great model for these things. We&#x27;ve been able to scale this system from hundreds to hundreds of millions of users with very little changes to the underlying architecture.
评论 #30752835 未加载
mk89about 3 years ago
I have been using Akka in production for several years now and it&#x27;s one of the best things I ever did.<p>The actor model itself is really good, it makes you think about problems differently, and in my opinion it&#x27;s better than traditional OOP.<p>The only issue I have had with Akka is with the tooling around metrics&#x2F;logging of async calls. The rest, what can I say, it&#x27;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.<p>I have also the feeling that it&#x27;s niche, because of simpler frameworks like Springboot that offer most of what you need out of the box and it doesn&#x27;t require additional &quot;learning&quot;.
评论 #30749275 未加载
jiehongabout 3 years ago
I agree with the niche use case.<p>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).<p>You usually have to think about how to correctly handle lost messages or full mailboxes, but once you do, it usually works reliably.<p>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.)<p>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.<p>Akka monitoring is not great without paying for the monitoring tool, though.
评论 #30748824 未加载
weltmeisterabout 3 years ago
Imho its not so much the actor pattern but the single writer principle.<p>actors are a tool which is not to used solely. Need encapsulate state? Actors can help. Need concurrency? Perhaps futures are a better fit.<p>the question you ask is problatic at it sees actors as a single solution.
评论 #30746511 未加载
jwstarrabout 3 years ago
We use them both implicitly (underlying Akka Streams) and explicitly (both classic untyped actors and typed actors).<p>For the explicit actors, we use them to model state machines around I&#x2F;O (e.g. stateful protocols). I&#x27;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&#x2F;internal queue is sufficient, then they tend to be easy to understand... once the initial ramp-up period is over.<p>Additionally, I&#x27;ve found them to require very little maintenance as developers tend to get to 100% _flow_ test coverage without a lot of difficulty.
评论 #30747614 未加载
Jugurthaabout 3 years ago
I worked on a project where a device was to be paired to Bluetooth Low Energy device by a non-technical user and send that data somewhere through 3G dongle. It had to be untouched, update its own software, work all the time, recover when there was any problem (lost BLE connection, poor internet coverage, sync data, take a shot at a deliver-once scheme, handle connection errors, handle device swap, and a variety of other issues - I had actual, literal, nightmares related to UTC and time zones -<p>We used the actor model for that project because it made it easier to deal with exceptions. Even things that usually worked didn&#x27;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.
asfarleyabout 3 years ago
I use Akka.NET in production. It’s been good and I don’t have any major concerns, but I wonder sometimes about depending on a third-party library in case it becomes obsolete.<p>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.
closeparenabout 3 years ago
We run Flink for stream processing and Spark for batch processing, both of which are backed by Akka (and therefore the actor model).
评论 #30746835 未加载
评论 #30807080 未加载
dantodorabout 3 years ago
I&#x27;m using both Scala&#x2F;Akka and Elixir in production. Once you get to better know the paradigm, you&#x27;ll never ever want anyrhing else. And if by niche you understand resilient backends, yes, it&#x27;s pretty niche then :)
评论 #30749162 未加载
contingenciesabout 3 years ago
<i>Life is but a stage, and we are all actors upon it.</i><p>It&#x27;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.
评论 #30749303 未加载