Abstract
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.
F. Myter—Funded by Innoviris (the Brussels Institute for Research and Innovation) through the Doctiris program (grant number 15-doct-07).
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 subscriptionsNotes
- 1.
- 2.
A typed superset of JavaScript which compiles to standard JavaScript.
- 3.
- 4.
- 5.
- 6.
References
Usage of JavaScript for websites. https://w3techs.com/technologies/details/cp-javascript/all/all. Accessed 3 June 2016
Boix, E.G., Scholliers, C., Larrea, N., De Meuter, W.: Connect. js. Technical report, Vrije Universiteit Brussel (2015). http://soft.vub.ac.be/AGERE15/papers/AGERE_2015_paper_20.pdf
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)
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)
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)
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)
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). https://doi.org/10.1007/978-3-662-49498-1_13
Imam, S., Sarkar, V.: Savina-an actor benchmark suite. In: 4th International Workshop on Programming based on Actors, Agents, and Decentralized Control, AGERE! (2014)
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). https://doi.org/10.1007/978-3-319-59746-1_3
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)
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). https://doi.org/10.1007/978-3-662-44202-9_13
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). https://doi.org/10.1007/11580850_12
Miller, M.S., Van Cutsem, T.: Communicating event loops, an exploration in JavaScript (2011). http://soft.vub.ac.be/tvcutsem/talks/presentations/WGLD_CommEventLoops.pdf
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)
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)
Tilkov, S., Vinoski, S.: Node.js: using JavaScript to build high-performance network programs. IEEE Internet Comput. 14(6), 80 (2010)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
A Highlighted Native Implementation of Pong
1.1 A.1 Server Implementation
1.2 A.2 Server Implementation
1.3 A.3 Client Implementation
1.4 A.4 Client Implementation
1.5 A.5 Client Implementation
B Highlighted Spiders.ts Implementation of Pong
1.1 B.1 Server Implementation
1.2 B.2 Client Implementation
1.3 B.3 Client Implementation
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Myter, F., Scholliers, C., De Meuter, W. (2018). Parallel and Distributed Web Programming with Actors. In: Ricci, A., Haller, P. (eds) Programming with Actors. Lecture Notes in Computer Science(), vol 10789. Springer, Cham. https://doi.org/10.1007/978-3-030-00302-9_1
Download citation
DOI: https://doi.org/10.1007/978-3-030-00302-9_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-00301-2
Online ISBN: 978-3-030-00302-9
eBook Packages: Computer ScienceComputer Science (R0)