Abstract
JavaScript is widely used for scripting on client side. Node.js is a JavaScript runtime environment, allowing Javascript to be used for building scalable network applications on server side. However, Node.js does not support parallel programming, making it difficult to enhance applications’ performance. Meanwhile, persistent memory (PM) shows optimistic prospects of being used in server-side applications, while few researches do exist in allowing script languages to support PM-based parallel programming. In this paper, we introduce SPMP, a JavaScript support for shared persistent memory on Node.js. With SPMP, each process needs to hold PersistentArrayBuffer, an object that is responsible for allocating, managing, and accessing persistent memory. Multiple processes can then share persistent memory and communicate each other by their PersistentArrayBuffer objects. Furthermore, SPMP supports dynamic load-balancing strategies and ensures data coherency, and also supports data persistence in a secondary storage. We have evaluated SPMP against Extended Memory Semantics (EMS, a state-of-the-art model for parallel programming on Node.js) on two data-intensive tasks. The results show that SPMP is \(100\sim 300\times \) faster than EMS on five basic operations, and \(2\times \) faster on complicated parallel computing tasks such as counting words, due to its particular way on memory allocation and mapping.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Diehl, S.T.: System and method for persistent ram disk. US Patent 7,594,068, 22 September 2009
Burr, G.W., et al.: Recent progress in phase-change memory technology. IEEE J. Emerg. Sel. Top. Circuits Syst. 6(2), 146–162 (2016)
Kültürsay, E., Kandemir, M., Sivasubramaniam, A., Mutlu, O.: Evaluating STT-RAM as an energy-efficient main memory alternative. In: 2013 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), pp. 256–267. IEEE (2013)
Gharachorloo, K., Lenoski, D., Laudon, J., Gibbons, P., Gupta, A., Hennessy, J.: Memory consistency and event ordering in scalable shared-memory multiprocessors, vol. 18. ACM (1990)
Mogill, J.A.: Extended memory semantics (2017). http://syntheticsemantics.com/EMS.js
Shan, Y., Tsai, S.Y., Zhang, Y.: Distributed shared persistent memory. In: Proceedings of the 2017 Symposium on Cloud Computing, pp. 323–337. ACM (2017)
Selakovic, M., Pradel, M.: Performance issues and optimizations in Javascript: an empirical study. In: Proceedings of the 38th International Conference on Software Engineering, pp. 61–72. ACM (2016)
GoogleDevelopers: V8 engine (2018). https://developers.google.com/v8/
Mozilla: Spidermonkey engine (2018). https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
Webkit: FTL JIT (2014). https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/
Tilkov, S., Vinoski, S.: Node. js: using javascript to build high-performance network programs. IEEE Internet Comput. 14(6), 80–83 (2010)
Verdu, J., Pajuelo, A.: Performance scalability analysis of javascript applications with web workers. IEEE Comput. Archit. Lett. 15(2), 105–108 (2016)
Lester, B.P.: The art of parallel programming. In: A Logical Calculus of the Ideas Immanent in Nervous Activity (1993)
Intel: The persistent memory development kit (2018). http://pmem.io/
Frigo, M., Halpern, P., Leiserson, C.E., Lewin-Berlin, S.: Reducers and other cilk++ hyperobjects. In: SPAA 2009: Proceedings of the ACM Symposium on Parallelism in Algorithms and Architectures, Calgary, Alberta, Canada, August, pp. 79–90 (2009)
Bonetta, D., Salucci, L., Marr, S., Binder, W.: Gems: shared-memory parallel programming for Node.js. In: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 531–547. ACM (2016)
Herhut, S., Hudson, R.L., Shpeisman, T., Sreeram, J.: Parallel programming for the web. In: USENIX Conference on Hot Topics in Parallelism, p. 1 (2012)
Acknowledgements
We thank the anonymous reviewers for their feedbacks and suggestions. This work is supported by the National Key Research and Development Program of China (No. 2018YFB10033002) and the National Natural Science Foundation of China (No. 61472241, 61572312). This work was also partially supported by Shanghai Municipal Commission of Economy and Informatization (No. 201701052).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Zhang, Q., Li, T., Deng, P., Chen, Y., Huang, L., Rudoff, A. (2018). SPMP: A JavaScript Support for Shared Persistent Memory on Node.js. In: Vaidya, J., Li, J. (eds) Algorithms and Architectures for Parallel Processing. ICA3PP 2018. Lecture Notes in Computer Science(), vol 11335. Springer, Cham. https://doi.org/10.1007/978-3-030-05054-2_28
Download citation
DOI: https://doi.org/10.1007/978-3-030-05054-2_28
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-05053-5
Online ISBN: 978-3-030-05054-2
eBook Packages: Computer ScienceComputer Science (R0)