O'Reilly logo

Mastering Akka by Christian Baxter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required