Parallel and Distributed Web Programming with Actors

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.

[1]  Håkan Grahn,et al.  An argument for thread-level speculation and just-in-time compilation in the Google's V8 JavaScript engine , 2014, Conf. Computing Frontiers.

[2]  Matthias Felleisen,et al.  Coordinated Concurrent Programming in Syndicate , 2016, ESOP.

[3]  Wolfgang De Meuter,et al.  Many spiders make a better web: a unified web-based actor framework , 2016, AGERE!@SPLASH.

[4]  Mason Chang,et al.  Trace-based just-in-time type specialization for dynamic languages , 2009, PLDI '09.

[5]  Eric Dean Tribble,et al.  Concurrency Among Strangers , 2005, TGC.

[6]  Sung-Shik T. Q. Jongmans,et al.  Simpler Coordination of JavaScript Web Workers , 2017, COORDINATION.

[7]  Adam Welc,et al.  Generic workers: towards unified distributed and parallel JavaScript programming model , 2010, PSI EtA '10.

[8]  Stelios Xinogalos,et al.  A comparative analysis of cross-platform development approaches for mobile applications , 2013, BCI '13.

[9]  Philipp Haller,et al.  Akka.js: towards a portable actor runtime environment , 2015, AGERE!@SPLASH.

[10]  Jonathan S. Shapiro,et al.  Concurrency among strangers: programming in E as plan coordination , 2005 .

[11]  Martin Odersky,et al.  Spores: A Type-Based Foundation for Closures in the Age of Concurrency and Distribution , 2014, ECOOP.

[12]  Luis Ceze,et al.  A limit study of JavaScript parallelism , 2010, IEEE International Symposium on Workload Characterization (IISWC'10).

[13]  Vivek Sarkar,et al.  Savina - An Actor Benchmark Suite: Enabling Empirical Evaluation of Actor Libraries , 2014, AGERE!@SPLASH.

[14]  Steve Vinoski,et al.  Node.js: Using JavaScript to Build High-Performance Network Programs , 2010, IEEE Internet Comput..

[15]  Joeri De Koster,et al.  43 Years of Actors: a Taxonomy of Actor Models and Their Key Properties , 2016, AGERE!@SPLASH.

[16]  Wolfgang De Meuter,et al.  AmbientTalk: programming responsive mobile peer-to-peer applications with actors , 2014, Comput. Lang. Syst. Struct..