Troubleshooting and best practices for actors
Even though we are using some of the newer features of Akka, Akka actors themselves are still the core building block on our new stack. As such, it's important to know some of the most common gotchas when using actors, as well as some best practices. I'll use my experiences with Akka to present that information to you in this section in an effort to help you write good actors and avoid some common pitfalls in the process.
Avoid closing over mutable state with Futures
This one is sort of the cardinal sin of actors, and I'm sure it's been discussed a million times over on the Internet, but I'm including it anyway because it can cause all sorts of problems if not properly respected. You should never use ...
Get Mastering Akka now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.