realtime-grpc-and-background-work

Primary docs: - https://learn.microsoft.com/aspnet/core/signalr/introduction - https://learn.microsoft.com/aspnet/core/grpc/ - https://learn.microsoft.com/aspnet/core/fundamentals/host/hosted-services

Realtime, gRPC, And Background Work

Primary docs:

SignalR

Use SignalR when the server must push updates to connected clients in near real time.

Good fits:

Guidance:

Remember that Blazor interactive server rendering already relies on a real-time connection. Do not add a second realtime channel unless the feature truly needs one.

gRPC

Use gRPC for efficient service-to-service communication, strongly typed contracts, and streaming over HTTP/2.

Prefer gRPC when:

Guidance:

Background Work

Use IHostedService or BackgroundService for in-process background tasks tied to the application host.

Defaults:

If the work is durable, high-volume, or business-critical, consider whether it belongs in an out-of-process queue or worker instead of only inside the web host.