Skip to content

docs: explain why gRPC helps for streaming#3

Merged
shanev merged 1 commit into
mainfrom
docs/grpc-streaming-rationale
Jul 1, 2026
Merged

docs: explain why gRPC helps for streaming#3
shanev merged 1 commit into
mainfrom
docs/grpc-streaming-rationale

Conversation

@shanev

@shanev shanev commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The README leads with "gRPC-native" but never explains the payoff. Adds a Why gRPC for streaming section contrasting the native gRPC surface with the OpenAI-compatible HTTP/SSE endpoint most Grok clients use:

  • Typed chunks — no SSE data: frame splitting, partial-JSON reassembly, or [DONE] sentinel
  • Structured end-of-stream status via HTTP/2 trailers (typed status.Code, clean io.EOF)
  • Real context cancellation (HTTP/2 stream reset) + deadline propagation
  • HTTP/2 connection multiplexing

Kept deliberately honest — notes SSE is perfectly fine for simple one-directional token streaming, so it reads as engineering rather than marketing.

🤖 Generated with Claude Code

The README leads with "gRPC-native" but never says why that matters. Add a
"Why gRPC for streaming" section contrasting the native gRPC surface with the
OpenAI-compatible HTTP/SSE endpoint most clients use: typed chunks (no SSE
frame parsing or [DONE] sentinel), structured end-of-stream status via HTTP/2
trailers, real context cancellation, and connection multiplexing. Kept honest —
notes SSE is fine for simple one-directional token streaming.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shanev shanev merged commit 5213e87 into main Jul 1, 2026
1 check passed
@shanev shanev deleted the docs/grpc-streaming-rationale branch July 1, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant