Thursday, November 8, 2012

SignalR: First Impressions (It’s Awesome)

SignalR is an:

Async signaling library for .NET to help build real-time, multi-user interactive web applications.

It narrows the gap among clients, and between each client and the server. SignalR helps you do neat things like update dashboard information to anyone looking at your page (practically) instantly in a very efficient way.

Have you ever written a little refresh routine to poll the server for something? Was it a pain or terribly heavy duty? Did it make you feel dirty? Yeah. SignalR fixes that, and then some.

How? It uses some new tech (web sockets) for the newer browsers and some clever tricks for the older stuff (long polling).

Check out the impressive live chat sample, or watch this stock ticker demo:

After seeing Hanselman present the above demo at StirTrek, I’ve been meaning to give it a try. So I finally did at last night’s RoviSys hack-a-thon. Here’s what I came up with:

That app’s actually live right now and the source is on GitHub. Check it out! (Note: if you’re not on a solid internet connection, or my host is under load, it’s not going to look great…it’s not been optimized all that much—use some imagination!)

Oh, and it works on mobile.

The potential uses for this technology are numerous. I’m excited to experiment with it more.