Multiparty Session Actors

  • Rumyana Neykova
  • Nobuko Yoshida
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8459)

Abstract

Actor coordination armoured with a suitable protocol description language has been a pressing problem in the actors community. We study the applicability of multiparty session type (MPST) protocols for verification of actor programs. We incorporate sessions to actors by introducing minimum additions to the model such as the notion of actor roles and protocol mailboxes. The framework uses Scribble, which is a protocol description language based on multiparty session types. Our programming model supports actor-like syntax and runtime verification mechanism guaranteeing communication safety of the participating entities. An actor can implement multiple roles in a similar way as an object can implement multiple interfaces. Multiple roles allow for cooperative inter-concurrency in a single actor. We demonstrate our framework by designing and implementing a session actor library in Python and its runtime verification mechanism. Benchmark results demonstrate that the runtime checks induce negligible overhead.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Cell - actors for celery, http://cell.readthedocs.org/
  2. 2.
    Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)Google Scholar
  3. 3.
    Agha, G., Mason, I.A., Smith, S.F., Talcott, C.L.: A foundation for actor computation. Journal of Functional Programming 7, 1–72 (1997)CrossRefMATHMathSciNetGoogle Scholar
  4. 4.
    Akka - scala actor library, http://akka.io/
  5. 5.
    Advanced Message Queuing Protocol homepage, http://www.amqp.org/
  6. 6.
    Bettini, L., Coppo, M., D’Antoni, L., De Luca, M., Dezani-Ciancaglini, M., Yoshida, N.: Global progress in dynamically interleaved multiparty sessions. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 418–433. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. 7.
    Caires, L.: Spatial-behavioral types for concurrency and resource control in distributed systems. Theor. Comput. Sci. 402(2-3), 120–141 (2008)CrossRefMATHMathSciNetGoogle Scholar
  8. 8.
  9. 9.
    Crafa, S.: Behavioural types for actor systems. arXiv:1206.1687Google Scholar
  10. 10.
    Gay, S.J., Vasconcelos, V.T., Ravara, A., Gesbert, N., Caldeira, A.Z.: Modular session types for distributed object-oriented programming. In: POPL, pp. 299–312. ACM (2010)Google Scholar
  11. 11.
    Henrio, L., Huet, F., István, Z.: Multi-threaded active objects. In: De Nicola, R., Julien, C. (eds.) COORDINATION 2013. LNCS, vol. 7890, pp. 90–104. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  12. 12.
    Honda, K., Hu, R., Neykova, R., Chen, T.-C., Demangeon, R., Deniélou, P.-M., Yoshida, N.: Structuring Communication with Session Types. In: COB 2012. LNCS (2012) (to appear)Google Scholar
  13. 13.
    Honda, K., Mukhamedov, A., Brown, G., Chen, T.-C., Yoshida, N.: Scribbling interactions with a formal foundation. In: Natarajan, R., Ojo, A. (eds.) ICDCIT 2011. LNCS, vol. 6536, pp. 55–75. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  14. 14.
    Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: POPL 2008, pp. 273–284. ACM (2008)Google Scholar
  15. 15.
    Hu, R., Neykova, R., Yoshida, N., Demangeon, R., Honda, K.: Practical Interruptible Conversations: Distributed Dynamic Verification with Session Types and Python. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 130–148. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  16. 16.
    Imam, S.M., Sarkar, V.: Integrating task parallelism with actors. SIGPLAN Not. 47(10), 753–772 (2012)CrossRefGoogle Scholar
  17. 17.
    Mostrous, D., Vasconcelos, V.T.: Session Typing for a Featherweight Erlang. In: De Meuter, W., Roman, G.-C. (eds.) COORDINATION 2011. LNCS, vol. 6721, pp. 95–109. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  18. 18.
    Neykova, R., Yoshida, N., Hu, R.: SPY: Local Verification of Global Protocols. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 358–363. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  19. 19.
    Ng, N., Yoshida, N., Honda, K.: Multiparty session C: Safe parallel programming with message optimisation. In: Furia, C.A., Nanz, S. (eds.) TOOLS 2012. LNCS, vol. 7304, pp. 202–218. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  20. 20.
    Ocean Observatories Initiative, http://www.oceanobservatories.org/
  21. 21.
    Ren, S., Yu, Y., Chen, N., Marth, K., Poirot, P.-E., Shen, L.: Actors, roles and coordinators - a coordination model for open distributed and embedded systems. In: Ciancarini, P., Wiklicky, H. (eds.) COORDINATION 2006. LNCS, vol. 4038, pp. 247–265. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  22. 22.
    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)CrossRefGoogle Scholar
  23. 23.
    Scholliers, C., Tanter, É., Meuter, W.D.: Parallel actor monitors: Disentangling task-level parallelism from data partitioning in the actor model. Sci. Comput. Program. 80, 52–64 (2014)CrossRefGoogle Scholar
  24. 24.
    Scribble project home page, http://www.scribble.org
  25. 25.
    Online appendix for this paper, http://www.doc.ic.ac.uk/~rn710/sactor
  26. 26.
    Tasharofi, S., Dinges, P., Johnson, R.E.: Why do Scala developers mix the actor model with other concurrency models? In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 302–326. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  27. 27.

Copyright information

© IFIP International Federation for Information Processing 2014

Authors and Affiliations

  • Rumyana Neykova
    • 1
  • Nobuko Yoshida
    • 1
  1. 1.Imperial College LondonLondonUK

Personalised recommendations