Abstract
Mixing the actor model with other concurrency models in a single program can break the actor abstraction. This increases the chance of creating deadlocks and data races—two mistakes that are hard to make with actors. Furthermore, it prevents the use of many advanced testing, modeling, and verification tools for actors, as these require pure actor programs. This study is the first to point out the phenomenon of mixing concurrency models by Scala developers and to systematically identify the factors leading to it. We studied 15 large, mature, and actively maintained actor programs written in Scala and found that 80% of them mix the actor model with another concurrency model. Consequently, a large part of real-world actor programs does not use actors to their fullest advantage. Inspection of the programs and discussion with the developers reveal two reasons for mixing that can be influenced by researchers and library-builders: weaknesses in the actor library implementations, and shortcomings of the actor model itself.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)
Agha, G.A., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. J. Funct. Program. 7(1), 1–72 (1997)
Armstrong, J.: Making reliable distributed systems in the presence of software errors. PhD thesis, Kungl Tekniska Högskolan (2003), http://www.erlang.org
Atkinson, R., Hewitt, C.: Synchronization in actor systems. In: Proc. of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1977, pp. 267–280 (1977)
Bonér, J., Klang, V., Kuhn, R., et al.: Akka library, http://akka.io
Bradbury, J.S., Jalbert, K.: Defining a catalog of programming anti-patterns for concurrent Java. In: Proc. of the 3rd International Workshop on Software Patterns and Quality, SPAQu 2009, pp. 6–11 (October 2009)
Bykov, S., Geller, A., Kliot, G., Larus, J.R., Pandya, R., Thelin, J.: Orleans: cloud computing for everyone. In: Proc. of the 2nd ACM Symposium on Cloud Computing, SOCC 2011, pp. 16:1–16:14 (2011)
Dedecker, J., Van Cutsem, T., Mostinckx, S., D’Hondt, T., De Meuter, W.: Ambient-oriented programming. In: Companion to the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, OOPSLA 2005, pp. 31–40 (2005)
Dinges, P., Agha, G.: Scoped synchronization constraints for large scale actor systems. In: Sirjani, M. (ed.) COORDINATION 2012. LNCS, vol. 7274, pp. 89–103. Springer, Heidelberg (2012)
Dolby, J., Fink, S.J., Sridharan, M.: T. J. Watson libraries for analysis (WALA), http://wala.sf.net
Haller, P., Sommers, F.: Actors in Scala. Artima Series (2012)
Haller, P., Van Cutsem, T.: Implementing joins using extensible pattern matching. In: Lea, D., Zavattaro, G. (eds.) COORDINATION 2008. LNCS, vol. 5052, pp. 135–152. Springer, Heidelberg (2008)
Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: Proc. of the 3rd International Joint Conference on Artificial Intelligence, IJCAI 1973, pp. 235–245 (1973)
Hochstein, L., Shull, F., Reid, L.B.: The role of MPI in development time: a case study. In: Proc. of the 2008 ACM/IEEE Conference on Supercomputing, SC 2008, pp. 34:1–34:10 (2008)
Imam, S.M., Sarkar, V.: Integrating task parallelism with actors. In: Proc. of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2012, pp. 753–772 (2012)
Karmani, R.K., Shali, A., Agha, G.: Actor frameworks for the JVM platform: a comparative analysis. In: Proc. of the 7th International Conference on Principles and Practice of Programming in Java, PPPJ 2009, pp. 11–20 (2009)
Lauterburg, S., Dotta, M., Marinov, D., Agha, G.: A framework for state-space exploration of Java-based actor programs. In: Proc. of the 2009 IEEE/ACM International Conference on Automated Software Engineering, ASE 2009, pp. 468–479 (2009)
Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. SIGPLAN Not. 43(3), 329–339 (2008)
Luff, M.: Empirically investigating parallel programming paradigms: A null result. In: PLATEAU at the ACM Onward! Conference (2009)
Mattson, T., Sanders, B., Massingill, B.: Patterns for parallel programming, 1st edn. Addison-Wesley Professional (2004)
Nanz, S., Torshizi, F., Pedroni, M., Meyer, B.: Design of an empirical study for comparing the usability of concurrent programming languages. In: Proc. of the 2011 International Symposium on Empirical Software Engineering and Measurement, ESEM 2011, pp. 325–334 (2011)
Negara, S., Karmani, R.K., Agha, G.: Inferring ownership transfer for efficient message passing. In: Proc. of the 16th ACM Symposium on Principles and Practice of Parallel Programming, PPoPP 2011, pp. 81–90 (2011)
Odersky, M., Spoon, L., Venners, B.: Programming in Scala, 2/e. Artima Series. Artima Press (2010)
Okur, S., Dig, D.: How do developers use parallel libraries? In: Proc. of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, FSE 2012, pp. 54:1–54:11 (2012)
Pankratius, V., Schmidt, F., Garretón, G.: Combining functional and imperative programming for multicore software: an empirical study evaluating Scala and Java. In: Proc. of the 2012 International Conference on Software Engineering, ICSE 2012, pp. 123–133 (2012)
Pech, V., König, D., Winder, R., et al.: GPars, http://gpars.codehaus.org/
Proença, J., Clarke, D., de Vink, E., Arbab, F.: Dreams: a framework for distributed synchronous coordination. In: Proc. of the 27th Annual ACM Symposium on Applied Computing, SAC 2012, pp. 1510–1515 (2012)
Schäfer, J., Poetzsch-Heffter, A.: JCoBox: Generalizing active objects to concurrent components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010)
Scholliers, C., Tanter, E., Meuter, W.D.: Parallel actor monitors. In: 14th Brazilian Symposium on Programming Languages (2010)
Sirjani, M., Jaghoori, M.M.: Ten years of analyzing actors: Rebeca experience. In: Agha, G., Danvy, O., Meseguer, J. (eds.) Formal Modeling: Actors, Open Systems, Biological Systems. LNCS, vol. 7000, pp. 20–56. Springer, Heidelberg (2011)
Song, M., Ren, S.: Coordination operators and their composition under the actor-role-coordinator (ARC) model. SIGBED Rev. 8(1), 14–21 (2011)
Tasharofi, S., Gligoric, M., Marinov, D., Johnson, R.: Setac: A framework for phased deterministic testing of Scala actor programs. In: The Second Scala Workshop (2011)
Tasharofi, S., Karmani, R.K., Lauterburg, S., Legay, A., Marinov, D., Agha, G.: TransDPOR: A novel dynamic partial-order reduction technique for testing actor programs. In: Giese, H., Rosu, G. (eds.) FMOODS/FORTE 2012. LNCS, vol. 7273, pp. 219–234. Springer, Heidelberg (2012)
Torres, W., Pinto, G., Fernandes, B., Oliveira, J.A.P., Ximenes, F.A., Castor, F.: Are Java programmers transitioning to multicore?: a large scale study of Java FLOSS. In: SPLASH Workshops, SPLASH 2011 Workshops, pp. 123–128 (2011)
Yonezawa, A. (ed.): ABCL: an object-oriented concurrent system. MIT Press, Cambridge (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Tasharofi, S., Dinges, P., Johnson, R.E. (2013). Why Do Scala Developers Mix the Actor Model with other Concurrency Models?. In: Castagna, G. (eds) ECOOP 2013 – Object-Oriented Programming. ECOOP 2013. Lecture Notes in Computer Science, vol 7920. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39038-8_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-39038-8_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39037-1
Online ISBN: 978-3-642-39038-8
eBook Packages: Computer ScienceComputer Science (R0)