Serverless computing and stream processing represent two dominant paradigms for event-driven data processing, yet both make assumptions that render them inefficient for short-running, lightweight, and unpredictable streams that require stateful processing. We propose stream functions as a novel extension of the Function-as-a-Serivce model that treat short streams as the unit of execution, state, and scaling. Stream functions process streams via an iterator-based interface, enabling seamless inter-event logic while retaining the elasticity and scale-to-zero capabilities offered by serverless platforms. Our evaluation shows that stream functions reduce the processing overhead by ~99 % compared to a mature stream process- ing engine in a video-processing use case. By providing comparable performance to serverless functions with stream semantics, stream functions provide an effective and efficient abstractions for a class of workloads underserved by existing models.
翻译:无服务器计算与流处理是事件驱动数据处理的两种主流范式,但二者均基于某些假设,导致其在处理需要状态保持的短时、轻量、不可预测数据流时效率低下。我们提出流函数作为函数即服务模型的新型扩展,将短时数据流作为执行、状态和扩缩容的基本单元。流函数通过基于迭代器的接口处理数据流,在保持无服务器平台弹性与零扩展能力的同时,实现了事件间逻辑的无缝衔接。实验评估表明,在视频处理应用场景中,相较于成熟的流处理引擎,流函数可降低约99%的处理开销。通过以流语义实现与无服务器函数相当的性能表现,流函数为现有模型未能充分支持的一类工作负载提供了高效且有效的抽象方案。