Hi team 👋
I would really appreciate your review on a new feature series under FLINK-38825 – AI-friendly Async Batch Operator for high-latency inference workloads.
This is an incremental PR series introducing batch-oriented async processing into Flink’s DataStream API. The goal is to provide a minimal, extensible foundation for ML inference and other high-latency remote services.
PR Overview
1️⃣ #27355 – Introduce AsyncBatchFunction and AsyncBatchWaitOperator
Adds AsyncBatchFunction (PublicEvolving API)
Introduces AsyncBatchWaitOperator (unordered, size-based batch triggering)
Adds AsyncDataStream.unorderedWaitBatch(...) entry point
Fully backward-compatible and minimal scope
2️⃣ #27356 – Add time-based batch triggering
Supports timeout-based flushing of incomplete batches
Prevents long-tail latency under low throughput scenarios
3️⃣ #27357 – Add ordered async batch support
Adds ordered output semantics
Introduces OrderedAsyncBatchWaitOperator with sequence tracking
4️⃣ #27358 – Add inference-oriented metrics
Batch size and latency histograms
Async invocation duration metrics
Inflight batch counters and failure metrics
5️⃣ #27359 – Implement retry and timeout strategies
Fixed-delay & exponential backoff retry
Configurable timeout handling (fail / allow partial)
6️⃣ #27360 – Add SQL/Table API integration
Introduces AsyncBatchLookupFunction
Integrates with lookup join execution
7️⃣ #27361 – Add Python DataStream API integration
Python AsyncBatchFunction
async_invoke_batch() support
Python-side DataStream wiring
Why this matters
Improves throughput for ML/GPU/remote inference workloads
Keeps API surface small and incrementally extensible
Fully additive and backward-compatible
Aligns with Flink’s async processing model
If you have bandwidth this week, I’d really value feedback on API design, operator semantics, and extensibility considerations.
Thanks a lot 🙏