Building Realtime Web Applications With ASP.NET SignalR

5,091 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,091
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Building Realtime Web Applications With ASP.NET SignalR

  1. 1. Your PresenterShravan Kumar KasagoniSoftware Engineer @ Thomson ReutersMicrosoft MVP – ASP.NET / IIS | MCPMicrosoft User Group Hyderabadhttp://theshravan.net@techieshravan
  2. 2. AgendaIntroduction to real-time appsWhat is SignalR?DemosSignalR ComponentsScaleout SignalR
  3. 3. 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.
  4. 4. Why Real-time?Users want the latest info,NOW!
  5. 5. 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)
  6. 6. How to build real-time web apps?
  7. 7. HTTP is an old beast…Never designed for real-timecommunications Web is all about request-response Web is stateless
  8. 8. Periodic polling Poll from time to time using Ajax Delay in communication due to polling interval Wastes bandwidth & latencyServerClientPolling interval
  9. 9. 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
  10. 10. 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
  11. 11. 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!
  12. 12. too many options
  13. 13. 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]
  14. 14. SignalR on Old Servers or Clients
  15. 15. SignalR on New Servers and Clients
  16. 16. Basically…
  17. 17. What does SignalR do? Client to Server Persistent connectionover HTTP Easily build multi-user, real-time webapplications Auto-negotiates transport
  18. 18. SignalR FallbackLongPollingForeverFrameServerSentEventsWebSockets
  19. 19. http://shootr.signalr.nethttp://firework.cloudapp.net
  20. 20. CLIENTSBACKPLANESHOSTS
  21. 21. Three backplanes Windows Azure Service Bus SQL Server Redis
  22. 22. BackplaneLoad balancing via a common transport mechanism
  23. 23. Referenceshttp://www.asp.net/signalr/http://signalr.net/https://github.com/SignalR/SignalR/wiki
  24. 24. Keep in touchhttp://theshravan.net@techieshravanshravan.kasagoni@outlook.com

×