Academia.eduAcademia.edu

Outline

Towards Composable Concurrency Abstractions

2014, arXiv (Cornell University)

https://doi.org/10.4204/EPTCS.155.8

Abstract

In the past decades, many different programming models for managing concurrency in applications have been proposed, such as the actor model, Communicating Sequential Processes, and Software Transactional Memory. The ubiquity of multi-core processors has made harnessing concurrency even more important. We observe that modern languages, such as Scala, Clojure, or F#, provide not one, but multiple concurrency models that help developers manage concurrency. Large end-user applications are rarely built using just a single concurrency model. Programmers need to manage a responsive UI, deal with file or network I/O, asynchronous workflows, and shared resources. Different concurrency models facilitate different requirements. This raises the issue of how these concurrency models interact, and whether they are composable. After all, combining different concurrency models may lead to subtle bugs or inconsistencies. In this paper, we perform an in-depth study of the concurrency abstractions provided by the Clojure language. We study all pairwise combinations of the abstractions, noting which ones compose without issues, and which do not. We make an attempt to abstract from the specifics of Clojure, identifying the general properties of concurrency models that facilitate or hinder composition.

References (8)

  1. Gul A. Agha (1985): Actors: a model of concurrent computation in distributed systems. Ph.D. thesis, MIT.
  2. Muffy Calder, Mario Kolberg, Evan H. Magill & Stephan Reiff-Marganiec (2003): Feature in- teraction: a critical review and considered forecast. Computer Networks 41(1), pp. 115-141, doi:10.1016/S1389-1286(02)00352-3.
  3. Chas Emerick, Brian Carper & Christophe Grand (2012): Clojure Programming. O'Reilly.
  4. Tim Harris, Simon Marlow, Simon Peyton-Jones & Maurice Herlihy (2005): Composable memory transac- tions. In: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel pro- gramming, PPoPP '05, ACM Press, New York, New York, USA, pp. 48-60, doi:10.1145/1065944.1065952.
  5. C. A. R. Hoare (1978): Communicating sequential processes. Communications of the ACM 21(8), pp. 666- 677, doi:10.1145/359576.359585.
  6. Leslie Lamport (1977): Proving the Correctness of Multiprocess Programs. IEEE Transactions on Software Engineering SE-3(2), pp. 125-143, doi:10.1109/TSE.1977.229904.
  7. Nir Shavit & Dan Touitou (1995): Software Transactional Memory. In: Proceedings of the fourteenth annual ACM Symposium on Principles of Distributed Computing, PODC '95, ACM, New York, New York, USA, pp. 204-213, doi:10.1145/224964.224987.
  8. Samira Tasharofi, Peter Dinges & Ralph E. Johnson (2013): Why Do Scala Developers Mix the Actor Model with Other Concurrency Models? In: Proceedings of the 27th European Conference on Object-Oriented Programming, ECOOP'13, Montpellier, France, pp. 302-326, doi:10.1007/978-3-642-39038-8 13.