Search code examples
asp.net.netsignalrmonitoringpolling

Real-time .NET app monitoring without client polling


We're building a real-time Web-based monitoring system for .NET applications (ASP.NET and Windows executable). Those applications can start a long-running operations and statistics are displayed in real-time on Web page.

For ASP.NET ones we found SignalR a perfect solution: Long running operation (even caused by simple WebForms form postback) periodically call JS client-side functions via SignalR RPC to update monitoring page. But we hit 2 caveats:

  1. In ASP.NET we need to monitor several different apps located in several different virtual directories. How do we push data from those different apps onto a single HTML monitoring page?

  2. Another app is a .NET Windows console executable that runs periodically on a schedule. How do we push its run-time statistics to the same monitoring HTML page? One thing comes to mind - have EXE store temporary statistics in a DB and have client pull same data from the DB, but we'd like to avoid polling. Another - periodically at a given intervals the EXE would call the WebApp, passing the data - and WebApp would pass it to client via the same SignalR call. But are there better ways?


Solution

  • Very new to SignalR, didn't realize it has multiple clients for different platforms. We will go with SignalR .NET client for all the apps - they will all talk to main SignalR hub directly invoking server-side methods, which in turn update monitoring page.