Skip to content

Streaming 2: transport-independent pausable byte sources #206

Open

Description

@DrunkOnJava

Audit: grammar receives whole file/section slices; filesystem I/O resides in DwgFile::open and WASM open copies the uploaded buffer. No pausable byte-source contract.

Acceptance:

  • Grammar declares offset/length requests and never imports transport APIs.
  • File, in-memory and asynchronous range/worker adapters implement the same contract, distinguishing Pending, EOF and errors.
  • Short reads, interruptions, exact offset validation and EOF are exercised through a built executable.
  • Document indexed DWG access: a forward-only transport needs a spool/cache because section maps can follow the data. Never promise arbitrary DWG is sequentially streamable without storage.

Parent: #204

Implementation checkpoint — October 25, 2026

Foundation implemented in #213: ByteSource with Ready/Pending/EOF, one-poll bounded delivery, FileSource and SliceSource. The real built entry point passed short and pending delivery on two pinned real headers. HTTP/worker integration and indexed full-model source scheduling remain open.

Activity

  1. added
    type:feature
    area:container
    priority:P1
    on Oct 25, 2026
  2. DrunkOnJava commented on Oct 27, 2026

    @DrunkOnJava
    OwnerAuthor

    Status (main 2bab7b2; docs/streaming/README.md). Past the October 25 checkpoint (Ready, Pending, EOF, FileSource, SliceSource), byte_source::AsyncSource (#255) is the adapter for a transport that answers later. It owns no thread, runtime or connection: a poll with nothing in flight posts one request of at most one chunk and returns Pending, the host fetches it and hands the answer back, and bytes the next scratch cannot take are held, never fetched twice.

    tools/streaming/verify_source.py, in the required Streaming E2E job, drives the R13 to R2000 walk through AsyncSource and an HTTP/1.1 range worker (stream_walk --url) on the canonical R2000 fixture and two pinned real drawings: output equal to the file-backed run, 9,206 fetches each after a Pending, the bytes the server sent equal the bytes delivered, in order and once, a fresh-process resume that fetches nothing twice, and a 416, a wrong Content-Range, a short body, an ignored Range and an oversized 206 each ending in a typed error. The README documents that a forward-only transport for a complete DWG needs a spool, because indexes can follow objects.

    Against the acceptance list that is every item for the R13 to R2000 walk. Not shown: the R2004-family and R2007 walks driven through AsyncSource (no driver does it), TLS, a remote host, and a browser worker (#209).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:containerpriority:P1type:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions