Scala actors: Unifying thread-based and event-based programming. (English) Zbl 1162.68396

Summary: There is an impedance mismatch between message-passing concurrency and virtual machines, such as the JVM. VMs usually map their threads to heavyweight OS processes. Without a lightweight process abstraction, users are often forced to write parts of concurrent applications in an event-driven style which obscures control flow, and increases the burden on the programmer.
In this paper we show how thread-based and event-based programming can be unified under a single actor abstraction. Using advanced abstraction mechanisms of the Scala programming language, we implement our approach on unmodified JVMs. Our programming model integrates well with the threading model of the underlying VM.


68N19 Other programming paradigms (object-oriented, sequential, concurrent, automatic, etc.)
Full Text: DOI Link


[1] Adya, Atul; Howell, Jon; Theimer, Marvin; Bolosky, William J.; Douceur, John R., Cooperative task management without manual stack management, (Proc. USENIX (2002), USENIX), 289-302
[2] Agha, Gul A., ACTORS: A Model of Concurrent Computation in Distributed Systems (1986), MIT Press: MIT Press Cambridge, Massachusetts
[4] Armstrong, Joe; Virding, Robert; Wikström, Claes; Williams, Mike, Concurrent Programming in Erlang (1996), Prentice-Hall · Zbl 0869.68026
[5] Black, A.; Carlsson, M.; Jones, M.; Kieburtz, R.; Nordlander, J., Timber: A Programming Language for Real-Time Embedded Systems (2002)
[6] Blumofe, R., Cilk: An efficient multithreaded runtime system, Journal of Parallel and Distributed Computing, 37, 1, 55-69 (1996)
[8] Caromel, D.; Delbé, C.; di Costanzo, A.; Leyton, M., ProActive: An integrated platform for programming and running applications on grids and P2P systems, Computational Methods in Science and Technology, 12, 1, 69-77 (2006)
[9] Caromel, Denis; Henrio, Ludovic; Serpette, Bernard Paul, Asynchronous and deterministic objects, (Proc. POPL (2004), ACM), 123-134 · Zbl 1325.68052
[10] Chin, Brian; Millstein, Todd D., Responders: Language support for interactive applications, (Proc. ECOOP. Proc. ECOOP, LNCS, vol. 4067 (July 2006), Springer), 255-278
[11] Claessen, Koen, A poor man’s concurrency monad, Journal of Functional Programming, 9, 3, 313-323 (1999) · Zbl 0948.68022
[13] Cunningham, Ryan; Kohler, Eddie, Making events less slippery with eel, (Proc. HotOS (June 2005), USENIX)
[14] Van Cutsem, Tom; Dedecker, Jessie; Mostinckx, Stijn; Gonzalez Boix, Elisa; D’Hondt, Theo; De Meuter, Wolfgang, Ambient references: Addressing objects in mobile networks, (OOPSLA Companion (2006), ACM), 986-997
[15] Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang, Linguistic symbiosis between actors and threads, (Proc. ICDL (2007), ACM), 222-248
[16] Dedecker, Jessie; Van Cutsem, Tom; Mostinckx, Stijn; D’Hondt, Theo; De Meuter, Wolfgang, Ambient-oriented programming in AmbientTalk, (Proc. ECOOP. Proc. ECOOP, LNCS, vol. 4067 (2006)), 230-254
[17] Draves, Richard P.; Bershad, Brian N.; Rashid, Richard F.; Dean, Randall W., Using continuations to implement thread management and communication in operating systems, Operating Systems Review, 25, 5, 122-136 (1991)
[19] Emir, Burak; Odersky, Martin; Williams, John, Matching objects with patterns, (Ernst, Erik, Proc. ECOOP. Proc. ECOOP, LNCS, vol. 4609 (2007), Springer), 273-298
[20] Field, John; Varela, Carlos A., Transactors: A programming model for maintaining globally consistent distributed state in unreliable environments, (Proc. POPL (2005), ACM), 195-208 · Zbl 1369.68134
[21] Gamma, E.; Helm, R.; Johnson, R.; Vlissides, J., Design Patterns (1995), Addison-Wesley
[24] Haller, Philipp; Odersky, Martin, Event-based programming without inversion of control, (Proc. JMLC. Proc. JMLC, LNCS, vol. 4228 (September 2006), Springer), 4-22 · Zbl 1162.68396
[26] Harris, Tim; Marlow, Simon; Peyton Jones, Simon L.; Herlihy, Maurice, Composable memory transactions, (Proc. PPOPP (June 2005), ACM), 48-60
[27] Haynes, Christopher T.; Friedman, Daniel P., Engines build process abstractions, (Symp. Lisp and Functional Programming (August 1984), ACM), 18-24
[29] Lauer, Hugh C.; Needham, Roger M., On the duality of operating system structures, Operating Systems Review, 13, 2, 3-19 (1979)
[30] Lea, Doug, Concurrent Programming in Java (1996), Addison Wesley · Zbl 0888.68024
[31] Lea, Doug, A java fork/join framework, (Java Grande (2000)), 36-43
[33] Li, Peng; Zdancewic, Steve, Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives, (Proc. PLDI (2007), ACM), 189-199
[34] Lindholm, T.; Yellin, F., The Java Virtual Machine Specification (1996), Addison-Wesley
[35] Miller, Mark S.; Dean Tribble, E.; Shapiro, Jonathan, Concurrency among strangers — programming in E as plan coordination, (Proc. TGC 2005. Proc. TGC 2005, LNCS, vol. 3705 (2005), Springer-Verlag), 195-229
[36] Nyström, J. H.; Trinder, Philip W.; King, David J., Evaluating distributed functional languages for telecommunications software, (Proc. Workshop on Erlang (August 2003), ACM), 1-7
[39] Thomas, D. A.; Lalonde, W. R.; Duimovich, J.; Wilson, M.; McAffer, J.; Berry, B., Actra: A multitasking/multiprocessing smalltalk, ACM SIGPLAN Notices, 24, 4, 87-90 (1989)
[40] Varela, Carlos; Agha, Gul, Programming dynamically reconfigurable open systems with SALSA, ACM SIGPLAN Notices, 36, 12, 20-34 (2001)
[41] Robert von Behren, J.; Condit, Jeremy; Brewer, Eric A., Why events are a bad idea (for high-concurrency servers), (Proc. Hot OS (May 2003), USENIX), 19-24
[46] Ziarek, Lukasz; Schatz, Philip; Jagannathan, Suresh, Stabilizers: A modular checkpointing abstraction for concurrent functional programs, (Proc. ICFP (2006), ACM), 136-147
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.