Your PresenterShravan Kumar KasagoniSoftware Engineer @ Thomson ReutersMicrosoft MVP – ASP.NET / IIS | MCPMicrosoft User Group Hyderabadhttp://theshravan.net@techieshravan
AgendaIntroduction to real-time appsWhat is SignalR?DemosSignalR ComponentsScaleout SignalR
Real-time Application?Real-time functionality is the ability to haveserver code push content to connected clientsinstantly as it becomes available, rather thanhaving the server wait for a client to request newdata.
Show Me Some Examples Twitter, Facebook, Mail - live searches/updates Stock streamers Auctions Interactive games Live Scores Collaborative apps (google docs, office webapps) Live user analytics (live graphs)
HTTP is an old beast…Never designed for real-timecommunications Web is all about request-response Web is stateless
Periodic polling Poll from time to time using Ajax Delay in communication due to polling interval Wastes bandwidth & latencyServerClientPolling interval
Long polling Poll but doesn’t respond until theres data Poll again after data received or after the connectiontimes out Consumes server & threads & connection resourcesServerClient
Forever Frame Server tells client that response is chucked Client keeps connection open until server closes it Server pushed data to the client followed by 0 Consumes server threadsServerClient
HTML5 Web sockets Extension to HTTP Provides raw sockets over HTTP Full-duplex Traverses proxies Its still a draft Not every proxy server supports it Not every web server supports it Not every browser supports it They are raw sockets!
What is SignalR?An open-source series of libraries that provide anabstraction around persistent HTTP connectionsSignalR makes real-time HTTP so easyit seems like magic that it works[In English, please]