Next Article in Journal
Design Space Exploration of Antenna Impedance and On-Chip Rectifier for Microwave Wireless Power Transfer
Next Article in Special Issue
System for Semi-Automated Literature Review Based on Machine Learning
Previous Article in Journal
Application of a 3D Scanner in Robotic Measurement of Aviation Components
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Complementing JavaScript in High-Performance Node.js and Web Applications with Rust and WebAssembly

by
Kyriakos-Ioannis D. Kyriakou
and
Nikolaos D. Tselikas
*
Communication Networks and Applications Laboratory, Department of Informatics and Telecommunications, University of Peloponnese, 221 00 Tripoli, Greece
*
Author to whom correspondence should be addressed.
Electronics 2022, 11(19), 3217; https://doi.org/10.3390/electronics11193217
Submission received: 6 September 2022 / Revised: 25 September 2022 / Accepted: 1 October 2022 / Published: 7 October 2022
(This article belongs to the Special Issue Advanced Web Applications)

Abstract

We examine whether the novel systems programming language named Rust can be utilized alongside JavaScript in Node.js and Web-based applications development. The paper describes how JavaScript can be used as a high-level scripting language in combination with Rust in place of C++ in order to realize efficiency and be free of race conditions as well as memory-related software issues. Furthermore, we conducted stress tests in order to evaluate the performance of the proposed architecture in various scenarios. Rust-based implementations were able to outperform JS by 1.15 by over 115 times across the range of measurements and overpower Node.js’s concurrency model by 14.5 times or more without the need for fine-tuning. In Web browsers, the single-thread WebAssembly implementation outperformed the respective pure JS implementation by about two to four times. WebAssembly executed inside of Chromium compared to the equivalent Node.js implementations was able to deliver 93.5% the performance of the single-threaded implementation and 67.86% the performance of the multi-threaded implementation, which translates to 1.87 to over 24 times greater performance than the equivalent manually optimized pure JS implementation. Our findings provide substantial evidence that Rust is capable of providing the low-level features needed for non-blocking operations and hardware access while maintaining high-level similarities to JavaScript, aiding productivity.
Keywords: Node.js; JavaScript; Rust; WebAssembly; web software; scalability; software performance evaluation; software convergence; software interoperability Node.js; JavaScript; Rust; WebAssembly; web software; scalability; software performance evaluation; software convergence; software interoperability

Share and Cite

MDPI and ACS Style

Kyriakou, K.-I.D.; Tselikas, N.D. Complementing JavaScript in High-Performance Node.js and Web Applications with Rust and WebAssembly. Electronics 2022, 11, 3217. https://doi.org/10.3390/electronics11193217

AMA Style

Kyriakou K-ID, Tselikas ND. Complementing JavaScript in High-Performance Node.js and Web Applications with Rust and WebAssembly. Electronics. 2022; 11(19):3217. https://doi.org/10.3390/electronics11193217

Chicago/Turabian Style

Kyriakou, Kyriakos-Ioannis D., and Nikolaos D. Tselikas. 2022. "Complementing JavaScript in High-Performance Node.js and Web Applications with Rust and WebAssembly" Electronics 11, no. 19: 3217. https://doi.org/10.3390/electronics11193217

APA Style

Kyriakou, K.-I. D., & Tselikas, N. D. (2022). Complementing JavaScript in High-Performance Node.js and Web Applications with Rust and WebAssembly. Electronics, 11(19), 3217. https://doi.org/10.3390/electronics11193217

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop