streaming-architecture

Design streaming contracts with explicit backpressure and termination semantics.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill streaming-architecture-jacob-balslev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-architecture
Source: https://github.com/jacob-balslev/skill-graph/tree/main/marketplace/skills/streaming-architecture
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill streaming-architecture-jacob-balslev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streaming-architecture helps you design systems where a producer emits values over time and a consumer processes them incrementally, with explicit flow control and correct termination semantics, so you avoid slow-consumer memory blowups and ambiguous “silence means done” bugs.

Core Features & Use Cases

  • Five-primitive contract: producer, stream, consumer, backpressure, and termination defined explicitly, including failure modes when any piece is missing.
  • Transport selection guidance: choosing between HTTP chunked transfer, SSE, WebSocket, HTTP/2 streams, gRPC streaming, WHATWG Streams, and Node streams based on directionality and framing needs.
  • Backpressure and error semantics: strategies such as pull, credit-based push, drop/block on overflow, and defined in-stream error handling (fail-fast vs in-band vs out-of-band).
  • Resume correctness: designing reconnect/resume behavior so consumers can continue without gaps or duplicates when termination and disconnect semantics matter.
  • Framework mapping: translating the same streaming contract across modern framework mechanisms like RSC and streaming SSR.

Quick Start

Apply this skill when designing a server endpoint that must deliver 50,000 rows incrementally, and ensure the producer/consumer contract, backpressure strategy, termination signaling, and mid-stream failure semantics are explicitly specified.

Frequently Asked Questions about streaming-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design backpressure for streaming endpoints to prevent slow-consumer memory blowups?

Design backpressure for streaming endpoints by explicitly specifying a flow control strategy like pull, credit-based push, or drop/block on overflow. This prevents slow-consumer memory blowups by ensuring the producer waits when the consumer cannot process values incrementally.

What is the best way to handle termination and error semantics in SSE and WebSocket streams?

Handle termination and error semantics in SSE and WebSocket streams by defining explicit in-stream error handling, choosing between fail-fast, in-band, or out-of-band errors. This prevents ambiguous completion behavior and ensures consumers know when a stream has ended or failed.

When should I choose gRPC streaming over HTTP chunked transfer for inter-service streaming?

Choose gRPC streaming over HTTP chunked transfer when you need built-in directionality and framing for inter-service streaming. Transport selection depends on whether your scenario requires server-to-client, bidirectional, or simple incremental value delivery.

How do I implement reconnect and resume behavior for time-ordered value delivery without data gaps or duplicates?

Implement reconnect and resume behavior by explicitly specifying resume semantics in your streaming contract. This ensures consumers can continue time-ordered value delivery without gaps or duplicates when network disconnects or mid-stream failures occur.

Can I apply the same streaming contract across WHATWG Streams and Node streams?

Yes, you can apply the same streaming contract across WHATWG Streams and Node streams by translating the five-primitive contract—producer, stream, consumer, backpressure, and termination—across different framework mechanisms to maintain consistent flow control.