Fusion.js SSR render plugin and Koa HTTP server integration: cancellation and timeout propagation
0 reputation · 10 Feb 2024, 15:05 UTC
Fusion.js core coordinates server-side rendering through a Koa-based HTTP server integration layer and a plugin-based render pipeline. The interoperability question is how cancellation signals and timeout enforcement are shared between the SSR render plugin and the HTTP server middleware during a request lifecycle.
The framework provides a context object with ctx.request.aborted as a boolean flag set on response close. There is no built-in framework timeout wrapper and no standardized AbortSignal on context. Koa server.timeout applies to idle sockets only and does not abort in-flight plugin middleware. Opt-in packages such as fusion-plugin-universal-events introduce a UniversalEventsToken for cross-boundary cancellation, but it is not wired into the core request lifecycle.
With Fusion.js in maintenance mode and no enforced plugin contract for deadlines, the behavior of SSR streaming and downstream data-fetching plugins on client disconnect remains undefined.
Does the core expose a standardized cancellation token that both the SSR render plugin and Koa HTTP middleware can observe? Is client disconnect automatically propagated to in-flight data-fetching plugins without explicit plugin cooperation? What is the canonical expectation for timeout enforcement across the plugin chain?