ADR-0094: Non-Quarkus JVM frameworks integrate as ADR-0092 foreign function and connector hosts ​
Context ​
Earlier portability work introduced a Spring-hosted runtime adapter (pipelineframework-runtime-spring) and Spring-specific compiler renderers (-Apipeline.codegen.rendererProfile=spring) in an attempt to re-host TPF's execution engine directly inside Spring Boot. Even after adding Spring-hosted polyglot adapters (issue #1121), maintaining a second execution engine for Spring Boot — and potentially a third or fourth for Micronaut, Helidon, or Ktor — recreates the exact structural maintenance multiplier that ADR-0092 eliminated for Node and Python:
- Every JVM application framework would need its own durable coordinator wiring, Await suspension and resumption store, pre-send dispatch-intent ledger, Command effect reconciliation, Query capture and replay, streaming backpressure and cancellation, deterministic split/merge lineage, telemetry, and compiler renderer profile.
- Spring Boot developers who already run Spring Data, Spring Security, Spring WebFlux, and ordinary
@Servicebeans do not want a parallel generated code surface or a partial subset of TPF's durable runtime; they want full TPF durability (ONE_TO_ONE,ONE_TO_MANY,MANY_TO_ONE,MANY_TO_MANYfull-duplex streaming, durable Await, Command reconciliation, Query capture, andtpf devcrash recovery) while keeping their business logic in plain Spring Boot beans with zero Quarkus, Vert.x, or Mutiny dependencies.
ADR-0092 already established that TPF executes every polyglot pipeline on one canonical Java execution engine (Quarkus in production, and the standalone native tpf CLI locally) invoking thin, authenticated Foreign Function & Connector Hosts over HTTP/1.1 + HMAC-SHA256 + canonical JSON/NDJSON.
Decision ​
Non-Quarkus JVM frameworks — starting with Spring Boot — integrate with TPF through the ADR-0092 Foreign Function & Connector Host model rather than re-hosting TPF's durable execution engine or maintaining per-framework compiler renderer profiles.
1. Thin Spring Boot Foreign Function & Connector Host starter ​
TPF introduces org.pipelineframework:pipelineframework-spring-host-starter in pipelineframework-runtime (managed by pipelineframework-bom):
- Exposes the complete ADR-0092 Foreign Function Host contract:
POST /tpf/functions/{stepId}(ONE_TO_ONEcanonical JSON)POST /tpf/functions/{stepId}/stream(ONE_TO_MANYNDJSON with explicitcompletesentinel)POST /tpf/functions/{stepId}/reduce(MANY_TO_ONEchunked NDJSON request to JSON response)POST /tpf/functions/{stepId}/duplex(MANY_TO_MANYtrue interleaved full-duplex chunked NDJSON)
- Exposes the complete ADR-0092 Tier-2 Custom Connector Host contract:
POST /tpf/connector/auth/challenge(mutual per-session HMAC loopback authentication)POST /tpf/connector/query/{operation}POST /tpf/connector/command/{operation}/dispatchPOST /tpf/connector/command/{operation}/reconcile
- Binds ordinary Spring
@Service/@Componentmethods annotated with@TpfFunction,@TpfQueryConnector,@TpfCommandConnector, and@TpfCommandReconciler(supporting synchronous methods offloaded to Reactor's bounded elastic scheduler,Mono,Flux,CompletionStage,Stream, andIterable). - Preserves exact canonical
BigDecimalprecision (including trailing zeroes) and 64-bitlongvalues without IEEE-754 rounding, mapsTpfBusinessRejectionExceptionandTpfTransientExceptionto ADR-0092 portable failure dispositions, enforces strict secret isolation (pure business functions never receive connector credentials), and enforces HMAC-SHA256 signature, clock-skew, and nonce replay protection. - Carries zero Quarkus, Vert.x, Mutiny, CDI, or JAX-RS dependencies, verified at build time via Maven Enforcer and classpath guard tests.
2. One execution engine, zero per-framework compiler renderer profiles ​
- Quarkus (in production) and the standalone native
tpfexecutable (in local development) remain the single TPF execution engine owning graph sequencing, retries, streaming backpressure, durable Await suspension/resume, pre-send dispatch intents, Command reconciliation, Query capture/replay, and checkpoint handoff. - The Spring host-parity direction (including
pipelineframework-runtime-spring, Spring-hosted polyglot parity from issue #1121, Spring compiler renderersrendererProfile=spring, and Spring gRPC/REST host-parity smoke suites) is superseded by this decision and retired once the Spring Boot Foreign Host starter and end-to-end proofs are published. - Future non-Quarkus JVM frameworks (such as Micronaut, Helidon, or Ktor) follow this same starter pattern over ADR-0092 rather than introducing new execution engines or compiler renderer profiles.
Rationale ​
- Full durable feature parity on day one: Spring Boot applications immediately gain
ONE_TO_ONE,ONE_TO_MANY,MANY_TO_ONE,MANY_TO_MANYfull-duplex streaming, durable Await, Command reconciliation, Query capture, DynamoDBQueueAsyncCoordinator, and crash-safetpf devwithout re-implementing a single durable state machine in Spring. - Native Spring Boot ergonomics: Teams keep ordinary
@SpringBootApplication, Spring WebFlux, Spring Data, Spring Security, and@Servicebeans with zero Quarkus/Mutiny leakage and zero Spring-specific code generation. - Mixed-language and mixed-framework composition: A single TPF pipeline can seamlessly compose Spring Boot steps alongside Quarkus steps, Node/TypeScript steps, and Python steps over one authenticated wire contract.
- Bounded maintenance surface: Compiler code generation and durable engine maintenance stay focused on one execution engine instead of multiplying per JVM framework.
Consequences ​
pipelineframework-runtime: Publishespipelineframework-spring-host-starterwith enforced zero-Quarkus/Vert.x/Mutiny dependency hygiene, then retirespipelineframework-runtime-springand its Spring host-parity smoke modules.pipelineframework-compiler: Retires thespringrenderer profile (Spring*Renderer,SpringRendererProfileSupport,SpringGrpcUnaryProtoRenderer) and simplifies target resolution and generation phases.pipelineframework-examples: Proves a real Spring Boot application usingpipelineframework-spring-host-starterend-to-end against bothtpf devand productionQueueAsyncCoordinator+ LocalStack DynamoDB, and retires the supersededspring-smoke-testsandspring-blocking-smoke-testsmodules.pipelineframework: Updates the BOM,framework/public-artifacts.json, and Spring/polyglot documentation to present the Foreign Function & Connector Host starter as the canonical Spring Boot integration path.
See issue #1126, ADR-0092, Spring Boot Integration, and Deploying Polyglot Applications.