Typecasting Actors: from Akka to TAkka

He, J., Wadler, P. and Trinder, P. (2014) Typecasting Actors: from Akka to TAkka. In: Fifth Annual Scala Workshop (SCALA '14), Uppsala, Sweden, 28-29 Jul 2014, pp. 23-33. ISBN 9781450328685 (doi: 10.1145/2637647.2637651)

Full text not currently available from Enlighten.

Abstract

Scala supports actors and message passing with the Akka library. Though Scala is statically typed, messages in Akka are dynamically typed (that is, of type Any). The Akka designers argue that using static types is "impossible" because "actor behaviour is dynamic", and, indeed, it is not clear that important actor support, such as supervision or name servers, can be implemented if messages are statically typed. Here we present TAkka, a variant of Akka where messages are statically typed, and show that it is possible to implement supervisors and name servers in such a framework. We show it is possible to smoothly migrate from Akka to TAkka, porting one module at a time. We show that TAkka can support behavioural upgrades where the new message type of an actor is a supertype of the old type. We demonstrate the expressiveness of TAkka by rewriting approximately 20 Akka applications; the percentage of lines that need to be changed varies from 44% (in a 25-line program) to 0.05% (in a 27,000-line program), with a geometric mean of 8.5%. We show that the execution speed, scalability, and throughput of TAkka programs are comparable to those of Akka programs.

Item Type:Conference Proceedings
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Trinder, Professor Phil
Authors: He, J., Wadler, P., and Trinder, P.
College/School:College of Science and Engineering > School of Computing Science
Research Group:GPG
Publisher:ACM
ISBN:9781450328685

University Staff: Request a correction | Enlighten Editors: Update this record