Skip to main content

Module process_function

Module process_function 

Source
Expand description

Keyed process functions with engine-owned state and timers.

The engine owns every value and timer. A handler receives immutable activation snapshots and returns proposed changes; its private memory is never authoritative. Native handlers execute on the compute thread and must be trusted, bounded, and nonblocking. The optional remote transport is restricted to loopback workers on each database host. At-least-once delivery admits trusted native Rust and remote Rust with one replayable source that reproduces one physical channel in fixed batches. Each batch defines a reproducible event-time cut; independent-channel merging remains unadmitted. Cluster execution additionally requires splittable placement and the same immutable binding in every owner’s sealed startup catalog. Supervised replay-safe Python also requires an unprivileged Linux worker in a read-only root image. Exactly-once process delivery is unsupported.

Modules§

benchmark
Benchmark fixtures for native processing and private cluster execution hooks.
remote
Bounded Arrow IPC over a versioned gRPC control stream.

Structs§

ProcessActivation
One engine-assigned activation. Local id values follow the checkpointed operator sequence. Private cluster execution encodes a checkpointed vnode sequence and its fixed vnode index; replay identity requires the same callback order within that vnode. The key is the canonical partition ABI encoding and must never be rehashed by the handler. Preserving these IDs also requires the same watermark cuts relative to input and timer callbacks. V1 does not certify deterministic replay of an independent-channel merge.
ProcessActivationResult
Proposed result for one activation. The engine validates the complete handler response before applying any result in that invocation batch.
ProcessFunctionDescriptor
Immutable, versioned binding for one process function. The initial state codec is an optional signed 64-bit value; a present null is distinct from absent state.
ProcessFunctionInfo
Registered function and its input/output stream binding.
ProcessFunctionLimits
Per-function bounds, enforced before accepting a handler response.
PythonEnvironmentBinding
Versioned file-tree binding for a supervised Python deployment. Absolute installation paths are excluded so an identical package can move without changing checkpoint identity.

Enums§

ProcessCallback
An input row or a named event-time timer callback.
ProcessDeterminism
Reviewed handler contract, independent of the pipeline’s delivery guarantee.
ProcessRuntime
Execution boundary bound by the function manifest.
TimerOperation
Named event-time timer operation, applied with its activation’s state transition.
ValueMutation
Explicit state transition; an output without a mutation leaves state unchanged.
ValueState
Immutable view of a declared value before one activation’s transition.

Traits§

NativeProcessFunction
Trusted, synchronous native handler. A call contains at most one activation for each key. The handler may vectorize over distinct keys but must not make one key’s result depend on unrelated batch members or their order. Return one result per activation, including those producing zero rows. Errors discard the entire unaccepted call.