Akka

The Akka framework extends the original Actor model in Scala by adding extraction capabilities such as support for typed Actor, message dispatching, routing, load balancing, and partitioning, as well as supervision and configurability [12:7].

The Akka framework can be downloaded from the www.akka.io website, or through the Typesafe Activator at http://www.typesafe.com/platform.

Akka simplifies the implementation of Actor by encapsulating some of the details of Scala Actor in the akka.actor.Actor and akka.actor.ActorSystem classes.

The three methods you want to override are as follows:

  • preStart: This is an optional method, invoked to initialize all the necessary resources such as file or database connection before the Actor is executed
  • receive ...

Get Scala: Guide for Data Science Professionals 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.