Execution¶
The execution module provides the orchestration infrastructure for running Semantiva pipelines. It includes comprehensive error handling and integration with the tracing system to capture complete execution records, including error events with timing data and exception details.
Component Registry System¶
Semantiva uses a dual-registry architecture to manage execution components while avoiding circular import dependencies:
ExecutionComponentRegistry
Specialized registry for orchestrators, executors, and transports. This registry is designed to break circular import dependencies with the main ProcessorRegistry and graph builder modules.
build_orchestrator()
Factory function that uses ExecutionComponentRegistry to construct orchestrators from configuration, supporting dependency injection of executors and transports.
The component registry follows the dependency inversion principle, acting as a dependency sink rather than creating webs of interdependence. See Registry System for detailed architectural information.
Template-method orchestrator¶
The core lifecycle now lives in
SemantivaOrchestrator
.
It canonicalises the pipeline, snapshots context before/after each node, collects
io_delta
details, emits built-in pre/post checks, and attaches environment
pins for every SER. Concrete orchestrators implement only two hooks:
_submit_and_wait(node_callable, *, ser_hooks)
Runs a node and returns its
Payload
._publish(node, data, context, transport)
Forwards the node output through the orchestrator’s transport.
All error handling, timing, and tracing responsibilities are handled by the
base class. LocalSemantivaOrchestrator
simply delegates to the injected
executor/transport while benefiting from the shared SER logic.
Public API Surface¶
Component Registry:
semantiva.execution.component_registry
Orchestrator Factory:
semantiva.execution.orchestrator.factory
Executors:
semantiva.execution.executor.executor
Orchestrators:
semantiva.execution.orchestrator.orchestrator
Transports:
semantiva.execution.transport.in_memory
Autodoc¶
- semantiva.execution.orchestrator.factory.build_orchestrator(exec_cfg, *, transport=None, executor=None)[source]¶
- class semantiva.execution.executor.executor.SemantivaExecutor[source]¶
- class semantiva.execution.orchestrator.orchestrator.LocalSemantivaOrchestrator(executor=None)[source]¶
- class semantiva.execution.orchestrator.orchestrator.SemantivaOrchestrator[source]¶
-
- execute(pipeline_spec, payload, transport, logger, trace=None, canonical_spec=None, run_metadata=None)[source]¶
- property last_nodes¶
- class semantiva.execution.transport.base.Message(data, context, metadata, ack)[source]¶
- ack¶
- context¶
- data¶
- metadata¶