Real-time & RPC
The synchronous-but-streaming side of the wire. SignalR for web real-time, gRPC (basic and advanced), raw WebSockets/SSE for cases where SignalR is too heavy, and binary serialization choices.
Topics (canonical order)
-
Hubs, transports, auto-negotiation, scaling with Redis backplane, Azure SignalR Service
-
Protobuf, four call types (unary/server-stream/client-stream/bidi), gRPC-Web, JSON transcoding
-
Interceptors, deadlines, retries, gRPC-Web vs Connect, perf vs REST
-
Raw
WebSocketAPI, server-sent events, when SignalR is overkill -
MessagePack, Protobuf-net, choosing wire formats, perf vs compatibility trade-offs
-
Code-first vs schema-first, resolvers, DataLoader, subscriptions, Fusion (federation), persisted queries, when GraphQL beats REST
Why this order (and why this section follows distributed systems)
Real-time and RPC are usually consumed AFTER you've internalized messaging fundamentals (Distributed Systems). SignalR is the most common entry point for web apps; gRPC follows because it's the dominant intra-service RPC. Raw WebSockets/SSE come third for the cases where SignalR's overhead isn't worth it. Binary serialization closes the section because the wire format choice often dominates the perf conversation.
Cross-references
- SignalR scaling depends on Caching Strategies (Redis backplane).
- gRPC depends on HTTP/2, HTTP/3 & Transports.
- SignalR feeds SignalR from React and Frontend: Blazor.
- System-design case Case: Real-Time Collab App builds on these primitives.