O'Reilly logo

Scala in Depth by Joshua D. Suereth, Foreword by: Martin Odersky

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

Chapter 9. Actors

 

In this chapter
  • General design principles using actors
  • Knowing the difference between react and receive
  • Using typed communication and sealed message protocols
  • Limiting failures to zones using supervisors
  • Limiting starvation to zones using schedulers

 

Actors are an abstraction on a synchronous processes. They communicate to the external world by sending and receiving messages. An actor will process received messages sequentially in the order they’re received, but will handle only one message at a time. This is critical, because it means that actors can maintain state without explicit locks. Actors can also be asynchronous or synchronous. Most actors won’t block a thread when waiting for messages, although this can be ...

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