Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

GEMs: shared-memory parallel programming for Node.js

Published: 19 October 2016 Publication History

Abstract

JavaScript is the most popular programming language for client-side Web applications, and Node.js has popularized the language for server-side computing, too. In this domain, the minimal support for parallel programming remains however a major limitation. In this paper we introduce a novel parallel programming abstraction called Generic Messages (GEMs). GEMs allow one to combine message passing and shared-memory parallelism, extending the classes of parallel applications that can be built with Node.js. GEMs have customizable semantics and enable several forms of thread safety, isolation, and concurrency control. GEMs are designed as convenient JavaScript abstractions that expose high-level and safe parallelism models to the developer. Experiments show that GEMs outperform equivalent Node.js applications thanks to their usage of shared memory.

References

[1]
MemCached Object Caching System.
[2]
Redis Data Structure Store.
[3]
The Google V8 JavaScript engine.
[4]
HTML5 WebWorker API.
[5]
Lambda: Microservices in the Cloud.
[6]
ECMAScript Language Specification. v6.
[7]
The JavaScript Object Notation (JSON) Data Interchange Format.
[8]
Node.JS Cluster module,.
[9]
Node.JS TTL-cache: Simple in-memory object cache with TTL based per-item expiry,.
[10]
SharedArrayBuffer Specification Draft.
[11]
G. Agha. Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge, MA, USA, 1986.
[12]
C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In Proc. of OOPSLA ’02, pages 211–230, 2002.
[13]
J. Boyland, J. Noble, and W. Retert. Capabilities for sharing: A generalisation of uniqueness and read-only. In Proc. of ECOOP ’01, pages 2–27, 2001.
[14]
Y. Cheng, A. Gupta, and A. R. Butt. An in-memory object caching framework with adaptive load balancing. In Proc. of EuroSys ’15, pages 4:1–4:16, 2015.
[15]
S. Clebsch, S. Drossopoulou, S. Blessing, and A. McNeil. Deny capabilities for safe, fast actors. In Proc. of AGERE! ’15, pages 1–12, 2015.
[16]
M. Cole. Algorithmic skeletons: structured management of parallel computation. MIT Press, Cambridge, MA, USA, 1991.
[17]
D. R. Cutting, D. R. Karger, J. O. Pedersen, and J. W. Tukey. Scatter/gather: A cluster-based approach to browsing large document collections. In Proc. of SIGIR ’92, pages 318–329, 1992.
[18]
J. De Koster, S. Marr, T. D’Hondt, and T. Van Cutsem. Domains: safe sharing among actors. Science of Computer Programming, 98, Part 2:140–158, 2015.
[19]
M. De Wael, S. Marr, B. De Fraine, T. Van Cutsem, and W. De Meuter. Partitioned Global Address Space Languages. ACM Computing Surveys, 47:62:1–62:27, 2015.
[20]
J. Dean and S. Ghemawat. Mapreduce: simplified data processing on large clusters. Communications of the ACM, 51 (1):107–113, 2008.
[21]
J. B. Dennis and E. C. Van Horn. Programming Semantics for Multiprogrammed Computations. Commun. ACM, 9(3): 143–155, Mar. 1966.
[22]
D. Dice and N. Shavit. TLRW: Return of the read-write lock. In Proc. of SPAA ’10, pages 284–293, 2010.
[23]
M. Dodds, X. Feng, M. Parkinson, and V. Vafeiadis. Denyguarantee reasoning. In Proc. of ESOP ’09, pages 363–377, 2009.
[24]
S. J. Frank. Tightly coupled multiprocessor system speeds memory-access times. Electronics;(United States), 1, 1984.
[25]
A. Friedley, T. Hoefler, G. Bronevetsky, A. Lumsdaine, and C.-C. Ma. Ownership passing: Efficient distributed memory programming on multi-core systems. In Proc. of PPoPP ’13, pages 177–186. ACM, 2013.
[26]
M. Frigo, P. Halpern, C. E. Leiserson, and S. Lewin-Berlin. Reducers and other cilk++ hyperobjects. In Proceedings of the Twenty-first Annual Symposium on Parallelism in Algorithms and Architectures, SPAA ’09, pages 79–90. ACM, 2009.
[27]
T. Harris, J. Larus, and R. Rajwar. Transactional Memory. Morgan and Claypool, 2nd edition, 2010.
[28]
S. Herhut, R. L. Hudson, T. Shpeisman, and J. Sreeram. Parallel programming for the Web. In Proc. of USENIX HotPar ’12, pages 1–6, 2012.
[29]
U. Hölzle, C. Chambers, and D. Ungar. Optimizing Dynamically-typed Object-oriented Languages with Polymorphic Inline Caches. In Proc. of ECOOP ’91, pages 21–38, London, UK, 1991.
[30]
S. M. Imam and V. Sarkar. Savina - An Actor Benchmark Suite: Enabling Empirical Evaluation of Actor Libraries. In Proc. of AGERE ’14, pages 67–80. ACM, 2014.
[31]
T. Kalibera and R. Jones. Rigorous benchmarking in reasonable time. In Proc. of ISMM ’13, 2013.
[32]
R. K. Karmani, A. Shali, and G. Agha. Actor Frameworks for the JVM Platform: A Comparative Analysis. In Proc. of PPPJ ’09, pages 11–20. ACM, 2009.
[33]
G. Kiczales, J. des Rivires, and D. G. Bobrow. The Art of the Metaobject Protocol. The MIT Press, Cambridge, 1991.
[34]
L.-Q. Lee and A. Lumsdaine. Generic programming for high performance scientific applications. In Proc. of JCI ’02, pages 112–121, 2002.
[35]
L.-Q. Lee and A. Lumsdaine. The generic message passing framework. In Proc.of IPDPS ’03, pages 10 pp.–, April 2003.
[36]
B. P. Lester. The Art of Parallel Programming. Prentice-Hall, 1993.
[37]
R. Lublinerman, J. Zhao, Z. Budimli´c, S. Chaudhuri, and V. Sarkar. SIGPLAN Not., 46(10):885–902, Oct. 2011.
[38]
J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In Proc. of PLDI ’05, pages 378–391, 2005.
[39]
N. D. Matsakis. Parallel closures: a new twist on an old idea. In Proc. of HotPar ’12, pages 1–6, 2012.
[40]
M. Miller, K.-P. Yee, and J. Shapiro. Capability myths demolished. Technical report, Johns Hopkins University Systems Research Laboratory, 2003.
[41]
S. Negara, R. K. Karmani, and G. Agha. Inferring ownership transfer for efficient message passing. In Proc. of PPoPP ’11, pages 81–90. ACM, 2011.
[42]
K. Palacz, J. Vitek, G. Czajkowski, and L. Daynas. Incommunicado: Efficient communication for isolates. In Proc. of OOPSLA ’02, pages 262–274, 2002.
[43]
J. Protic, M. Tomasevic, and V. Milutinovi´c. Distributed shared memory: Concepts and systems, volume 21. John Wiley & Sons, 1998.
[44]
J. E. Richardson, M. J. Carey, and D. T. Schuh. The design of the e programming language. ACM Trans. Program. Lang. Syst., 15(3):494–534, July 1993.
[45]
J. Shun. Shared-Memory Parallelism Can Be Simple, Fast, and Scalable. PhD thesis, 2015.
[46]
S. Tilkov and S. Vinoski. Node.js: Using JavaScript to build high-performance network programs. IEEE Internet Computing, 14:80–83, November 2010.
[47]
T. Van Cutsem and M. S. Miller. Proxies: Design Principles for Robust Object-oriented Intercession APIs. In Proc. of DLS ’10, pages 59–72, 2010.
[48]
N. Viennot, M. Lécuyer, J. Bell, R. Geambasu, and J. Nieh. Synapse: A microservices architecture for heterogeneousdatabase web applications. In Proc. of EuroSys ’15, pages 21:1–21:16, 2015.
[49]
C. Wimmer and T. Würthinger. Truffle: a self-optimizing runtime system. In Proc. of SPLASH ’12, pages 13–14, 2012.
[50]
M. Zaharia, M. Chowdhury, T. Das, A. Dave, J. Ma, M. Mc-Cauley, M. J. Franklin, S. Shenker, and I. Stoica. Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing. In Proc. of NSDI ’12, pages 2–2, 2012.

Cited By

View all
  • (2022)A Comprehensive Exploration of Languages for Parallel ComputingACM Computing Surveys10.1145/348500855:2(1-39)Online publication date: 18-Jan-2022
  • (2018)SPMP: A JavaScript Support for Shared Persistent Memory on Node.jsAlgorithms and Architectures for Parallel Processing10.1007/978-3-030-05054-2_28(354-366)Online publication date: 7-Dec-2018
  • (2021)Race Detection for Event-Driven Node.js Applications2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678814(480-491)Online publication date: Nov-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 51, Issue 10
OOPSLA '16
October 2016
915 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/3022671
Issue’s Table of Contents
  • cover image ACM Conferences
    OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
    October 2016
    915 pages
    ISBN:9781450344449
    DOI:10.1145/2983990
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2016
Published in SIGPLAN Volume 51, Issue 10

Check for updates

Author Tags

  1. Generic Messages
  2. JavaScript
  3. Node.js

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)1
Reflects downloads up to 18 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2022)A Comprehensive Exploration of Languages for Parallel ComputingACM Computing Surveys10.1145/348500855:2(1-39)Online publication date: 18-Jan-2022
  • (2018)SPMP: A JavaScript Support for Shared Persistent Memory on Node.jsAlgorithms and Architectures for Parallel Processing10.1007/978-3-030-05054-2_28(354-366)Online publication date: 7-Dec-2018
  • (2021)Race Detection for Event-Driven Node.js Applications2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678814(480-491)Online publication date: Nov-2021
  • (2019)Detecting atomicity violations for event-driven Node.js applicationsProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00073(631-642)Online publication date: 25-May-2019
  • (2018)SPMP: A JavaScript Support for Shared Persistent Memory on Node.jsAlgorithms and Architectures for Parallel Processing10.1007/978-3-030-05054-2_28(354-366)Online publication date: 7-Dec-2018

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media