Nothing Special   »   [go: up one dir, main page]

Skip to main content

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

  • Conference paper
  • First Online:
Algorithms and Architectures for Parallel Processing (ICA3PP 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11335))

  • 1789 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Diehl, S.T.: System and method for persistent ram disk. US Patent 7,594,068, 22 September 2009

    Google Scholar 

  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)

    Article  Google Scholar 

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

    Article  Google Scholar 

  5. Mogill, J.A.: Extended memory semantics (2017). http://syntheticsemantics.com/EMS.js

  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. 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. GoogleDevelopers: V8 engine (2018). https://developers.google.com/v8/

  9. Mozilla: Spidermonkey engine (2018). https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey

  10. Webkit: FTL JIT (2014). https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/

  11. Tilkov, S., Vinoski, S.: Node. js: using javascript to build high-performance network programs. IEEE Internet Comput. 14(6), 80–83 (2010)

    Article  Google Scholar 

  12. Verdu, J., Pajuelo, A.: Performance scalability analysis of javascript applications with web workers. IEEE Comput. Archit. Lett. 15(2), 105–108 (2016)

    Article  Google Scholar 

  13. Lester, B.P.: The art of parallel programming. In: A Logical Calculus of the Ideas Immanent in Nervous Activity (1993)

    Google Scholar 

  14. Intel: The persistent memory development kit (2018). http://pmem.io/

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

Download references

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

Authors

Corresponding author

Correspondence to Linpeng Huang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics