You may be a bit confused with this post’s title - does it even make any sense to talk about real-time in the web? Before we answer that - what makes a real-time application? That’s quite easy - event source pushes the events towards user’s dashboard (in this case - the web browser). Doesn’t sound really “webbish”, does it? It pretty much means we should poll the web server for the events raised since last poll - it’s not very real-time and it means that magnitudes of flashing, ultra-short connections are being created and closed every second (for all the users working with the dashboard).
The answer to our problems is named SignalR and it can be found here: http://signalr.net/
You can find a neat example by Scott Hanselman published on his blog: http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx
After playing a bit with this, I may say that it’s quite interesting, especially if you’re about to create something like a chat application or maybe a stock ticker.
Subscribe to No Kill Switch
Get the latest posts delivered right to your inbox.