Builds composable, pipeable function chains on the iii engine. Use when building functional pipelines, effect systems, or typed composition layers where each step is a pure function with distributed tracing.
Comparable to: Effect-TS
Use the concepts below when they fit the task. Not every effect pipeline needs all of them.
triggerHTTP request
→ fx::parse-user-input (validate + normalize)
→ fx::enrich (add metadata, lookup external data)
→ fx::persist (write to state)
→ fx::notify (fire-and-forget side effect)
← composed result returned to caller
| Primitive | Purpose |
|---|---|
registerWorker | Initialize the worker and connect to iii |
registerFunction | Define each effect |
trigger({ function_id, payload }) | Compose effects synchronously |
trigger({ ..., action: TriggerAction.Void() }) | Fire-and-forget side effects |
trigger state::set, state::get | Persist data between effects |
registerTrigger({ type: 'http' }) | Entry point |
See ../references/effect-system.js for the full working example — a user signup pipeline where input is parsed, enriched with external data, persisted to state, and a welcome notification is fired.
Code using this pattern commonly includes, when relevant:
registerWorker(url, { workerName }) — worker initializationtrigger({ function_id, payload }) — synchronous composition (effect A calls effect B)registerFunction with fx:: prefix IDstrigger({ ..., action: TriggerAction.Void() }) — fire-and-forget for non-critical side effectsconst logger = new Logger() — structured logging per effectUse the adaptations below when they apply to the task.
triggerTriggerAction.Enqueue({ queue }) instead of synchronous triggerfx::validate-email, fx::geocode-address)iii-workflow-orchestration.iii-agentic-backend.iii-effect-system when the primary concern is composable, traceable function pipelines with synchronous chaining.iii-effect-system in the iii engine.