Detect Active Users in Angular App Using SignalR

Bi-directional communication between Angular App and .NET Server

Sunny Sun
The Startup

--

Recently, I implemented an interesting feature using SignalR and Angular. The new feature in the Angular App allows admins to see all active clients on “waiting room” page. The admin can then pick one and start the appointment immediately.

I will share the gist of the solution, which uses SignalR's bi-directional communication ability and integrates with Angular. Let’s dive in.

Architecture

The technologies used include .Net core, SignalR, and Angular.

SignalR

Although it’s a framework published seven years ago, SignalR still has a unique position in web development. It offers bidirectional communications so that the Server can notify the client instead of the client polling the server.

Under the hood, SignalR uses several transports, including WebSocket, as default. It falls back to other transport methods when WebSocket isn’t available. Compared with HTTP web requests, WebSocket has lower overhead as it doesn’t have the…

--

--

Sunny Sun
The Startup

I am full stack developer. Love coding, learning, writing. Checkout my NestJS course: https://shorturl.at/cpJM7, visit my blog https://coffeethinkcode.com