WebAssembly performance in the Node.js environment

Cover Page

Cite item

Full Text

Abstract

Modern runtime environments such as browsers, Node.js, and others provide developers with tools that go beyond traditional JavaScript. This study focuses on a modern approach to building web applications where components written in different programming languages can be executed and shared using WebAssembly. The subject of the research is the testing and analysis of performance benchmarks comparing JavaScript and WebAssembly modules in the Node.js runtime. The focus is on evaluating performance in computational tasks, memory interaction, data processing, and cross-language communication. The author thoroughly explores topics such as WebAssembly integration in applications, its advantages for resource-intensive tasks like image processing, and the objectivity, representativeness, and reproducibility of the tests. The work follows an applied, experimental approach. It includes performance comparisons between pure JavaScript and WebAssembly modules. Metrics like response time and system resource consumption were used to assess efficiency. The scientific novelty of this work lies in the development and theoretical grounding of testing approaches for web applications using WebAssembly. Unlike most existing studies focused on WebAssembly's performance and security in browser environments, this work emphasizes automated testing of WebAssembly modules outside the browser — a relatively unexplored area until now. A methodological approach is proposed for testing WebAssembly modules in Node.js, including principles for test structuring, integration with JavaScript components, and execution analysis. This approach takes into account the specifics of the server environment, where WebAssembly is increasingly used — particularly for high-load computational modules, cross-language logic, and secure isolated execution. The novelty also lies in defining criteria to evaluate whether certain application components are suitable for migration to WebAssembly in terms of testability, providing developers with a tool for making architectural decisions. The proposed ideas are backed by experimental results, including test case implementations for WebAssembly and JavaScript interaction scenarios.

References

  1. Stefan Fredriksson. WebAssembly vs. its predecessors: A comparison of technologies // diva-portal.org. Jul. 25, 2020. URL: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1460603&dswid=-4940 (дата обращения 07.04.2025).
  2. Marcus Alevärn. Server-side image processing in native code compared to client-side image processing in WebAssembly // diva-portal.org. Jul 27, 2021. URL: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1587964&dswid=-8296 (дата обращения 07.04.2025).
  3. Репозиторий с исходным кодом проекта. URL: https://github.com/Winter4/image-processor-backend (дата обращения 07.04.2025).
  4. Kirill Smelyakov. Efficiency of image convolution // ieee.org. Sep 8, 2019. URL: https://doi.org/10.1109/CAOL46282.2019.9019450 (дата обращения 07.04.2025).
  5. Aravind Samy Shanmugam. Docker Container Reactive Scalability and Prediction of CPU Utilization Based on Proactive Modelling // ncirl.ie. Sep 13, 2017. URL: https://norma.ncirl.ie/2884/1/aravindsamyshanmugam.pdf (дата обращения 07.04.2025).
  6. Xinchen Xu, Aidong Xu. Research on Security Issues of Docker and Container Monitoring System in Edge Computing System // iopscience.iop.org. Sep 27, 2020. URL: https://doi.org/10.1088/1742-6596/1673/1/012067 (дата обращения 07.04.2025).
  7. Matti Holopainen. Monitoring Container Environment with Prometheus and Grafana // theseus.fi. May 3, 2021. URL: https://www.theseus.fi/bitstream/handle/10024/497467/Holopainen_Matti.pdf (дата обращения 07.04.2025).
  8. Bahrami Sepide. Automated Performance Testing in Ephemeral Environments // thesis.unipd.it. Jul 9, 2024. URL: https://thesis.unipd.it/handle/20.500.12608/66511 (дата обращения 07.04.2025).
  9. David Reis. Developing Docker and Docker-Compose Specifications: A Developers' Survey // ieee.org. Dec 22, 2021. URL: https://doi.org/10.1109/ACCESS.2021.3137671 (дата обращения 07.04.2025).
  10. Adeel Ehsan. RESTful API Testing Methodologies: Rationale, Challenges, and Solution Directions // mdpi.com. Apr 26, 2022. URL: https://doi.org/10.3390/app12094369 (дата обращения 07.04.2025).
  11. Веб-ресурс, сборник различных тестовых файлов. URL: https://examplefile.com (дата обращения 07.04.2025).
  12. Mark van dek Wilk. Convolutional Gaussian Processes // proceedings.neurips.cc. 2017. URL: https://proceedings.neurips.cc/paper/2017/hash/1c54985e4f95b7819ca0357c0cb9a09f-Abstract.html (дата обращения 07.04.2025).
  13. Linus Hellberg. Performance evaluation of Web Workers API and OpenMP // diva-portal.org. Jul 6, 2022. URL: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A1681349&dswid=-9566 (дата обращения 07.04.2025).
  14. Philip Lassen. WebAssembly Backends for Futhark // futhark-lang.org. June 29, 2021. URL: https://futhark-lang.org/student-projects/philip-msc-thesis.pdf (дата обращения 07.04.2025).

Supplementary files

Supplementary Files
Action
1. JATS XML

Согласие на обработку персональных данных

 

Используя сайт https://journals.rcsi.science, я (далее – «Пользователь» или «Субъект персональных данных») даю согласие на обработку персональных данных на этом сайте (текст Согласия) и на обработку персональных данных с помощью сервиса «Яндекс.Метрика» (текст Согласия).