Speculative Concurrent Processing with Transactional Memory in the Actor Model

  • Yaroslav Hayduk
  • Anita Sobe
  • Derin Harmanci
  • Patrick Marlier
  • Pascal Felber
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8304)

Abstract

The actor model has been successfully used for scalable computing in distributed systems. Actors are objects with a local state, which can only be modified by the exchange of messages. One of the fundamental principles of actor models is to guarantee sequential message processing, which avoids typical concurrency hazards, but limits the achievable message throughput. Preserving the sequential semantics of the actor model is, however, necessary for program correctness.

In this paper, we propose to add support for speculative concurrent execution in actors using transactional memory (TM). Our approach is designed to operate with message passing and shared memory, and can thus take advantage of parallelism available on distributed and multi-core systems. The processing of each message is wrapped in a transaction executed atomically and in isolation, but concurrently with other messages. This allows us (1) to scale while keeping the dependability guarantees ensured by sequential message processing, and (2) to further increase robustness of the actor model against threats due to the rollback ability that comes for free with transactional processing of messages. We validate our design within the Scala programming language and the Akka framework. We show that the overhead of using transactions is hidden by the improved message processing throughput, thus leading to an overall performance gain.

Keywords

Concurrency actors transactional memory speculative processing 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: IJCAI 1973: Proceedings of the 3rd International Joint Conference on Artificial Intelligence, pp. 235–245 (1973)Google Scholar
  2. 2.
    Karmani, R.K., Shali, A., Agha, G.: Actor frameworks for the jvm platform: a comparative analysis. In: PPPJ 2009: Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, pp. 11–20 (2009)Google Scholar
  3. 3.
    Haller, P.: On the integration of the actor model in mainstream technologies: the scala perspective. In: Proceedings of the 2nd Edition on Programming Systems, Languages and Applications Based on Actors, Agents, and Decentralized Control Abstractions, AGERE! 2012, pp. 1–6. ACM, Tucson (2012)Google Scholar
  4. 4.
    Imam, S.M., Sarkar, V.: Integrating task parallelism with actors. In: Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2012, Tucson, Arizona, USA, pp. 753–772 (2012)Google Scholar
  5. 5.
    Agha, G.A., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. Journal of Functional Programming 7(1), 1–72 (1997)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Karmani, R.K., Agha, G.: Actors. In: Padua, D. (ed.) Encyclopedia of Parallel Computing, pp. 1–11. Springer (2011)Google Scholar
  7. 7.
    Goodman, D., Khan, B., Khan, S., Luján, M., Watson, I.: Software transactional memories for scala. Journal of Parallel and Distributed Computing (2012)Google Scholar
  8. 8.
    Harris, T., Larus, J., Rajwar, R.: Transactional Memory, 2nd edn. Morgan and Claypool Publishers (2010)Google Scholar
  9. 9.
    Scholliers, C., Tanter, E., Meuter, W.D.: Parallel actor monitors. In: SBLP 2010: 14th Brazilian Symposium on Programming Languages, Salvador, Brazil (2010)Google Scholar
  10. 10.
  11. 11.
    Brito, A., Fetzer, C., Sturzrehm, H., Felber, P.: Speculative out-of-order event processing with software transaction memory. In: DEBS 2008: Proceedings of the International Conference on Distributed Event-Based Systems, pp. 265–275 (2008)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  • Yaroslav Hayduk
    • 1
  • Anita Sobe
    • 1
  • Derin Harmanci
    • 1
  • Patrick Marlier
    • 1
  • Pascal Felber
    • 1
  1. 1.University of NeuchatelSwitzerland

Personalised recommendations