026-streaming-responses

Streaming responses: server-sent events as the one mechanism, declared per route, bounded and cancellable

Lifecycle approvedImplementation completeVerification unknownQualification unknown

A response that is produced over seconds rather than milliseconds breaks every default the edge holds: compression buffers it, the request timeout kills it, the rate limiter counts it once and forgets it, and graceful shutdown drops it mid-sentence. This spec adds one streaming mechanism, server-sent events, and makes a streaming route declare itself so those four defaults are turned off deliberately rather than discovered in production. Streams are bounded by a per-stream channel and a per-client concurrency limit, are cancellation-aware, close cleanly on shutdown, and are one span each in the tracer.

Read the full pinned specification ↗

Relationships

Claimed units

  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-edge/src/stream.rs"
    }
  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-edge/tests/stream.rs"
    }
  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-edge/tests/stream_gauge.rs"
    }
  • extends
    {
      "nature": "additive",
      "spec": "020-edge-server",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-edge/src/router.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "020-edge-server",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-edge/src/lib.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "020-edge-server",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-edge/src/error.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "020-edge-server",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-edge/Cargo.toml"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "023-observability",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-edge/src/obs/metrics.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "030-operational-verbs",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-cli/src/serve.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "039-release-and-out-of-tree-packaging",
      "unit": {
        "kind": "file",
        "path": "CHANGELOG.md"
      }
    }

Source headings

  1. 026: Streaming responses
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 4. Functional requirements
  6. 5. Acceptance criteria
  7. 6. Out of scope
  8. 7. Resolved decisions
  9. 8. Status
  10. Verification

Frozen anchors

No frozen anchors declared.