| name | iii-effect-system |
| description | 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. |
Effect Systems & Typed Functional Infrastructure
Comparable to: Effect-TS
Key Concepts
Use the concepts below when they fit the task. Not every effect pipeline needs all of them.
- Each effect is a registered function with a single responsibility (parse, enrich, persist, notify)
- Effects compose by calling one function from another via
trigger
- The entire pipeline is traceable end-to-end through OpenTelemetry
- Errors propagate naturally — a failing effect stops the chain
- An HTTP trigger provides the entry point; effects chain from there
Architecture
HTTP 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
iii Primitives Used
| 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 |