Atom runtime and pipelines
An atom runtime supplies configured classification and enrichment engines for a host application. The host can parse inputs, pass the results through those engines, and choose when to cache, cancel, or retry work. Pipeline helpers bound concurrent requests and isolate repeated provider failures. Core adds the workers and durable records a self-hosted node needs.
Builds on: Atom classification, Enrichment.
Implemented by: @0xintuition/atom-runtime, @0xintuition/pipeline-runtime.
How it works
Choose the plugins, provider credentials, cache adapter, and time limits for a workload. Parse the input under your network policy. Use classification and identifier hints to select the next stage when enough evidence is available. The runtime reuses its classification engine and caches enrichment engines by preset and identity capability. A memory cache belongs to the process. Atom runtime, engine lifecycle.
Use bounded concurrency when processing independent inputs. forEachBounded returns outcomes in input order even when callbacks finish in a different order. A circuit breaker wrapped around a provider call can refuse new work after a failure threshold. After its reset interval, it admits one probe. A successful probe closes the circuit. Pipeline runtime, circuit breaker.
Example
Suppose a catalog queues a recording, an artist, and a release with a concurrency limit of two. The recording and artist can start together. If the artist finishes first, the release can start while the recording is still running. The caller still receives the recording's outcome first in the result array. It can retain the artist's successful outcome even if the recording's callback rejected. Bounded catalog example.
If the caller cancels the import, the parent abort signal stops queued work and signals active callbacks. Each callback must pass the signal to its underlying I/O. During shutdown, abort or finish outstanding work, then call dispose() on the runtime. Disposal prevents future engine lookups. An engine reference already held by a callback can outlive it. Runtime example.
Common mistakes
- Creating a new runtime per row. This discards the opportunity to reuse engines and their caches across the batch.
- Assuming a timeout or disposal stopped a provider request that ignored cancellation. Forward the request signal and check the outcome.
- Treating a cached classification as a durable graph record. Core workers claim stages and persist their results separately. Core architecture.
Next
Indexing and querying follows chain events and processing results into a Core node's Query API.
Applies to V2 · @0xintuition/atom-runtime 0.1.1 · @0xintuition/pipeline-runtime 0.1.1