Function-as-a-Service (FaaS) is an event-driven serverless cloud computing model in which small, stateless functions are invoked in response to events, such as HTTP requests, new database entries, or messages. Current FaaS platform assume that each function invocation corresponds to a single event. However, from an application perspective, it is desirable to invoke functions in response to a collection of events of different types or only with every n\textsuperscript{th} event. To implement this today, a function would need additional state management, e.g., in a database, and custom logic to determine whether its trigger condition is fulfilled and the actual application code should run. In such an implementation, most function invocations would be rendered essentially useless, leading to unnecessarily high resource usage, latency, and cost for applications. In this paper, we introduce multi-event triggers, through which complex conditions for function invocations can be specified. Specifically, we introduce abstractions for invoking functions based on a set of $n$ events and joins of multiple events of different types. This enables application developers to define intricate conditions for function invocations, workflow steps, and complex event processing. Our evaluation with a proof-of-concept prototype shows that this reduces event--invocation latency by 62.5\% in an incident detection use-case and that our system can handle more than 300,000 requests per second on limited hardware, which is sufficient load for implementation in large FaaS platforms.
Function-as-a-Service (FaaS) is an event-driven serverless cloud computing model in which small stateless functions are invoked in response to events such as HTTP requests, new database entries, or messages. Current FaaS platforms assume that each function invocation corresponds to a single event. However, from an application perspective, it is desirable for functions to respond to collections of different event types or to be invoked only on every nth event. To achieve this, functions require additional state management (e.g., databases) and custom logic to determine whether trigger conditions are satisfied. This paper proposes multi-event triggers (MET), which enable the specification of complex function invocation conditions. Evaluation results demonstrate that in an event detection use case, this approach reduces event-to-invocation latency by 62.5%, and the system can handle over 300,000 requests/second on limited hardware.
Current FaaS platforms have a fundamental limitation: each function invocation can only respond to a single event. However, practical applications frequently require more complex triggering patterns:
Fan-in/Join Pattern: Requires collecting multiple different types of events before triggering a function
Count-based Triggering: Triggers a function only after receiving n events
Complex Conditional Triggering: Based on AND/OR combinations of event types and quantities
To maintain the advantages of the FaaS programming model (loose coupling, automatic scaling, ease of development), multi-event triggering logic should be integrated into the FaaS platform's triggering mechanism rather than requiring application developers to handle it manually.
Proposes the Multi-Event Trigger Concept: Extends the FaaS function triggering mechanism to support complex triggering conditions based on event collections
Designs the MET Engine Architecture: Proposes a multi-event trigger engine design that can be integrated into existing FaaS platforms
Develops a Prototype System: Implements a proof-of-concept prototype demonstrating the feasibility of the design
Performance Evaluation: Validates the potential and performance of multi-event triggers in an event detection use case
Multi-event triggers allow developers to define complex triggering rules that specify when functions should be invoked based on specific event combination conditions. Triggering rules consist of event types and corresponding counts, supporting combinations of AND and OR conditions.
This paper's approach is unique in that functions are only invoked when complete triggering conditions are satisfied, reducing unnecessary executions and avoiding the need for locking mechanisms to handle race conditions.
Geographic Distribution Constraints: Current design focuses on multi-node single-datacenter setups, unsuitable for geographically distributed multi-event triggers
NOT Condition Unsupported: Cannot guarantee that certain event types have not been received in distributed environments, thus NOT conditions are unsupported
Event Synchronization Issues: Requires addressing event loss and synchronization issues caused by sensor failures
The paper cites 34 related references, primarily covering:
FaaS platforms and triggering mechanism research
Serverless workflow orchestration
State management and complex event processing
Performance evaluation and benchmarking
Key references include AWS Lambda architecture analysis, serverless computing surveys, and related workflow orchestration systems.
This paper proposes an innovative solution to an important limitation of FaaS platforms with strong theoretical and practical value. The MET engine design balances performance and scalability, with comprehensive experimental evaluation validating the solution's effectiveness. While there is room for improvement in geographic distribution and fault tolerance, overall this is a high-quality research work.