Search
speaker photo

SE Radio 178: Akka With Jonas Boner

Recording Venue: Skype
Guest: Jonas Boner

This episode is a conversation with Jonas Boner about Akka. Akka is a Scala-based framework for concurent and distributed applications, providing among other things support for actors, remote communication, transactional memory. In the episode we take a look at the most important aspects of Akka, as well as how and where it is used today. We also briefly talk about Jonas’ involvment in the Typesafe company.


Show Notes

Join the discussion
6 comments
  • Hi,
    This is a general feedback and not wrt to this episode. If it possible to reduce the size of the podcast file (make it close to 10-15 MB maybe) ? you can try something like LAME if you are on LINUX. That would really help . . .

    thanks

  • Great podcast! I listened to it while driving home. Some topics where a bit over my head but it’s good to hear new things. Keep it coming.

  • Great podcast on a fascinating subject. As the creator of the QP state machine frameworks for real-time embedded systems (http://www.state-machine.com), I immensely enjoyed how Jonas explained the Akka framework. The descriptions of actors, share-nothing paradigm, non-blocking execution, run-to-completion (RTC) event processing, asynchronous communication, or zero-copy event passing, are the best I’ve ever heard. These concepts seem to be universal to all active object-based frameworks and all of them are implemented in the QP framework exactly as explained in this podcast.

    One aspect not mentioned in the interview is the unprecedented scalability of the actor paradigm. The Akka framework shows that the paradigm is applicable to the high-end of the spectrum. But, interestingly, the actor model scales down to very small systems (e.g., single-chip microcontrollers) just as easily. In fact, the event-driven approach scales down better than any other alternative (such as a traditional RTOS). The QP framework, for example, runs comfortably in just a few KB of code space (ROM) and 1KB or RAM. The ultra-light QP-nano framework scales even better, to just hundreds bytes (!) of RAM. The event-driven approach is also inherently low-power (the CPU is used only to process events and otherwise can be placed in a low-power sleep mode). All this makes frameworks like QP ideal for wireless sensor networks, implantable medical devices, or anything with a battery inside.

    Other important aspects, not covered in the podcast, but critical for any framework of this type are: support for state machines and real-time execution.

    Event-driven actors (active objects) are naturally state machines and Akka seems to provide some support for FSMs. But, I’m not sure if Akka allows easy implementation of hierarchical state machines (UML statecharts). State hierarchy is critical for reusing common actions and transitions and without it most FSMs models of real-life problems simply “explode” due to repetitions. Implementing HSMs is neither difficult nor expensive. For example, even the smallest QP-nano framework supports HSMs in jsut 0.5-1KB of code space, depending on the processor.

    Regarding real-time execution, it turns out that actors can beautifully work with preemptive kernels. At this point, one needs to clearly distinguish between the run-to-completion (RTC) processing and real-time scheduling. RTC does not mean that an actor needs to monopolize the CPU for the whole RTC step. Actors (of higher priority) can freely preempt each other. As long as actors don’t share resources (remember share-nothing policy?) there are no concurrency hazards. This means that actor-based system running under a preemptive priority-based kernel fully complies with the assumptions of the RMA (Rate Monotonic Analysis) model. In fact, the share-nothing policy makes actor-based systems the easiest to analyze with RMA.

    And finally, I wish this podcast would mention that actor-based frameworks make fantastic targets for automatic code generation, which takes the whole approach to the entirely new level. In my field of real-time embedded systems, any commercially successful modeling tool uses a variant of a state machine-based framework behind the scenes. The QP framework also comes with a free graphical modeling tool called QM (www.state-machine.com/qm).

  • Great podcast. It should be interesting to have a follow up on the subject nowadays (2 years later) to see how Akka has evolved.

More from this show