From SQL to code - and the missing authoring layer
In the previous article, I argued that Streaming SQL is not the right primary authoring tool for event-driven stream-based algorithms. Not because SQL is useless. It is useful, mature and natural for many streaming transformations. The problem starts when the logic is no longer mainly about deriving one relation from another, but about maintaining state, reacting to events, calling external systems, controlling when results are emitted and orchestrating decisions over time.
At that point, the usual answer is: use the Flink DataStream API.
Technically, that answer is correct. The DataStream API gives developers the expressive power missing from SQL. But it also moves the logic back into professional software development. The decision algorithm is no longer authored directly by the people who understand the business problem. It becomes Java or Scala code maintained by Flink developers.
That is the trap.
If the only choices are “SQL that cannot express the logic naturally” or “custom Flink code that requires specialized developers”, then real-time data will not get its spreadsheet moment. It will remain powerful, but narrow in adoption - much closer to the world before spreadsheets, where business logic lived inside programs written by professionals.
Nussknacker is our attempt to explore a different path: not SQL pretending to be enough, and not every decision algorithm implemented as bespoke Flink code. The idea is to expose real-time decision logic as reusable, composable and observable building blocks. Developers still matter: they create components, integrations and platform capabilities. But the everyday evolution of decision logic should not require dropping into the DataStream API.
Maybe this approach is right. Maybe it is incomplete. But the need for another authoring layer is real.
The rest of this article is a concrete test of that claim. I take ordinary building blocks of real-time decision systems - the kind used in fraud detection, recommendation, personalization, anomaly detection, streaming ML and real-time rating - and ask a simple question:
Can this be expressed naturally in Streaming SQL, or do we cross the boundary into custom Flink development?
Let’s start with the most basic operation of all: updating state.


Where this leaves us