Skip to main content
Version: Current

Engines

An engine is the runtime technology that executes a scenario.

Engine is one of the three dimensions described in How Nussknacker runs, alongside the processing mode and the deployment target.

The processing mode describes how a scenario handles data. The engine determines the runtime capabilities available while executing that scenario. The deployment target determines where and how that engine is run.

Nussknacker supports two engines:

  • Lite — Nussknacker's lightweight engine.
  • Flink — an engine based on Apache Flink.

Choosing an engine

The most important difference between the engines is stateful processing.

Processing modeLiteFlink
StreamingSupported — statelessSupported — stateful
Request-responseSupportedNot supported

Batch processing is planned and will use the Flink engine.

For streaming scenarios, the choice of engine depends mainly on whether the scenario needs to keep state between events.

Use Lite when each record can be processed independently, or when any required history or shared state can be obtained from external systems.

Use Flink when the scenario needs state maintained by the engine itself, for example to:

  • aggregate records over time,
  • work with time windows,
  • correlate events,
  • de-duplicate records,
  • detect patterns,
  • remember values from previously processed events.

Flink also provides the state management and recovery mechanisms required for this kind of long-running stateful processing.

Lite engine

Lite is Nussknacker's lightweight engine for stateless processing.

It supports:

  • Streaming scenarios that do not keep state between records.
  • Request-response scenarios, where one request is processed and one response is returned.

Because Lite does not maintain scenario state between records, scenarios that need historical or shared information typically obtain it from external systems, for example through enrichers.

Lite can run on different deployment targets, including an engine embedded in Designer or a Kubernetes-based target.

The Flink engine uses Apache Flink to execute stateful streaming scenarios.

It is intended for scenarios where processing depends on information accumulated across events or on event-time semantics. Typical examples include time-window aggregations, joins, deduplication, pattern detection, and other operations that require managed state.

Flink can run on different deployment targets, including an engine embedded in Designer, a customer-operated Flink cluster, or a managed Flink service.

Engine and deployment target are separate choices

An engine describes what technology executes a scenario. A deployment target describes where and how that engine runs.

For example, two scenarios using the Flink engine can be deployed to different Flink targets — such as an embedded Flink engine, a customer-operated cluster, or a managed Flink service — without changing the engine or the processing capabilities of the scenario.

Similarly, Lite scenarios can run on different Lite deployment targets.

Choosing a different deployment target changes where the scenario runs; it does not change the scenario's engine.