SlideShare a Scribd company logo
2
Most read
3
Most read
16
Most read
Adam Mokan
  @adammokan

Desert Code Camp
    Nov 5th, 2011
What is SignalR?
•   Creates a “persistent connection” between
    server and client(s) in ASP.NET allowing you
    to push data from server to client.
•   Led by David Fowler and Damian Edwards.
•   Not an official Microsoft project.
•   OSS project on Github with MIT License.
•   NuGet packages available.
•   Simple to setup & just works.
          Install-Package SignalR
Potential use-cases
      •     Chat - Don’t be that developer *
      •     Real-time impact analysis on current users
      •     Pub-sub mechanism for analytics, logging,
            exception capture
      •     Real-time charting without repeat client-side
            ajax polling
      •     Collaborative applications allowing multiple
            users to interact with the same screen
      •     Real-time analytics dashboard showing client
            details (geo-location based on IP address,
            browser info, screen resolution, etc)
      •     “Growl-like” notifications for users
* No offense towards someone that has the real need to build a chat application from scratch but this reminds
                        me of the “Learn Rails and build a blog” tutorials years ago.
Samples
SignalR.Server
• Two primary approaches to
  implementing
 • Persistent Connections (low-level)
   • Implements an IHttpHandler
   • Must implement a route to make the endpoint accessible.
   • public class TestEndpoint : PersistentConnection { // do
         something }
 •   Hubs (high-level)
     •   Automatically implements route over “<app>/signalr/hubs/” by
         convention.
     •   public class TestHub : Hub { // do something }
SignalR client
         libraries
• SignalR.Js - Javascript SignalR client
• SignalR.Client - .NET client for
  SignalR
• SignalR.Client.WP7 - Windows Phone
  client for SignalR
Wait, I thought WebSockets
   were meant for this?

This all works over HTTP?
Let’s look at how we interact with the web
in a vast majority of scenarios and how some
  HTTP cleverness allows SignalR to work.
The basic Request-Response pattern
Introduction to SignalR
A simple example of polling via AJAX.
http://www.flickr.com/photos/londonmatt/4204313724/




What is long-polling?
Introduction to SignalR
Let’s look at some code.
Resources

      Bitly bundle * - bit.ly/signalr-dcc11
SignalR git repo - github.com/SignalR/SignalR
SignalR docs - github.com/SignalR/SignalR/wiki


        * More resources will be added
        to the bitly bundle in the future
Thank you!
Please review the presentation with any feedback
  or criticisms at speakerrate.com/talks/8878

More Related Content

PPT
Intro to signalR
PPTX
SignalR for ASP.NET Developers
PPTX
Real-time ASP.NET with SignalR
PPTX
SignalR Overview
PPTX
SignalR with asp.net
ODP
Testing RESTful Webservices using the REST-assured framework
PDF
Gradle Introduction
PDF
Introduction to SignalR
Intro to signalR
SignalR for ASP.NET Developers
Real-time ASP.NET with SignalR
SignalR Overview
SignalR with asp.net
Testing RESTful Webservices using the REST-assured framework
Gradle Introduction
Introduction to SignalR

What's hot (20)

PDF
Spring Framework - Core
PDF
Spring Boot & Actuators
PDF
Spring Framework - AOP
PPTX
Spring mvc
PPTX
ASP.NET Core MVC + Web API with Overview
PPSX
SignalR With ASP.Net part1
PPT
PPTX
Spring Framework
PDF
Intro To React Native
PDF
Introduction to ReactJS
PPTX
Spring boot Introduction
PDF
Spring boot introduction
PDF
Spring Boot
PPTX
Spring boot
PPTX
Spring Boot Tutorial
PPTX
Spring beans
PPTX
Introduction to React JS for beginners | Namespace IT
PDF
React js
PPTX
Single Page Application
PPTX
reactJS
Spring Framework - Core
Spring Boot & Actuators
Spring Framework - AOP
Spring mvc
ASP.NET Core MVC + Web API with Overview
SignalR With ASP.Net part1
Spring Framework
Intro To React Native
Introduction to ReactJS
Spring boot Introduction
Spring boot introduction
Spring Boot
Spring boot
Spring Boot Tutorial
Spring beans
Introduction to React JS for beginners | Namespace IT
React js
Single Page Application
reactJS
Ad

Viewers also liked (20)

PDF
SignalR
PPTX
Real time Communication with Signalr (Android Client)
PPTX
Building Realtime Web Applications With ASP.NET SignalR
PPTX
SignalR
DOC
Top 9 c#.net interview questions answers
PDF
PPTX
Microsoft WebApi & SignalR
PPSX
Signalr with ASP.Net part2
PPTX
SignalR
PDF
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
PPTX
Real time web applications with SignalR (BNE .NET UG)
PPTX
«Real Time» Web Applications with SignalR in ASP.NET
PPTX
SignalR. Code, not toothpaste - TechDays Belgium 2012
PPTX
Real time web with SignalR
PPTX
C#.net
PPTX
MVC 6 Introduction
PPTX
ASP.NET Brief History
PPTX
Dotnet Basics Presentation
PPTX
Angular JS
PPTX
MVC - Introduction
SignalR
Real time Communication with Signalr (Android Client)
Building Realtime Web Applications With ASP.NET SignalR
SignalR
Top 9 c#.net interview questions answers
Microsoft WebApi & SignalR
Signalr with ASP.Net part2
SignalR
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
Real time web applications with SignalR (BNE .NET UG)
«Real Time» Web Applications with SignalR in ASP.NET
SignalR. Code, not toothpaste - TechDays Belgium 2012
Real time web with SignalR
C#.net
MVC 6 Introduction
ASP.NET Brief History
Dotnet Basics Presentation
Angular JS
MVC - Introduction
Ad

Similar to Introduction to SignalR (20)

PPTX
SignalR Powered X-Platform Real-Time Apps!
PPTX
SignalR powered real-time x-plat mobile apps!
PPTX
Real time websites and mobile apps with SignalR
PPTX
SignalR Intro + WPDev
PPTX
Signal R 2015
PPTX
signalr
PPTX
Realtime web experience with signalR
PPTX
SignalR Intro + WPDev integration @ Codetock
PPTX
SignalR + Mobile Possibilities
PDF
SignalR: Add real-time to your applications
PPTX
SignalR Introduction
PPTX
Real-time Communications with SignalR
PPTX
ASP.NET MVC 5 and SignalR 2
PPTX
Brushing skills on SignalR for ASP.NET developers
PPTX
Real-time web applications using SharePoint, SignalR and Azure Service Bus
PPTX
Real-time Communication using SignalR and cloud
PPTX
Real Time Web with SignalR
PPTX
SignalR with ASP.NET MVC 6
PDF
PDF
MCQs on SignalR
SignalR Powered X-Platform Real-Time Apps!
SignalR powered real-time x-plat mobile apps!
Real time websites and mobile apps with SignalR
SignalR Intro + WPDev
Signal R 2015
signalr
Realtime web experience with signalR
SignalR Intro + WPDev integration @ Codetock
SignalR + Mobile Possibilities
SignalR: Add real-time to your applications
SignalR Introduction
Real-time Communications with SignalR
ASP.NET MVC 5 and SignalR 2
Brushing skills on SignalR for ASP.NET developers
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time Communication using SignalR and cloud
Real Time Web with SignalR
SignalR with ASP.NET MVC 6
MCQs on SignalR

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Chapter 3 Spatial Domain Image Processing.pdf
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

Introduction to SignalR

  • 1. Adam Mokan @adammokan Desert Code Camp Nov 5th, 2011
  • 2. What is SignalR? • Creates a “persistent connection” between server and client(s) in ASP.NET allowing you to push data from server to client. • Led by David Fowler and Damian Edwards. • Not an official Microsoft project. • OSS project on Github with MIT License. • NuGet packages available. • Simple to setup & just works. Install-Package SignalR
  • 3. Potential use-cases • Chat - Don’t be that developer * • Real-time impact analysis on current users • Pub-sub mechanism for analytics, logging, exception capture • Real-time charting without repeat client-side ajax polling • Collaborative applications allowing multiple users to interact with the same screen • Real-time analytics dashboard showing client details (geo-location based on IP address, browser info, screen resolution, etc) • “Growl-like” notifications for users * No offense towards someone that has the real need to build a chat application from scratch but this reminds me of the “Learn Rails and build a blog” tutorials years ago.
  • 5. SignalR.Server • Two primary approaches to implementing • Persistent Connections (low-level) • Implements an IHttpHandler • Must implement a route to make the endpoint accessible. • public class TestEndpoint : PersistentConnection { // do something } • Hubs (high-level) • Automatically implements route over “<app>/signalr/hubs/” by convention. • public class TestHub : Hub { // do something }
  • 6. SignalR client libraries • SignalR.Js - Javascript SignalR client • SignalR.Client - .NET client for SignalR • SignalR.Client.WP7 - Windows Phone client for SignalR
  • 7. Wait, I thought WebSockets were meant for this? This all works over HTTP?
  • 8. Let’s look at how we interact with the web in a vast majority of scenarios and how some HTTP cleverness allows SignalR to work.
  • 11. A simple example of polling via AJAX.
  • 14. Let’s look at some code.
  • 15. Resources Bitly bundle * - bit.ly/signalr-dcc11 SignalR git repo - github.com/SignalR/SignalR SignalR docs - github.com/SignalR/SignalR/wiki * More resources will be added to the bitly bundle in the future
  • 16. Thank you! Please review the presentation with any feedback or criticisms at speakerrate.com/talks/8878