Today, Scott Hanselman, in his keynote address, asserted that "real-time updates" are, in fact, when the server calls the client. He said there are four varieties:
- Server-side Events
- Long Polling (the client and server talk over a connection that is held open in lieu of the client asking the server "can you hear me?")
- Forever Frame
- Web Sockets
The first presentation I tried to go to was on a technology called SignalR by Chris Patterson, but the talk was packed and I could not get close enough to Chris to see his slides. SignalR is an alternative for Web Sockets.
What is SignalR? In its implementations, JavaScript runs inside a browser and sends messages back and forth to a chat server where a connection is made to a connection hub. Chris began to demo code which showed creating a method at a chat hub to expose to a browser (I think), but I couldn't follow his slides from where I was in the room. :(
The last time I went to the ATX code lunch, Jeremy Miller suggested that Web Sockets weren't too dandy because one still had to have a long polling failover for when they didn't work. Perhaps SignalR is indeed a better way to go. I'd like to know more about SignalR. I feel less inclined to learn web sockets.
No comments:
Post a Comment