DOCS/UNDER THE HOOD/ARCHITECTURE

Chapter 05

The orchestration core.

Block uses a C# control plane to parse the program, prepare explicit runtime boundaries, manage native processes and carry compatible state through an ordered workflow.

COREC# / .NETEXECUTIONNATIVE PROCESSESFLOWSEQUENTIAL
05.1

System overview

SOURCEPROGRAM.BLKNative + runtime blocks
ORCHESTRATORPARSE / ROUTE / STATE
PYTHONNODE.JSPHPEDITION RUNTIMES

The orchestrator owns the execution plan and process lifecycle. It does not reinterpret each embedded language. Instead, it dispatches a prepared stage to the corresponding native tool.

05.2

Execution lifecycle

01

Lex and parse

Read the source, identify native syntax and separate declared runtime blocks into an ordered plan.

02

Prepare context

Validate transferable names and encode compatible values for the destination runtime.

03

Launch process

Start the native interpreter or compiler and route standard input and output under engine control.

04

Collect and continue

Capture the stage result, update workflow state and move to the next declared block.

05.3

State transfer boundary

Cross-runtime values move through a deliberate preparation pipeline.

01VALIDATEIdentifier rules
02ENCODECompatible values
03INJECTDestination scope
Boundaries reduce glue; they do not remove validation duties.

Applications should still validate untrusted input and follow the security guidance of every runtime and library involved.

05.4

Process isolation

Managed lifecycle

The orchestrator starts, observes and closes each child process as its stage runs.

Clear failure boundary

A runtime error is handled at the process boundary rather than becoming hidden shared state.

Observable output

Startup, transfer and completion information can remain visible to the operator.

05.5

Performance considerations

Block avoids a proprietary language virtual machine, but crossing a native process boundary still has a cost. Design stages around meaningful units of work instead of alternating runtimes for every small expression.

DOGroup related work inside one runtime stage.

DOTransfer compact, well-structured state.

AVOIDLaunching a runtime repeatedly for trivial operations.

MEASUREProfile the actual workflow and toolchain on its target machine.