This is a question for guidance - not a question about something NOT working. So, what do you think - is SignalR a valid option in scenario where: ASP.NET MVC5 application invokes a Powershell script, that scripts writes a log (thisIsOutput.log) and I need to live-stream that log to UI. Additionally I need to stop streaming when Powershell script exists.
I have achieved kind-of satisfying results by simple jQuery AJAX calls with setInterval, where interval is reset when scripts exits. Though to get "live" feeling, I need to bomb server every second with AJAX. Imagine 300 clients doing it simultaneously. Then I have started to look into SignalR. I kind of get a feeling it might be a right choice, but at the same time I feel that there will be an ugly loop in code for this to work.
Any comments, insights - anything - would be highly appreciated!
I think that would be a fine use for SignalR. And to keep from having to have some loop watching the log file, use the FileSystemWatcher class.
https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.7.2