Friday, May 10, 2013

SignalR - Microsoft Battles Back

As with many IT leaders (and shareholders), I've been watching Microsoft closely. Will it be able to re-emerge as a winner? Or has Microsoft reached their apogee and all we can expect is decline. To hear the news, Apple/Google/Facebook/etc are the winners.

However, there are a number of Microsoft technologies that are poised to change the computer landscape yet again. The one that has been helping me (and which has incredible potential) is SignalR.

SignalR is all about pushing data from the server to a client. For me, it has been a lifesaver for browser communications (but it can be used in any kind of client.)

Server-initiated communications have always been tough, especially on top of the http protocol, which is primarily client-initiated communications. The SignalR team has done a couple of really smart things:

  • Client agnostic - First they came up with a mechanism that doesn't really matter what client your user is using. It will automatically downgrade its technique to whatever technology is available. For instance, if you are using it within a browser, SignalR will try the following technologies until it finds one that will work with the user's browser:
    • HTML5 Websockets
    • Server Sent Events (EventSource)
    • Forever Frame (Older IE browsers only)
    • Ajax long polling
  • API's - There are a number of SignalR API's that make the job incredibly simple. I have primarily used the Javascript API, but you can incorporate it into almost any .net, c++, Java, etc app.

As they say, anywhere a client polls for information from a server is a good candidate for SignalR to be put in place. So, besides webchat, I've thought about using it for:

  • Server monitoring
  • Game servers / Game cheat monitoring
  • Realtime business dashboards
  • Realtime asset mapping
  • Website social network updating
  • Website widgets (weather, stock, deals, etc)
  • Notifications to your desktop much like Apple realtime notification service

So, if you are looking for server-initiated, real-time communications, I recommend checking it out. I'm working on a demo that I'll post to this article later today.

No comments:

Post a Comment