Table of Contents
Fetching ...

CWASI: A WebAssembly Runtime Shim for Inter-function Communication in the Serverless Edge-Cloud Continuum

Cynthia Marcelino, Stefan Nastic

TL;DR

CWASI tackles the bottleneck of inter-function data exchange in serverless workflows across the Edge-Cloud by introducing a locality-aware, three-mode inter-function communication model and a WebAssembly OCI-compliant shim. The approach selectively leverages Function Embedding, Local Buffer, or Networked Buffer modes based on function locality, enabling co-located functions to exchange data with minimal network overhead while preserving isolation. Empirical evaluation against baselines shows up to 95% latency reduction and up to 30x throughput gains, particularly in co-located scenarios, with explicit support implemented in Rust atop WasmEdge. The work advances practical edge-cloud serverless deployments by reducing reliance on remote storage and external message brokers, supporting more efficient, near-native data exchange across the continuum, and outlining avenues for broader runtime support and deployment models.

Abstract

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.

CWASI: A WebAssembly Runtime Shim for Inter-function Communication in the Serverless Edge-Cloud Continuum

TL;DR

CWASI tackles the bottleneck of inter-function data exchange in serverless workflows across the Edge-Cloud by introducing a locality-aware, three-mode inter-function communication model and a WebAssembly OCI-compliant shim. The approach selectively leverages Function Embedding, Local Buffer, or Networked Buffer modes based on function locality, enabling co-located functions to exchange data with minimal network overhead while preserving isolation. Empirical evaluation against baselines shows up to 95% latency reduction and up to 30x throughput gains, particularly in co-located scenarios, with explicit support implemented in Rust atop WasmEdge. The work advances practical edge-cloud serverless deployments by reducing reliance on remote storage and external message brokers, supporting more efficient, near-native data exchange across the continuum, and outlining avenues for broader runtime support and deployment models.

Abstract

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.
Paper Structure (35 sections, 9 figures, 2 tables, 3 algorithms)

This paper contains 35 sections, 9 figures, 2 tables, 3 algorithms.

Figures (9)

  • Figure 1: Serverless Workflow for Image Processing for Vehicle Path Reconstruction (simplified)
  • Figure 2: Overview of Edge-Cloud Serverless Platforms
  • Figure 3: CWASI Inter-function Communication Model
  • Figure 4: CWASI Shim Architecture Overview
  • Figure 5: Local Buffer Inter-function Communication
  • ...and 4 more figures