I've been looking into using
SignalR for a while now, and I think I have a good candidate for it.
I have a page which allows users of the system to leave
Comments, and at the moment it uses
JQuery to periodically refresh the list of comments. I think
SignalR would replace this nicely, i.e. if there were two users looking at the list and one wrote a comment, I would like it to appear instantly in the second.
All well and good, I have a <em>sort of</em> template where this works.
My system itself can sometimes add automatic notifications to the list - These are put into the database directly by a non-web based application.
How can I get
SignalR to see the new information from the database and send it to the users?
SignalR the <a href="https://github.com/SignalR/SignalR/wiki/Hubs" rel="nofollow">hub</a> is a static part in your application. You can spin up a <a href="https://stackoverflow.com/questions/1416803/system-timers-timer-vs-system-threading-timer" rel="nofollow">System.Threading.Timer</a> in your webapplication to periodically check your database for new notifications and add those to the data used by the
This can even be improved by using a <a href="https://stackoverflow.com/questions/642848/performance-questions-for-sql-cache-dependency" rel="nofollow">SqlCacheDependency</a>.
A subjective side note: <em>I do agree this type of functionality is a very good candidate for