SlideShare une entreprise Scribd logo
1  sur  16
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
A simple example of polling via AJAX.
http://www.flickr.com/photos/londonmatt/4204313724/




What is long-polling?
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

Contenu connexe

Tendances

Web Servers: Architecture and Security
Web Servers: Architecture and SecurityWeb Servers: Architecture and Security
Web Servers: Architecture and Security
george.james
 
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
confluent
 

Tendances (20)

Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Web Servers: Architecture and Security
Web Servers: Architecture and SecurityWeb Servers: Architecture and Security
Web Servers: Architecture and Security
 
Web Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo FadojutimiWeb Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo Fadojutimi
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
Kafka Connect: Real-time Data Integration at Scale with Apache Kafka, Ewen Ch...
 
Understand front end developer
Understand front end developerUnderstand front end developer
Understand front end developer
 
Servlet Filters
Servlet FiltersServlet Filters
Servlet Filters
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
FRONT-END WEB DEVELOPMENT-Intro.pptx
FRONT-END WEB DEVELOPMENT-Intro.pptxFRONT-END WEB DEVELOPMENT-Intro.pptx
FRONT-END WEB DEVELOPMENT-Intro.pptx
 
Intro to WebSockets
Intro to WebSocketsIntro to WebSockets
Intro to WebSockets
 
Web api
Web apiWeb api
Web api
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
MERN PPT
MERN PPTMERN PPT
MERN PPT
 

En vedette

Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalRBuilding Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
Shravan Kumar Kasagoni
 
Top 9 c#.net interview questions answers
Top 9 c#.net interview questions answersTop 9 c#.net interview questions answers
Top 9 c#.net interview questions answers
Jobinterviews
 
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 ELEIÇÕES 2012 - ASTORGA: Toninho 31123 ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
Joao Carlos Passari
 
SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012
Maarten Balliauw
 

En vedette (20)

SignalR
SignalRSignalR
SignalR
 
Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalRBuilding Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
 
SignalR
SignalRSignalR
SignalR
 
Top 9 c#.net interview questions answers
Top 9 c#.net interview questions answersTop 9 c#.net interview questions answers
Top 9 c#.net interview questions answers
 
SignalR
SignalRSignalR
SignalR
 
Microsoft WebApi & SignalR
Microsoft WebApi & SignalRMicrosoft WebApi & SignalR
Microsoft WebApi & SignalR
 
Signalr with ASP.Net part2
Signalr with ASP.Net part2Signalr with ASP.Net part2
Signalr with ASP.Net part2
 
SignalR
SignalRSignalR
SignalR
 
SignalR
SignalRSignalR
SignalR
 
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 ELEIÇÕES 2012 - ASTORGA: Toninho 31123 ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 
Real time web applications with SignalR (BNE .NET UG)
Real time web applications with SignalR (BNE .NET UG)Real time web applications with SignalR (BNE .NET UG)
Real time web applications with SignalR (BNE .NET UG)
 
«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET«Real Time» Web Applications with SignalR in ASP.NET
«Real Time» Web Applications with SignalR in ASP.NET
 
SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012SignalR. Code, not toothpaste - TechDays Belgium 2012
SignalR. Code, not toothpaste - TechDays Belgium 2012
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
C#.net
C#.netC#.net
C#.net
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
ASP.NET Brief History
ASP.NET Brief HistoryASP.NET Brief History
ASP.NET Brief History
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics Presentation
 
Angular JS
Angular JSAngular JS
Angular JS
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 

Similaire à Introduction to SignalR

SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
Sam Basu
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax Push
Doris Chen
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?
Mark Russell
 
SignalR Intro + WPDev
SignalR Intro + WPDevSignalR Intro + WPDev
SignalR Intro + WPDev
Sam Basu
 
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
WSPDC & FEDSPUG
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Eduards Sizovs
 

Similaire à Introduction to SignalR (20)

Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
 
Transforming the web into a real application platform
Transforming the web into a real application platformTransforming the web into a real application platform
Transforming the web into a real application platform
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
 
Building Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR ServiceBuilding Real time Application with Azure SignalR Service
Building Real time Application with Azure SignalR Service
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax Push
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?RAP vs GWT Which AJAX Technology is for you?
RAP vs GWT Which AJAX Technology is for you?
 
Real time web
Real time webReal time web
Real time web
 
SignalR Intro + WPDev
SignalR Intro + WPDevSignalR Intro + WPDev
SignalR Intro + WPDev
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
Node.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontendsNode.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontends
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
FEDSPUG April 2014: Visual Studio 2013 for Application Lifecycle Management &...
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
 
Device APIs at TakeOff Conference
Device APIs at TakeOff ConferenceDevice APIs at TakeOff Conference
Device APIs at TakeOff Conference
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

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.
  • 10.
  • 11. A simple example of polling via AJAX.
  • 13.
  • 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