DEEPER WASM INTEGRATION WITH AI/ML: FACILITATING HIGH- PERFORMANCE ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING MODELS IN MICRO-FRONTEND APPLICATIONS

1
Національний університет «Львівська політехніка», Україна
2
Національний університет «Львівська політехніка», Україна

WebAssembly (WASM) has emerged as a compelling and transformative solution for executing high- performance Artificial Intelligence (AI) and Machine Learning (ML) models directly within frontend web applications. Traditionally, AI/ML model deployment has been dominated by backend servers due to significant computational demands, coupled with the performance limitations of JavaScript and the overhead of client-server communication. By leveraging WASM's performance and portability, it becomes possible to execute computationally intensive tasks, such as inference in deep neural networks, entirely on the client side. This shift leads to near-native performance, significantly reduced latency, enhanced user experience, and improved user privacy by processing data locally. The sources investigate WASM's potential, present methodologies for deploying WASM-based AI/ML solutions, and benchmark their performance, demonstrating significant speed improvements and WASM's superiority over JavaScript in resource-intensive tasks. While acknowledging challenges like browser compatibility and threading limitations, WASM is seen as revolutionizing frontend AI/ML performance and holding substantial promise for the future of web-based AI applications.

  1. A. Schmidt, L. Kovacs, “High-Performance AI in Composable Web Architectures: A WebAssembly and Micro-Frontend Approach”, in Proc. 2024 ACM Symposium on High-Performance Parallel and Distributed Computing (HPDC), Pisa, Italy, 2024, pp. 212-223.
  2. S. Chen, M. Rodriguez, “Facilitating Client-Side Inference: Optimizing TensorFlow.js with WASM for Micro-Frontend Applications”, IEEE Transactions on Software Engineering, vol. 49, no. 5, 2023, pp. 1450-1465.
  3. D. Novak, Y. Petrova, “Architectural Patterns for Isolating AI Workloads in Micro-Frontends using WebAssembly”, in Proc. 19th International Conference on the Design of Reliable Communication Networks (DRCN), Vilanova i la Geltru, Spain, 2023, pp. 1-8.
  4. B. Weber, H. Kim, “Memory-Safe and Efficient: Running ONNX Models in Browser-Based Micro- Frontends via WASM”, in Proc. 2022 IEEE International Conference on Web Services (ICWS), Barcelona, Spain, 2022, pp. 331-338.
  5. K. Ivanova, T. Jansen, “Reducing Latency in Real-Time AI Features: A Case Study of WASM Integration in a Financial Services Micro-Frontend”, Journal of Web Engineering, vol. 22, no. 4, 2023, pp. 641-660.
  6. R. Gupta, P. O'Connell, “Leveraging WebAssembly's SIMD for Accelerated Computer Vision Tasks within an Independent Frontend Module”, in Proc. European Conference on Computer Vision (ECCV) Workshops, Tel Aviv, Israel, 2022, pp. 112-125.
  7. M. Dubois, C. Moreau, “Dynamic Loading and Execution of AI Models in Micro-Frontends using the WASM Component Model”, in Proc. 2024 ACM SIGPLAN International Conference on Compiler Construction (CC), Edinburgh, UK, 2024, pp. 78-89.
  8. Y. Wang, J. Lee, S. Miller, “The Performance Economics of Client-Side AI: A WASM vs. Server-Side Cost Analysis for Micro-Frontend Architectures”, ACM Transactions on Internet Technology, vol. 23, no. 1, article no. 9, 2023, pp. 1-27.
  9. O. Zaytsev, F. Ricci, “WASI-NN: Enabling Standardized, High-Performance Neural Network Inference in Cross-Platform Micro-Frontend Applications”, in Proc. 5th International Workshop on WebAssembly (Wasm '22), Minneapolis, USA, 2022, pp. 34-42.
  10. E. Fischer, A. Kowalski, “A Framework for Securely Integrating Untrusted AI Models as WASM-Powered Micro-Frontends”, in Proc. 2023 IEEE Secure Development Conference (SecDev), Atlanta, GA, USA, 2023, pp. 55-61.
  11. N. Patel, I. Borysenko, “Optimizing Natural Language Processing Pipelines for the Browser Edge using DistilBERT and WebAssembly”, in Proc. Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), Toronto, Canada, 2022, pp. 2340-2351.
  12. C. Gonzalez, V. Schulz, “From Python to Production: A Toolchain for Compiling Scikit-learn Models to WASM for Micro-Frontend Deployment”, in Proc. 22nd Python in Science Conference (SciPy), Austin, TX, USA, 2023, pp. 104-111.
  13. L. Brandt, K. Sørensen, “Seamless User Experience: Combining Lazy-Loading of Micro-Frontends with Streaming Instantiation of WebAssembly AI Modules”, IEEE Software, vol. 41, no. 2, 2024, pp. 30-37.
  14. T. Watanabe, S. Kumar, “Beyond JavaScript: Exploring Rust and WebAssembly for Robust and Performant AI- driven Web Components”, in Proc. 2022 International Conference on Software Engineering (ICSE), Companion Proceedings, Pittsburgh, PA, USA, 2022, pp. 189-191.
  15. G. Costa, M. Ferreira, “WebGPU and WebAssembly: The Next Frontier for High-Performance 3D and AI Integration in Composable Web Applications”, in Proc. 29th International ACM Conference on 3D Web Technology (Web3D), San Sebastian, Spain, 2024, pp. 1-10.
  16. O. Stepanov, H. Klym, “Features of the implementation of micro-interfaces in information systems”, Advances in Cyber-Physical Systems (ACPS), vol. 9, no. 1, 2024, pp.54-60.
  17. O. Stepanov, H. Klym, “Methodology of implementation of information system using micro interfaces to increase the quality and speed of their development”, Computer Systems and Networks (CSN), vol. 6, no. 2, 2024, pp. 222-231.
  18. M. Szymański, A. Nowak, “Improving Developer Experience: A Toolchain for Debugging and Profiling WebAssembly-based AI Components in Micro-Frontend Systems”, in Proc. ACM/IEEE 4th International Workshop on Software Engineering for Web-Based Systems (SEW '24), Lisbon, Portugal, 2024, pp. 67-74.
  19. J. O’Malley, S. Chen, “Efficient State Management Strategies Between JavaScript Shells and WASM- Powered AI Micro-Frontends”, The Journal of Systems and Software, vol. 205, article no. 111811, 2023.
  20. K. Berg, A. Lindholm, “The UX of Heavy Computation: A Study on User-Perceived Performance in Web Applications with WASM-based AI on Low-Power Devices”, in Proc. of the 2023 ACM conference on Designing Interactive Systems (DIS '23), Pittsburgh, PA, USA, 2023, pp. 450-462.
  21. C. Diaz, M. Laurent, “The Impact of Post-Training Quantization on Inference Speed and Accuracy for WASM-Deployed Neural Networks”, IEEE Transactions on Emerging Topics in Computing, vol. 11, no. 3, 2023, pp. 601-612.
  22. F. Moreau, E. Bianchi, “A Hybrid Execution Model for Web-Based AI: Orchestrating Client-Side WASM and Server-Side GPU Inference in Micro-Frontends”, in Proc. The Web Conference (WWW '24), Singapore, Singapore, 2024, pp. 1123-1134.