Streaming three ways with Blazor: REST, gRPC, and SignalR
summary
Live demos build a Blazor Server app, a SignalR hub using SignalR channels push and IAsyncEnumerable endpoints, a Web API method that returns async streams, and a gRPC service with a proto-defined stream. Measurements show fetching 5,000 records: Web API ~2s, gRPC RPC ~0.3–0.5s, gRPC stream ~1s, but initial-item latency falls dramatically — first 20 items: Web API stream ~57ms, gRPC stream ~34ms after warmup. Conclusion: streaming uses IAsyncEnumerable pull vs channel push to improve perceived performance and scalability, not raw throughput; gRPC web is used for browser clients.
AI-written summary · about
chapters (10)
- 0:00Start
- 6:28Async Streaming
- 12:50Signalr Streaming
- 13:22Signalr Hubs
- 18:28Creating a Bounded Channel
- 20:19Get Channel Stream
- 23:23Web Api and Grpc
- 33:39Json Serializer
- 34:38Grpc
- 42:02Grpc Generator
related talks
01h 00mDeep Dive on Server-Side Blazor
19mFull Stack Through Microservices
43mGetting real(time) with Akka.NET, React and Redux
25mGetting Started with gRPC and JavaScript
01h 03mASP.NET Core Futures Roadmap
25mStreaming in Next.js
28mDeep Dive: gRPC
25mProgressive Rendering – how to make your app render sooner
