Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Real-time Communications
with SignalR
Shravan Kumar Kasagoni
Agenda
1) Introduction to the real-time web
2) ASP.NET SignalR
3) Building a real-time
Real-time Application?
Real-time functionality is the ability to have server code
push content to connected clients instan...
Without real-time
With real-time
Why Real-time?
Users want the latest info, NOW!
Show Me Some Examples
 Twitter, Facebook, Mail - live searches/updates
 Stock streamers
 Auctions
 Interactive games
...
How to build real-time web apps?
HTTP is an old beast…
Never designed for real-time communications
 Web is all about request-response
 Web is stateless
How to do real-time in web?
Periodic polling
 Poll from time to time using Ajax
 Delay in communication due to polling interval
 Wastes bandwidth &...
Long polling
 Poll but doesn’t respond until there's data
 Poll again after data received or after the connection
times ...
Forever Frame
 Server tells client that response is chucked
 Client keeps connection open until server closes it
 Serve...
HTML5 Web sockets
 Extension to HTTP
 Provides raw sockets over HTTP
 Full-duplex
 Traverses proxies
 It's still a wo...
too many options
Basically…
Introducing SignalR
• Abstraction over transports
• Events instead of task/async
• Connection management
• Broadcast or ta...
What does SignalR do?
• Client to Server persistent connection over HTTP
• Easily build multi-user, real-time web applicat...
SignalR Fallback
Long
Polling
Forever
Frames
Server
Sent
Events
Web
Sockets
What does SignalR do?
• Allows server-to-client push and RPC
• Built async to scale to 1000’s of connections
• Scale out w...
Backplane
SignalR Backplanes
Load balancing via a common transport mechanism
Thank You
Real-time Communications with SignalR
Upcoming SlideShare
Loading in …5
×

Real-time Communications with SignalR

How to build real-time application using SignalR and asp.net.

  • Be the first to comment

Real-time Communications with SignalR

  1. 1. Real-time Communications with SignalR Shravan Kumar Kasagoni
  2. 2. Agenda 1) Introduction to the real-time web 2) ASP.NET SignalR 3) Building a real-time
  3. 3. Real-time Application? Real-time functionality is the ability to have server code push content to connected clients instantly as it becomes available, rather than having the server wait for a client to request new data.
  4. 4. Without real-time
  5. 5. With real-time
  6. 6. Why Real-time? Users want the latest info, NOW!
  7. 7. Show Me Some Examples  Twitter, Facebook, Mail - live searches/updates  Stock streamers  Auctions  Interactive games  Live Scores  Collaborative apps (google docs, office web apps)  Live user analytics (live graphs)
  8. 8. How to build real-time web apps?
  9. 9. HTTP is an old beast… Never designed for real-time communications  Web is all about request-response  Web is stateless
  10. 10. How to do real-time in web?
  11. 11. Periodic polling  Poll from time to time using Ajax  Delay in communication due to polling interval  Wastes bandwidth & latency Server Client Polling interval
  12. 12. Long polling  Poll but doesn’t respond until there's data  Poll again after data received or after the connection times out  Consumes server & threads & connection resources Server Client
  13. 13. 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 threads Server Client
  14. 14. HTML5 Web sockets  Extension to HTTP  Provides raw sockets over HTTP  Full-duplex  Traverses proxies  It's still a working draft  Not every proxy server supports it  Not every web server supports it  Not every browser supports it  They are raw sockets!
  15. 15. too many options
  16. 16. Basically…
  17. 17. Introducing SignalR • Abstraction over transports • Events instead of task/async • Connection management • Broadcast or target specific client
  18. 18. What does SignalR do? • Client to Server persistent connection over HTTP • Easily build multi-user, real-time web applications • Auto-negotiates transport
  19. 19. SignalR Fallback Long Polling Forever Frames Server Sent Events Web Sockets
  20. 20. What does SignalR do? • Allows server-to-client push and RPC • Built async to scale to 1000’s of connections • Scale out with Service Bus, SQL Server & Redis • Open Source on GitHub
  21. 21. Backplane SignalR Backplanes Load balancing via a common transport mechanism
  22. 22. Thank You

    Be the first to comment

    Login to see the comments

  • techieshravan

    May. 21, 2015

How to build real-time application using SignalR and asp.net.

Views

Total views

1,323

On Slideshare

0

From embeds

0

Number of embeds

9

Actions

Downloads

76

Shares

0

Comments

0

Likes

1

×