SlideShare a Scribd company logo
SIGNALR


Building an async web app with .NET




            Oslo/NNUG
           Tomas Jansson
              29/01/13
Tomas Jansson
Manager/Faggruppeleder .NET
BEKK Oslo

@TomasJansson
http://blog.tomasjansson.com
AGENDA



         What is async web?
         Why async web?
         What is SignalR?
         How?
         Demo
         Summary
         Resources
WHAT IS ASYNC WEB?




When clients do not have
persistent connections              Client1



                                        1.




                                   Server
                         2.                   2.


                              3.              3.
            Client3                                Client2
WHAT IS ASYNC WEB?




When clients have persistent
connections against the server Client1



                                   1.




                               Server
                         2.              2.
            Client3                           Client2
WHY ASYNC WEB?




Richer clients

Diagnostic

Chat

Collaboration

Real-time analysis

Notifications

”Anything real-time”

”Anything collaborative”
WHAT IS SIGNALR?




Abstraction over persistent connections


Asynchronous scalable web applications


It’s like Socket.IO and nowjs (nodejs) for .NET
HOW?



1.   Install-package Microsoft.AspNet.SignalR -pre (-pre when pre-release)
2.   Server

              [HubName("simple")]
              public class SimpleHub : Hub
              {
                  public void CallOut(string message)
                  {
                      Clients.Others(message);
                  }
              }

3.   Client

              $(function() {
                  var simpleHub = $.connection.simple;
                  $.extend(simpleHub.client, {
                      echo: function(message) { alert(message); }
                  });
                  $("#some-button").click(function() {
                      simpleHub.server.callOut("Echo");
                  });
              });
DEMO TIME!




1. Persistent connection

2. Chat

3. Chat with Redis

4. (Windows app client) – if there is time
SCALE OUT




                                   pub/sub
           Server 1                                     Server 2




Client 1     Client 2   Client 3             Client 4     Client 5   Client 6
SUMMARY




• Async web is coming for you

• Collaboration, real-time and notification systems

• SignalR is a simple to use persistent connection abstraction for .NET
RESOURCE




• Demo projects: https://github.com/mastoj/SignalRPres

• SignalR project page: http://www.signalr.net

• SignalR on github: https://github.com/SignalR/SignalR (good samples)

• Redis for windows: http://tinyurl.com/winredis (Microsoft Open Tech)
Questions?

More Related Content

What's hot (19)

How to Design Reliable and Scalable Webhooks with RabbitMQ
How to Design Reliable and Scalable Webhooks with RabbitMQ
Jim Liao
 
Pune Ruby Meetup - November 2015
Pune Ruby Meetup - November 2015
Amura Marketing Technologies Pvt. Ltd.
 
Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...
vsoshnikov
 
Sitecore Universal tracker
Sitecore Universal tracker
Atanas Desev
 
Creating Custom Slack Integrations with Vapor 3 (Redux)
Creating Custom Slack Integrations with Vapor 3 (Redux)
🔴 Keli'i Martin
 
Moving to the Cloud with ny times.com
Moving to the Cloud with ny times.com
bgerst
 
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
vsoshnikov
 
Vagrant
Vagrant
ProfessionalVMware
 
Introduction to node
Introduction to node
Justin Woo
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli
 
Protecting your site by detection
Protecting your site by detection
Marko Heijnen
 
Ez Content Staging for the rest of us
Ez Content Staging for the rest of us
Gaetano Giunta
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
AWS Chicago
 
How we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump host
Faelix Ltd
 
Exploradores.caroes
Exploradores.caroes
maryespitia
 
RocketJS Nodejs rapid development framework for production web apps
RocketJS Nodejs rapid development framework for production web apps
wavome
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
Owain Perry
 
Find Number of VM message in Mule
Find Number of VM message in Mule
Sunil Kumar
 
Getting Started with CAS
Getting Started with CAS
Misagh Moayyed
 
How to Design Reliable and Scalable Webhooks with RabbitMQ
How to Design Reliable and Scalable Webhooks with RabbitMQ
Jim Liao
 
Master-Master Replication and Scaling of an Application Between Each of the I...
Master-Master Replication and Scaling of an Application Between Each of the I...
vsoshnikov
 
Sitecore Universal tracker
Sitecore Universal tracker
Atanas Desev
 
Creating Custom Slack Integrations with Vapor 3 (Redux)
Creating Custom Slack Integrations with Vapor 3 (Redux)
🔴 Keli'i Martin
 
Moving to the Cloud with ny times.com
Moving to the Cloud with ny times.com
bgerst
 
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
vsoshnikov
 
Introduction to node
Introduction to node
Justin Woo
 
Mule esb How to convert from Json to Xml in 5 minutes
Mule esb How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli
 
Protecting your site by detection
Protecting your site by detection
Marko Heijnen
 
Ez Content Staging for the rest of us
Ez Content Staging for the rest of us
Gaetano Giunta
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
AWS Chicago
 
How we found a firewall vendor bug using Teleport as a bastion jump host
How we found a firewall vendor bug using Teleport as a bastion jump host
Faelix Ltd
 
Exploradores.caroes
Exploradores.caroes
maryespitia
 
RocketJS Nodejs rapid development framework for production web apps
RocketJS Nodejs rapid development framework for production web apps
wavome
 
Continuous delivery of Windows micro services in the cloud
Continuous delivery of Windows micro services in the cloud
Owain Perry
 
Find Number of VM message in Mule
Find Number of VM message in Mule
Sunil Kumar
 
Getting Started with CAS
Getting Started with CAS
Misagh Moayyed
 

Similar to SignalR - Building an async web app with .NET (20)

SignalR for ASP.NET Developers
SignalR for ASP.NET Developers
Shivanand Arur
 
Real-time Communications with SignalR
Real-time Communications with SignalR
Shravan Kumar Kasagoni
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Dinusha Kumarasiri
 
Real time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalR
Roy Cornelissen
 
Connected Web Systems
Connected Web Systems
Damir Dobric
 
SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
Sam Basu
 
SignalR with asp.net
SignalR with asp.net
Martin Bodocky
 
SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!
Sam Basu
 
Real time web apps
Real time web apps
Sepehr Rasouli
 
Realtime web experience with signalR
Realtime web experience with signalR
Ran Wahle
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applications
Eugene Zharkov
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
 
Real-time Communication using SignalR and cloud
Real-time Communication using SignalR and cloud
Radu Vunvulea
 
SignalR
SignalR
Troy Miles
 
SignalR with ASP.NET MVC 6
SignalR with ASP.NET MVC 6
Tung Nguyen Thanh
 
Signal r
Signal r
Vasilios Kuznos
 
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
Raju Ahmed
 
SignalR Overview
SignalR Overview
Michael Sukachev
 
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
.NET Conf UY
 
Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
Shravan Kumar Kasagoni
 
SignalR for ASP.NET Developers
SignalR for ASP.NET Developers
Shivanand Arur
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Dinusha Kumarasiri
 
Real time websites and mobile apps with SignalR
Real time websites and mobile apps with SignalR
Roy Cornelissen
 
Connected Web Systems
Connected Web Systems
Damir Dobric
 
SignalR powered real-time x-plat mobile apps!
SignalR powered real-time x-plat mobile apps!
Sam Basu
 
SignalR Powered X-Platform Real-Time Apps!
SignalR Powered X-Platform Real-Time Apps!
Sam Basu
 
Realtime web experience with signalR
Realtime web experience with signalR
Ran Wahle
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applications
Eugene Zharkov
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
Deepak Gupta
 
Real-time Communication using SignalR and cloud
Real-time Communication using SignalR and cloud
Radu Vunvulea
 
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
Raju Ahmed
 
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
.NET Conf UY
 
Building Realtime Web Applications With ASP.NET SignalR
Building Realtime Web Applications With ASP.NET SignalR
Shravan Kumar Kasagoni
 
Ad

More from Tomas Jansson (12)

Functional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suave
Tomas Jansson
 
F# as our day job by 2016
F# as our day job by 2016
Tomas Jansson
 
What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5
Tomas Jansson
 
Polyglot heaven
Polyglot heaven
Tomas Jansson
 
OWIN Web API with Linky
OWIN Web API with Linky
Tomas Jansson
 
Roslyn
Roslyn
Tomas Jansson
 
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
Tomas Jansson
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
 
Deployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCity
Tomas Jansson
 
State or intent
State or intent
Tomas Jansson
 
NServiceBus workshop presentation
NServiceBus workshop presentation
Tomas Jansson
 
REST for .NET - Introduction to ASP.NET Web API
REST for .NET - Introduction to ASP.NET Web API
Tomas Jansson
 
Functional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suave
Tomas Jansson
 
F# as our day job by 2016
F# as our day job by 2016
Tomas Jansson
 
What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5
Tomas Jansson
 
OWIN Web API with Linky
OWIN Web API with Linky
Tomas Jansson
 
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
Tomas Jansson
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
 
Deployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCity
Tomas Jansson
 
NServiceBus workshop presentation
NServiceBus workshop presentation
Tomas Jansson
 
REST for .NET - Introduction to ASP.NET Web API
REST for .NET - Introduction to ASP.NET Web API
Tomas Jansson
 
Ad

Recently uploaded (20)

PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 

SignalR - Building an async web app with .NET

  • 1. SIGNALR Building an async web app with .NET Oslo/NNUG Tomas Jansson 29/01/13
  • 2. Tomas Jansson Manager/Faggruppeleder .NET BEKK Oslo @TomasJansson http://blog.tomasjansson.com
  • 3. AGENDA What is async web? Why async web? What is SignalR? How? Demo Summary Resources
  • 4. WHAT IS ASYNC WEB? When clients do not have persistent connections Client1 1. Server 2. 2. 3. 3. Client3 Client2
  • 5. WHAT IS ASYNC WEB? When clients have persistent connections against the server Client1 1. Server 2. 2. Client3 Client2
  • 6. WHY ASYNC WEB? Richer clients Diagnostic Chat Collaboration Real-time analysis Notifications ”Anything real-time” ”Anything collaborative”
  • 7. WHAT IS SIGNALR? Abstraction over persistent connections Asynchronous scalable web applications It’s like Socket.IO and nowjs (nodejs) for .NET
  • 8. HOW? 1. Install-package Microsoft.AspNet.SignalR -pre (-pre when pre-release) 2. Server [HubName("simple")] public class SimpleHub : Hub { public void CallOut(string message) { Clients.Others(message); } } 3. Client $(function() { var simpleHub = $.connection.simple; $.extend(simpleHub.client, { echo: function(message) { alert(message); } }); $("#some-button").click(function() { simpleHub.server.callOut("Echo"); }); });
  • 9. DEMO TIME! 1. Persistent connection 2. Chat 3. Chat with Redis 4. (Windows app client) – if there is time
  • 10. SCALE OUT pub/sub Server 1 Server 2 Client 1 Client 2 Client 3 Client 4 Client 5 Client 6
  • 11. SUMMARY • Async web is coming for you • Collaboration, real-time and notification systems • SignalR is a simple to use persistent connection abstraction for .NET
  • 12. RESOURCE • Demo projects: https://github.com/mastoj/SignalRPres • SignalR project page: http://www.signalr.net • SignalR on github: https://github.com/SignalR/SignalR (good samples) • Redis for windows: http://tinyurl.com/winredis (Microsoft Open Tech)

Editor's Notes

  • #3: Hej, jag heter Tomas
  • #5: I en synkron miljø så tar hvert enkelt request en thread  mange request  lavere ytelse
  • #6: Nå er vi ikke avhengig av noen polling tid hvis vi har en «true» persistent connection.Modellen er asyn, så hver connection trenger ikke en egen thread.
  • #8: Vi trenger abstraktionen då web socket ikke er 100% støttet og å programmere mot socket er vanskeligDet er en abstraktion over en persistent connectionWebSockets --> server sent events --> forever frame --> long pollingWebSockets  persistent tcp connectionServer sent events /eventsource  one way messaging / client listens to eventsForever frame – En iframe etter sidlasting med en laaang connectionLong polling  poll and wait for dataSkallerer bra, lagrer ikke noe state på serveren. Har støtte for scale out gjenom redis og azure service bus som default.
  • #13: ASP.NET Web API finns demos og forklaringerDemo project kommer med magisk branching graf