Architecture note
The engine already exists
Cloud runs on the DAG workflow orchestrator in Documentize.Plugin.Manager, not on a new execution stack.
The decision
Cloud is built on Plugins/Documentize.Plugin.Manager and its plugin tree, rather than on a new execution stack or on the Fn worker model.
The decisive argument is that the pipeline product we are describing needs a dependency graph, per-step file staging, crash resume and admission control — and all four already exist in the DAG orchestrator. Building them again on top of the single-operation worker model would mean reimplementing an engine that sits in the same repository.
What that gives us on day one
Rows marked planned are not wired in yet; everything else is running code.
| Mechanism | What it does | Where |
|---|---|---|
| YAML DAG templates | 45 shipped pipelines. Steps with dependsOn, canRunInParallel and priority. The same format carries user recipes, submitted inline. | Workflow/Template/*.yaml Workflow/YamlTemplateManager.cs |
| Format routing | A table mapping (from, to) to a pipeline, published as GET /routes. This is the “pick a format” mechanic. | Conversion/conversion-routing.json Conversion/ConversionResolver.cs |
| Plugin manifests | 50+ plugins, each declaring kind, concurrency, timeout, CPU and memory cost, and pool support. A build step turns them into catalog.json. | Plugins/*/plugin.json |
| Typed parameters | A declared schema per plugin — the source for CLI flags, JSON binding, help text, recipe validation and the console's generated forms. Most plugins declare one; the catalogue flags the rest. | Plugin.Shared/CliOptionAttribute.cs |
| Resource governor | Pod-level weighted admission across all concurrent invocations. Blocks for backpressure instead of dropping work. | ResourceGovernor.cs |
| Pipeline entry | A pipeline topic accepts a shipped template name or an inline plan. The plan is validated before anything runs. Transport is Kafka, or ConfigMap queues on Kubernetes when there is no broker. | Queue/ITaskQueue.cs Workflow/PipelineMessage.cs |
| Per-step options | A step's with: keys (CLI option names) are translated through the catalogue and merged into that step's payload. Options are part of the step id, so a changed option never reuses an old checkpoint. | Workflow/StepOptions.cs |
| Lazy plugin processes | Nothing is warm at boot. A plugin's worker starts on first call and stops after an idle TTL; PLUGIN_PREWARM lists any to start early. | PluginInvokerPool.cs |
| Step leasing behind a flag | With DAG_STEP_LEASING=true, pipeline state lives in the bucket and every pod leases the ready steps it has room for. A pod killed mid-step loses only that step. | Workflow/Leasing/ |
| Four invocation modes | Hot pooled process, cold process, in-process and util — selected per plugin from its manifest. | Invocation/PluginInvokerFactory.cs |
| Split, fan out, merge planned | The plan builder for page-range splitting exists but the orchestrator does not use it yet. Fan-out over files is done by Cloud.Api, one pipeline per file. | Workflow/WorkflowPlanBuilder.cs |
| Crash resume | A checkpoint written after each successful step, so a re-delivery skips completed work. | Invocation/S3CheckpointService.cs |
| Live progress | Plugins report percentage and message; a per-step monitor publishes to Redis (or the Kubernetes status fallback), and Cloud.Api relays it to the browser as server-sent events. | Plugin.Shared/StatusReporter.cs Workflow/ProgressMonitoringService.cs |
How a step actually executes
Worth understanding, because two of the three planned changes follow from it.
The orchestrator topologically sorts the plan into batches and runs each batch in parallel. Before a step runs, its input directory is staged: a root step is seeded from the task's input directory, and a dependent step receives the output files of everything it depends on. After the last step, the output is promoted to the canonical task directory and the checkpoints are cleared.
Steps therefore chain through the file system, and one process owns a whole pipeline for its duration. That is simple and fast, and it is also why distributing a pipeline across pods is a real piece of work rather than a configuration change.
Because a pipeline is keyed by task id and staged from that task's own directory, running a recipe over twelve files is simply twelve pipeline instances, each with its own checkpoints and progress. Cloud.Api's run advancer does exactly this; the orchestrator needed no change for it.
One caution about the templates
The template folder contains two YAML shapes. Templates using steps: with pluginName: are real — they deserialize into the workflow model and name plugins that exist in the registry.
Templates using streamingSteps: with an executablePath: pointing at binaries such as SentimentAnalyzer.exe are a design sketch: those executables are not in the repository. The four of them now live in Workflow/Design/, which is not shipped. The cloud DSL is built on the steps dialect.