I use some type of instant messenger on a daily basis. Whether it is interoffice communications or talking with friends, IM can be an easy way to touch base. If you are like me in this respect, and I’m sure most of you are, you have probably experienced the “this is the most confusing conversation ever and it would be easier to just call the person” experience. You know what I’m talking about. It’s when you are typing a response to someone while the person that you’re talking to is typing. You both hit send at the same time. The two messages overlap, and all of a sudden you are having two different conversations. Now imagine this: you see the message on your screen in real time as the person is typing the message. No more sitting and waiting while they are typing, you get to read the message in real time as if you are actually talking to the person. Thanks to the emergence of SignalR over the past year, this is a very real possibility. As I often do in my blogs, I am going to give you the low down on what SignalR is and encourage you to watch for my follow up on the implications and uses of SignalR.
So let’s take a look at the nitty gritty of what SignalR actually is. SignalR is a frame work to add real-time web functionality and communication over the web. This enables developers to push real time content to the clients that are connected to the network.
Without SignalR, there is typically a delay in updating any type of information. If you didn’t like my IM example, think about people playing online tic-tac-toe. If I put an “X” in place, it will take a few seconds for my opponent to see that “X”. Then it will take a few seconds for me to see where they placed their “O”. This is because servers are programmed to update information in certain time increments. In an online game, this could be every second or part of a second, and in something like a newsfeed it may be every few minutes. With SignalR information is displayed in real time, without any time lag.
Some of you may be asking, “So what?” If a program updates every part of a second, it doesn’t even seem like there is a time lag. True, but the fact remains that there is a time lag, and for certain programs (think IM again) real time response is the answer. Now the SignalR step has been taken and developers have started using it in certain situations. SignalR is not for every application, but there are specific types of applications that are a perfect fit. Watch for my follow up blog going into when SignalR is right tool to use.