SAService Architect Back to designer
SAService ArchitectDocumentation
Framework lifecycle connector -> endpoint -> consumer -> stream

DataSources, endpoints, and resource ownership

How generated connector objects, endpoints, endpoint consumers, functions, and streams divide lifecycle responsibility.

When to use

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

Behavior

  • A connector is configuration and shared transport identity; its runtime representation may be a DataSource, a DataSink, a managed connector, or a combination.
  • An endpoint describes one route, method, topic, schedule, Activity, or Workflow on that connector.
  • Binding creates an endpoint consumer that connects the transport-facing endpoint to an Input or Sink stream and its long-lived user function.
  • Endpoint consumers do not have an independent start phase. Their owning transport or connector opens admission only after binding is complete.
  • Request state is created for an accepted interaction and must remain reachable until its result, error, cancellation, or timeout boundary completes.
  • During shutdown, network handlers drain before endpoint state is released; DataSinks and clients remain available while accepted graph work completes.

Construction and ownership

Runtime roles properties

Lifecycle owner and responsibility of each generated layer.

LayerLifecycle ownerDescription
DataSourceruntime resource

Owns ordinary inbound admission and drains root invocations in stop.

DataSinkruntime resource

Owns outbound submission and remains alive through graph drain.

ManagedDataConnectorshared resource

start/stop own clients and core resources; startAdmission/stopAdmission own connector-managed polling such as Temporal Workers.

Endpointconnector-owned object

Stores transport policy and request/result state for one externally addressable operation.

Endpoint consumergraph binding

Bridges an endpoint to a typed Input or Sink stream and exposes the function implementation.

Function instancemaker result

Created once, reused while the binding is active, and released after dependent callbacks.

Server listeneradmission owner

Stops accepting and drains native HTTP/gRPC handlers before graph dependencies are torn down.

Lifecycle outline

connector core -> endpoint -> endpoint consumer -> Input/Sink stream
start: core -> downstream -> worker admission -> sources -> servers
stop: servers -> sources -> worker admission -> pools -> graph -> sinks -> core -> release