Serverless Computing brings advantages to the Edge-Cloud continuum, like simplified programming and infrastructure management. In composed workflows, where serverless functions need to exchange data constantly, serverless platforms rely on remote services such as object storage and key-value stores as a common approach to exchange data. In WebAssembly, functions leverage WebAssembly System Interface to connect to the network and exchange data via remote services. As a consequence, co-located serverless functions need remote services to exchange data, increasing latency and adding network overhead. To mitigate this problem, in this paper, we introduce CWASI: a WebAssembly OCI-compliant runtime shim that determines the best inter-function data exchange approach based on the serverless function locality. CWASI introduces a three-mode communication model for the Serverless Edge-Cloud continuum. This communication model enables CWASI Shim to optimize inter-function communication for co-located functions by leveraging the function host mechanisms. Experimental results show that CWASI reduces the communication latency between the co-located serverless functions by up to 95% and increases the communication throughput by up to 30x.
翻译:无服务器计算为边缘-云连续体带来了简化编程和基础设施管理等优势。在由多个无服务器函数组成的工作流中,当函数需要持续交换数据时,无服务器平台通常依赖对象存储和键值存储等远程服务作为数据交换的通用方案。在WebAssembly中,函数通过WebAssembly系统接口连接网络,并借助远程服务进行数据交换。这导致共置的无服务器函数必须通过远程服务交换数据,从而增加了延迟和网络开销。为缓解此问题,本文提出CWASI:一种符合OCI标准的WebAssembly运行时垫片,可根据无服务器函数的部署位置选择最优的函数间数据交换方式。CWASI为无服务器边缘-云连续体设计了三模式通信模型,该模型使CWASI垫片能够利用函数宿主机机制优化共置函数的通信性能。实验结果表明,CWASI可将共置无服务器函数间的通信延迟降低最高达95%,并将通信吞吐量提升最高达30倍。