Stateful Functions: An Open Source Framework for Lightweight, Stateful Applications at Scale

At Flink Forward Europe 2019, Stephan Ewen from ververica announced the release of Stateful Functions, an open-source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale. Stateful Functions brings together the benefits of stream processing with Apache Flink and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.

In this article, we will explain the motivation behind building Stateful Functions, and why we proposed the project to the Apache Flink community as an open-source contribution.

An Introduction to Temporal Data Handling With Apache Flink

Gone are the days when developers battled hard to figure out how to manage and model temporal data for effective point-in-time analysis. The introduction of temporal tables in the SQL standard, in 2011, made it easier to validate or enrich data against dynamically changing, historical datasets. Prior to that, users were doomed to implement this as part of the application logic, often hurting the length of the development lifecycle as well as the maintainability of the code.

For example: given a stream with Taxi Fare events tied to the local currency of the ride location, we might want to convert the fare price to a common currency for further processing. As conversion rates excel at fluctuating over time, each Taxi Fare event would need to be matched to the rate that was valid at the time the event occurred in order to produce a reliable result.