Reactive tracing of behavioural scenarios in single-page applications by integrating Bun-based WebSocket channels and OpenTelemetry
Year: 2025
Type: article
Abstract: The purpose of this study was to evaluate the time efficiency of reactive tracing of user behaviour in single-page applications by integrating Bun-based WebSocket channels with OpenTelemetry. The methodology included creating a prototype application in React, high-frequency monitoring and aggregation of SCADA data, building and optimising a 64-32-16 neural network in TensorFlow, simulations in MATLAB/Simscape, and statistical analysis using Theil-Sen regression, Seasonal and Trend decomposition, Brown-Forsyth test, two-factor analysis of variance, bootstrap permutation, Dickey-Fuller test, and Kaplan-Meier survival curves. The findings revealed that the combination of Hypertext Transfer Protocol with binary serialisation in Protocol Buffers format provided the lowest event detection latency, which averaged 45.09 milliseconds, and the lowest transmission latency, which reached only 62.83 milliseconds in the form-filling scenario. At the same time, the combination of websockets with JavaScript Object Notation text format demonstrated the highest latency, with an average event detection rate of 69.99 milliseconds and transmission latency of up to 88.1 milliseconds, as well as the highest variability in response time. Statistical analysis confirmed the substantial differences between all configurations: the results of the analysis of variance revealed extremely high F-statistics for both indicators with a p-value of less than 0.000001, indicating that both the protocol and the serialisation format have a real impact on the time efficiency. Additionally, the study found that the event detection delay and the transmission delay were independent variables, as the correlation coefficients stayed close to zero in all cases. Thus, the most suitable configuration for high-frequency telemetry systems was a hypertext protocol with a binary Protocol Buffers format, which ensures not only minimal time delays but also stability in loaded environments. The practical significance of the findings lies in the possibility of using them by performance engineers, front-end architects, and developers of monitoring systems to create efficient and scalable solutions focused on analysing user behaviour in real time
Authors: Vladyslav Ananchenko,, Yuriy Lotyuk
Language: English
Topic: Mobile and Web Applications
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W7125675378
FWCI:
Cites:
Cited by:
Related to:
