Execution Safety ​
TPF keeps useful work flowing without treating resilience as a business-policy profile. Its safety mechanisms answer different questions:
- Backpressure: how much work may flow now?
- Paging: how much resumable source work may one transition own?
- Blocking adaptation: how much control remains after synchronous code enters the path?
- Circuit admission: should a known-unhealthy managed dependency invocation start at all?
Timeout bounds one started invocation. Retry and backoff decide whether a failed invocation is attempted again. A circuit-open rejection starts no invocation, so it is not a failed remote attempt.
What TPF Can Control ​
| Boundary | Guarantee |
|---|---|
| Fully reactive segment | TPF propagates demand through the segment where all participants preserve it. |
| Paged resumable source | TPF opens one bounded source slice at a pinned provider snapshot. Items still move only on downstream demand; a normally completed and released page may advance its opaque checkpoint. |
| Generated REST/gRPC invocation | TPF can preserve reactive demand where the transport path supports it and can reject the invocation through circuit admission. |
BlockingService and StepOneToOneBlocking | TPF offloads the synchronous call, but cannot control I/O or buffering hidden inside it. |
BlockingIteratorService and StepOneToManyBlockingIterator | TPF obtains iterator elements according to downstream demand. The iterator itself can still read ahead or perform eager work. |
| List and batch blocking bridges | BlockingStreamingService, BlockingStreamingClientService, BlockingBidirectionalStreamingService, StepOneToManyBlocking, StepManyToOneBlocking, and StepManyToManyBlocking materialize a list. They are not end-to-end flow controlled. |
BlockingIteratorPacer | An optional blocking emission-rate limiter. It is neither reactive demand propagation nor circuit admission. |
| Brokered durable await | TPF bounds unresolved provider interactions and preserves live-segment demand where possible. Its outbound dispatch is not yet a generic circuit boundary. |
| Command, checkpoint, and generic connector effects | TPF owns their execution lifecycle, but this release does not wrap them with circuit admission. |
BlockingQueryOperation and BlockingCommandOperation | TPF invokes the provider method on a worker and flattens its returned CompletionStage. |
SerializedOperation | TPF admits one provider invocation per connector binding and operation until its complete stage, or its row publisher plus provider-resource lifetime, terminates. |
| Queue-async transition worker | TPF can use circuit admission only with shared circuit protection and finite durable circuit deferral. |
Backpressure And Circuit Admission ​
Backpressure is valuable when a provider is slow: it stops upstream work from outrunning downstream capacity. It does not help a hard-down dependency that fails immediately:
call → connection refused
retry → connection refused
retry → connection refusedAt an eligible TPF-managed boundary, circuit admission records health-affecting failures and later rejects calls while the dependency is open. The rejection contains a notBefore scheduling hint; no remote call starts.
For queue-async transition work under shared protection, the durable scheduler uses that hint to defer the encountered execution. It does not scan or park unrelated executions, and the remote-attempt budget remains unchanged.
Reactive And Blocking Examples ​
Native Query and Command providers keep a JDK-only async API. An ordinary operation is invoked directly and may return an incomplete stage completed by its own executor or reactive client. A blocking specialization is invoked on a framework worker; provider code does not need Mutiny or a private offload executor. Combining BlockingOperation with SerializedOperation does not retain the worker while an incomplete stage is pending: blocking ownership ends when the invocation method returns, while the serialization gate remains until the stage terminates.
Serialization is scoped to (connector binding, operation ID, operation major version). A second binding is independent. Queued cancellation skips provider invocation; cancellation after admission is forwarded best-effort without releasing the gate before provider termination.
Finite streaming Query uses a JDK Flow.Publisher provider boundary. Demand and cancellation cross that boundary without requiring Mutiny in provider code. A blocking streaming operation uses a worker only to open its stream; serialization and resource ownership continue until both row and provider-resource termination. Providers must emit a deterministic total row order so retry resubscription recreates the same ONE_TO_MANY child identities.
A reactive streaming pipeline can slow source parsing when an await or downstream step has no demand. A BlockingIteratorService is different: TPF requests the next iterator item only when downstream asks, but the iterator implementation might have already loaded a page, buffered rows, or contacted a dependency. Prefer the iterator form over a list-returning blocking form when a synchronous library exposes a cursor or reader, but do not mistake it for full end-to-end backpressure.
Live Streaming, Paging, And Durable Stream Recovery ​
Live streaming controls pressure inside one running transition. Paging additionally limits the source records, replay scope, and remote-worker lifetime owned by that transition. A pipeline opts in on its first source-producing ONE_TO_MANY step with paging.maxRecords; the source provider owns its checkpoint format and validates a pinned snapshot each time a page opens.
The current page remains an ordinary demand-driven stream. Slow Await admission or downstream demand stops source requests. An admitted item may continue through Await and Object Publish before the page closes. Normal publisher completion and provider resource release make the page result eligible for a fenced commit; only that commit can queue the next page. Cancellation or failure leaves the start checkpoint unchanged, so confirmed owner loss replays that page without rereading completed pages.
Paging does not provide fine-grained durable takeover inside an open page. That stronger stream-region recovery remains a separate capability. A remote transition whose outcome is unknown retains the existing REMOTE_OUTCOME_UNKNOWN rule.
Circuit admission cannot protect user-written outbound calls hidden in any blocking or reactive business method. Put that I/O behind a TPF-managed transport boundary when the framework must own circuit admission, retry, telemetry, and durability semantics.
See Concurrency and Backpressure Sizing, Code a Step, and Operate Circuit Protection.