One high-level pattern we have recommended often in the past is to minimize the number of top-level actors, which in its logical consequence means to have only exactly one of these. This one top-level actor represents the whole application life-cycle: its constructor is equivalent to a traditional main class in Java and its supervisorStrategy determines which components of the application can be restarted and which failures are fatal.
The member nodes of the cluster collects system health metrics, such as heap memory and CPU usage. The metrics are spread to other nodes and consumed by a new type of router that performs load balancing of messages to cluster nodes based on the cluster metrics data.
Typesafe Activator helps you get started with the Typesafe Platform, Play Framework, Akka & Scala.
You will find 5 getting started tutorials for Akka 2.2 in Typesafe Activator:
- Hello Akka!
- Akka Supervision
- Akka Java Spring
- Akka Clustered PubSub with Scala!
- Distributed workers with Akka and Scala!
Try it out! (Typesafe Activator is in Developer Preview)