使用 WebAssembly 打造多語言適用之函式即服務框架

A Study on Building a Polyglot FaaS Framework with WebAssembly

檔案

日期

2024

類型

語言

英文

摘要

隨著雲端運算的普及,應用程式開發和部署進入了一個新的時代。無伺服器運算,亦稱為FaaS(函式即服務),是一種抽象底層資源的雲端執行模式,因其自動擴展和高效的資源利用而受到廣泛青睞。然而,目前一些主流的雲端服務提供者(CSP),例如AWS Lambda和Azure Functions,主要採用Docker容器技術,經常面臨冷啟動時間過長以及程式語言支援有限的挑戰。本研究旨在探索WebAssembly(以下簡稱WASM)的潛力,嘗試是否能找到方案來解決或改善上述問題。

WASM是一種可攜式的二進制格式,能在多種環境中安全且高效地執行。透過將WASM技術融入無伺服器架構,本學位論文研究提出一個高效能、與程式語言無關的框架,並運用該框架來實現程式碼生成基礎設施(IfC)的概念。本研究進行了幾個小型的無縫部署案例,包括在AWS雲端平台上運行多種程式語言(如Rust、Go、Python)的工作負載,並對比分析冷啟動時間和現有解決方案的差異。

本研究結果顯示,雖然WASM在某些計算密集的應用上顯示出良好的效能,特別是在Rust和Go等編譯型語言中,然而在Python和JavaScript等直譯語言中,冷啟動時間表現不如Docker。此外,本文也探討了若干WebAssembly應用於無伺服器運算的挑戰,例如語言綁定的效率與WASM模組大小對於啟動效能的影響。

本研究的貢獻在於展示了WASM在雲端無伺服器運算中的應用潛力,並為未來WebAssembly在多語言無伺服器框架上的應用奠定基礎。同時,本文亦探討了程式碼生成基礎設施(IfC)在簡化部署流程及自動化資源配置上的可能性,期望能進一步促進雲端原生應用的發展。
The rise of cloud computing has ushered in a new era for application development and deployment. Serverless computing, also known as Function as a Service (FaaS), is a cloud execution model that abstracts underlying resources, offering automatic scalability and efficient resource utilization. However, leading cloud service providers (CSPs) such as AWS Lambda and Azure Functions primarily utilize Docker containers, which often suffer from long cold start times and limited language support. This study aims to explore the potential of WebAssembly (hereafter referred to as WASM) and investigate possible solutions to mitigate these challenges.

WASM is a portable binary format designed for efficient and secure execution across various environments. By integrating WASM technology into serverless architecture, this thesis proposes a high-performance, language-agnostic framework that leverages the concept of Infrastructure from Code (IfC) for seamless deployments. Through several small-scale deployment cases on AWS, this study demonstrates workloads in multiple programming languages (e.g., Rust, Go, Python) and compares cold start latency with existing solutions.

The findings indicate that, while WASM shows promising performance for compute-intensive tasks, particularly with compiled languages like Rust and Go, it does not yet match Docker's performance in terms of cold start times for interpreted languages such as Python and JavaScript. This study also highlights several challenges, such as the efficiency of language bindings and the impact of WASM module size on startup performance.

The contributions of this research lie in demonstrating WASM's potential for cloud-based serverless computing and establishing a foundation for its application in a polyglot serverless framework. Furthermore, this thesis explores the feasibility of IfC in simplifying deployment processes and automating resource configuration, with the goal of advancing cloud-native application development.
顯示完整詮釋資料 統計資料

引用此條目

Wu, H.-H. (2024). A Study on Building a Polyglot FaaS Framework with WebAssembly. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/4517

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/4517