Advertisement

SPMP: A JavaScript Support for Shared Persistent Memory on Node.js

  • Qipeng Zhang
  • Tianyou Li
  • Pan Deng
  • Yuting Chen
  • Linpeng Huang
  • Andy Rudoff
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11335)

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.

Keywords

Node.js Parallel programming Shared persistent memory 

Notes

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).

References

  1. 1.
    Diehl, S.T.: System and method for persistent ram disk. US Patent 7,594,068, 22 September 2009Google Scholar
  2. 2.
    Burr, G.W., et al.: Recent progress in phase-change memory technology. IEEE J. Emerg. Sel. Top. Circuits Syst. 6(2), 146–162 (2016)CrossRefGoogle Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    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)CrossRefGoogle Scholar
  5. 5.
    Mogill, J.A.: Extended memory semantics (2017). http://syntheticsemantics.com/EMS.js
  6. 6.
    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)Google Scholar
  7. 7.
    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)Google Scholar
  8. 8.
    GoogleDevelopers: V8 engine (2018). https://developers.google.com/v8/
  9. 9.
  10. 10.
  11. 11.
    Tilkov, S., Vinoski, S.: Node. js: using javascript to build high-performance network programs. IEEE Internet Comput. 14(6), 80–83 (2010)CrossRefGoogle Scholar
  12. 12.
    Verdu, J., Pajuelo, A.: Performance scalability analysis of javascript applications with web workers. IEEE Comput. Archit. Lett. 15(2), 105–108 (2016)CrossRefGoogle Scholar
  13. 13.
    Lester, B.P.: The art of parallel programming. In: A Logical Calculus of the Ideas Immanent in Nervous Activity (1993)Google Scholar
  14. 14.
    Intel: The persistent memory development kit (2018). http://pmem.io/
  15. 15.
    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)Google Scholar
  16. 16.
    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)Google Scholar
  17. 17.
    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)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Qipeng Zhang
    • 1
  • Tianyou Li
    • 2
  • Pan Deng
    • 2
  • Yuting Chen
    • 1
  • Linpeng Huang
    • 1
  • Andy Rudoff
    • 3
  1. 1.Shanghai Jiao Tong UniversityShanghaiChina
  2. 2.Intel Asia Pacific R&D Co. LTDShanghaiChina
  3. 3.Intel CorporationSanta ClaraUSA

Personalised recommendations