Skip to content

Orchestrator

TinyOrch — Orchestrate Processing Pipelines on TinyBench

TinyOrch manages a "sequence of steps." Each step retrieves data from the TinyBench workbench → invokes a tool → puts the result back onto the bench. Supports predefined flows as well as remote dynamic orchestration via MQTT.


Architecture

  • Flow Definition


    Named flows + ordered steps
    create(flow) / step(flow, idx, src, tool, dst)
    Compile-time type validation — checks src type matches tool at definition time

    API →

  • Execution Engine


    go(flow) — executes all steps in order
    run(src, tool, dst) — one-shot single step
    Terminates immediately on step failure, returns error code + executed step count

    Design →

  • Flow State Machine


    CREATED → DEFINED → RUNNING → DONE / ERROR
    status(flow) — real-time flow state query
    Clear error traceability

    Design →

  • MQTT Remote Orchestration


    ORCH,CREATE / ORCH,STEP / ORCH,GO
    Users or Agents build and execute flows remotely via MQTT
    Responses published to /mqtt/node

    Test →


Quick Start

#include "tiny_bench.h"
#include "tiny_orch.h"

tiny_bench_t bench;
tiny_bench_init(&bench);
// ... register tools, put data ...

tiny_orch_t orch;
tiny_orch_init(&orch, &bench);

// Define a flow
tiny_orch_create(&orch, "daily_scan");
tiny_orch_step(&orch, "daily_scan", 0, "raw_0",  "butterworth", "filtered");
tiny_orch_step(&orch, "daily_scan", 1, "filtered","fft",         "spectrum");

// Execute
tiny_orch_go(&orch, "daily_scan");  // Executes steps 0→1 in order

TinyBench + TinyOrch Collaboration

TinyBench:   Data slots(raw_0, filtered, ...) + Tool registry(butterworth, fft, ...)
                  ↕ read                    ↕ call
TinyOrch:    Step 0: raw_0 → butterworth → filtered
             Step 1: filtered → fft → spectrum
                  ↕ write
TinyBench:   Data slots updated (filtered, spectrum now have data)