engine+ingest: realize the Source trait as the run() ingestion seam, co-designed with a real DataServer-backed source (Ledger 0004/0011) #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Foundational cycle for World-II. Unifies the deferred
Sourcetrait (ledger 0004) with the DataServer ingestion edge (cycle 0011) in ONE integration, so the producer seam is designed against the real data source from the first line — surfacing boundary friction before the orchestration families (#66 / #68 / #69) build on it.Why now
Harness::run(streams: Vec<Vec<(Timestamp, Scalar)>>)is the only engine type that encodes a materialized-Vec (eager) assumption. At realistic scale (20y, 3 streams, ~7.9e9 ticks) the eager layout is ~190 GB resident (24 B/tick) — non-residable. INDEX.md (cycle-0011 status) already declares today's eager materialization a "deliberate gap" whoseArc<[T]>zero-copy cross-sim sharing is "the target for the orchestration cycle that introduces [the axes]" — i.e. this milestone. The DataServer is purpose-built for it: lock-freeArc<[T]>1024-chunks viaSymbolChunkIter::next_chunk, windowedstream_*_windowed(from_ms, to_ms).Deliverable
trait Source { fn peek(&self) -> Option<Timestamp>; fn next(&mut self) -> Option<(Timestamp, Scalar)>; }— the ingestion-boundary producer the k-way merge drives (peek-head to pick the min across live sources, next to pop). Object-safe;SourceSpecstays the wiring metadata (kind + targets).Harness::run(&mut self, sources: Vec<Box<dyn Source>>). AVecSourcewrapping today'sVec<(Timestamp, Scalar)>makes every existing test byte-identical — behaviour-preserving, no residency change.Source(in aura-ingest): windowed viastream_*_windowed, per-chunk AoS->SoA transpose, BORROWS theArc<[M1Parsed]>chunk (no owned-Vec materialization), constructs eachScalarper-pull. One base-columnSourceper consumed field (a composite window -> N sources sharing the chunk's ts axis).next() -> Option(errors surface at source construction, matchingstream_*_windowed'sOption).Sources over a real[from, to]window, run to aRunReport.Acceptance (friction-first)
VecSource.RunReport.Timestamp(epoch-ns), normalized to the DataServer's Unix-ms at the ingest edge (C3).Surfaces these boundary frictions deliberately
AoS->SoA transpose granularity (per-chunk vs per-window);
Arc<[T]>borrow lifetime across the merge and across disjoint sims (C1/C12); composite -> N base-column sources sharing one chunk; window-bounds type + ms<->epoch-ns normalization; error channel (Option at source open vs iteration); the lazy refill boundary (next_chunkwhen a chunk drains).Contracts
C2 (bounded read-only windows), C3 (one merge at ingestion), C4 (SoA), C12 (
Arc<[T]>cross-sim sharing). Closes the cycle-0011 deliberate-eager gap. Prerequisite for #66 / #68 / #69 (all inherit theSourceshape).