O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

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

Usage Recommendations

You learned to create actors, send messages to them, and also how to coordinate between multiple instances. You used a stateless actor and also a stateful actor. You used both one-way communication and two-way communication. These options may seem a bit overwhelming. Let’s explore some recommendations for good use.

  • Rely more on stateless actors instead of stateful actors. Stateless actors don’t have identity, they can provide more concurrency, they’re easy to replicate, and they’re easy to restart and reuse. State may not be avoidable, but keep the use of stateful actors to a minimum—use them sparingly.

  • Keep the processing in the receive method really fast, especially if the receiving actor is stateful. Long-running tasks ...

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