SAService Architect Back to designer
SAService ArchitectDocumentation
Framework lifecycle Created -> Running -> Stopped

Lifecycle overview

The complete path from generated configuration to safe graph shutdown.

When to use

Use this page when implementing maker hooks, owning resources, or diagnosing startup and shutdown.

Behavior

  • Construction and activation are separate: makers create objects, graph binding connects them, and start opens runtime resources.
  • Downstream resources and Sinks start before Sources because a Source may emit immediately from start.
  • Shutdown closes admission before graph drain, preserving every dependency accepted work may still call.
  • Telemetry stops last so shutdown failures and timeout events remain visible.

Startup phases

No endpoint accepts work until construction and binding complete.

Running phase

Makers do not run per message. Endpoint consumers repeatedly invoke the long-lived function instances created at startup.

  • A function maker normally runs once per generated function or endpoint instance.
  • Per-request state belongs in request hooks, not unsynchronized shared maker state.
  • Connectors own listeners, clients, workers, and scheduler loops.

Graceful shutdown phases

Work accepted before the stop signal retains its dependencies until a safe completion boundary.

Hooks and boundaries properties

Generated extension points and runtime-owned lifecycle boundaries.

PropertyTypeDescription
shutdownTimeoutmilliseconds

Total graceful-shutdown window shared by all phases.

workerStopTimeoutmilliseconds

Temporal worker drain cap; zero inherits the service timeout.

Source admissionboundary

Stops before graph pools, storage, and Sinks.

Telemetryfinal boundary

Stops after runtime resources.

Lifecycle outline

configure -> make once -> bind -> start -> admit -> drain -> stop