Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.94 KB

File metadata and controls

53 lines (37 loc) · 1.94 KB

Standalone Mode (Current Delivery)

What Is Delivered

The current submission runs in local standalone single-process mode.

  • Start command: stream (without subcommand) or docker compose up
  • Listen port: default 3000
  • Runtime model: one process mounts Meta, Ingestor, and Streamer routes together

This assignment is delivered primarily in this mode; split deployment is not required for evaluation.

Process Composition

What stream-app assembles in standalone mode:

  1. Build shared infrastructure: SQLite, in-memory event queue, in-memory object store
  2. Initialize Meta / Ingestor / Streamer state
  3. Merge service routers into one axum app
  4. Apply shared middleware around protected business routes:
    • Auth middleware (injects X-User-Id=bot)
    • Rate-limit middleware
  5. Expose /health separately (outside business middleware)

Endpoint Surface in Standalone

Area Path Prefix Example
Health /health GET /health
Meta /videos, /share POST /videos, GET /share/:token
Ingestor /upload POST /upload/:id/init
Streamer /stream GET /stream/:id/manifest

Notes:

  • In standalone mode, clients call the paths above directly (no /api/meta/* gateway prefix).
  • Data-plane requests still require Bearer tokens issued by Meta.

Shared State in This Mode

Component Backing
Metadata SQLite
Event bus In-memory queue
Object storage In-memory object store

This makes standalone mode ideal for local validation and interview demonstration.
For production, object storage and deployment topology should be upgraded accordingly.

Relation to Split Deployment Design

Gateway / Meta / Ingestor / Streamer are still documented as separate service boundaries to show scale-out direction.
The delivered implementation is their single-process combined runtime, with consistent API and state-machine behavior.