Parallel and Distributed Web Programming with Actors

Part of the Lecture Notes in Computer Science book series (LNCS, volume 10789)


JavaScript is the predominant language when it comes to developing applications for the web. Many of today’s web-based systems are implemented solely in JavaScript due to its applicability to both client and server-side development. Programmers have an ever-growing need to express parallelism due to the computationally intensive nature of modern web applications. Currently, JavaScript tries to satisfy this need through actor-based parallelism constructs. However, we argue that these constructs suffer from design flaws which hamper programmers to elegantly express parallelism in web applications. In this paper we present Spiders.ts, a unified actor framework to express both parallelism and distribution. In Spiders.ts, programmers can easily specify the coarse-grained parallelism needs of modern web applications. Moreover, Spiders.ts’ built-in distribution features allow programmers to express client-to-server, server-to-server and client-to-client communication simply by using actors. Through benchmarks we show that our framework is able to substantially improve the performance of web applications. Moreover, we demonstrate its expressive power by comparing implementations of a distributed case study application.


Actor framework Web Distributed programming Parallel programming Communicating event loops 

Supplementary material


  1. 1.
    Usage of JavaScript for websites. Accessed 3 June 2016
  2. 2.
    Boix, E.G., Scholliers, C., Larrea, N., De Meuter, W.: Connect. js. Technical report, Vrije Universiteit Brussel (2015).
  3. 3.
    Cutsem, T.V., et al.: AmbientTalk: programming responsive mobile peer-to-peer applications with actors. Comput. Lang. Syst. Struct. 40(3–4), 112–136 (2014)Google Scholar
  4. 4.
    De Koster, J., Van Cutsem, T., De Meuter, W.: 43 years of actors: a taxonomy of actor models and their key properties. In: Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, AGERE 2016, pp. 31–40. ACM, New York (2016)Google Scholar
  5. 5.
    Fortuna, E., Anderson, O., Ceze, L., Eggers, S.: A limit study of JavaScript parallelism. In: Proceedings of the IEEE International Symposium on Workload Characterization, IISWC 2010, pp. 1–10. IEEE Computer Society, Washington, DC (2010)Google Scholar
  6. 6.
    Gal, A., et al.: Trace-based just-in-time type specialization for dynamic languages. In: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, pp. 465–478. ACM, New York (2009)Google Scholar
  7. 7.
    Garnock-Jones, T., Felleisen, M.: Coordinated concurrent programming in Syndicate. In: Thiemann, P. (ed.) ESOP 2016. LNCS, vol. 9632, pp. 310–336. Springer, Heidelberg (2016). Scholar
  8. 8.
    Imam, S., Sarkar, V.: Savina-an actor benchmark suite. In: 4th International Workshop on Programming based on Actors, Agents, and Decentralized Control, AGERE! (2014)Google Scholar
  9. 9.
    Krauweel, M., Jongmans, S.-S.T.Q.: Simpler coordination of JavaScript web workers. In: Jacquet, J.-M., Massink, M. (eds.) COORDINATION 2017. LNCS, vol. 10319, pp. 40–58. Springer, Cham (2017). Scholar
  10. 10.
    Martinsen, J.K., Grahn, H., Isberg, A.: An argument for thread-level speculation and just-in-time compilation in the Google’s V8 JavaScript engine. In: Proceedings of the 11th ACM Conference on Computing Frontiers, CF 2014, pp. 25:1–25:2. ACM, New York (2014)Google Scholar
  11. 11.
    Miller, H., Haller, P., Odersky, M.: Spores: a type-based foundation for closures in the age of concurrency and distribution. In: Jones, R. (ed.) ECOOP 2014. LNCS, vol. 8586, pp. 308–333. Springer, Heidelberg (2014). Scholar
  12. 12.
    Miller, M.S., Tribble, E.D., Shapiro, J.: Concurrency among strangers: programming in E as plan coordination. In: De Nicola, R., Sangiorgi, D. (eds.) TGC 2005. LNCS, vol. 3705, pp. 195–229. Springer, Heidelberg (2005). Scholar
  13. 13.
    Miller, M.S., Van Cutsem, T.: Communicating event loops, an exploration in JavaScript (2011).
  14. 14.
    Myter, F., Scholliers, C., De Meuter, W.: Many spiders make a better web: a unified web-based actor framework. In: Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, AGERE 2016, pp. 51–60. ACM, New York (2016)Google Scholar
  15. 15.
    Stivan, G., Peruffo, A., Haller, P.: Akka.js: towards a portable actor runtime environment. In: Proceedings of the 5th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, AGERE! 2015, pp. 57–64. ACM, New York (2015)Google Scholar
  16. 16.
    Tilkov, S., Vinoski, S.: Node.js: using JavaScript to build high-performance network programs. IEEE Internet Comput. 14(6), 80 (2010)CrossRefGoogle Scholar
  17. 17.
    Welc, A., Hudson, R.L., Shpeisman, T., Adl-Tabatabai, A.R.: Generic workers: towards unified distributed and parallel JavaScript programming model. In: Programming Support Innovations for Emerging Distributed Applications, PSI EtA 2010, pp. 1:1–1:5. ACM, New York (2010)Google Scholar
  18. 18.
    Xanthopoulos, S., Xinogalos, S.: A comparative analysis of cross-platform development approaches for mobile applications. In: Proceedings of the 6th Balkan Conference in Informatics, BCI 2013, pp. 213–220. ACM, New York (2013)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.Vrije Universiteit BrusselElseneBelgium
  2. 2.Universiteit GentGentBelgium

Personalised recommendations