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

PPTX
.NET Conf 2018: Build Great Libraries using .NET Standard
PPTX
Microservices with SenecaJS (part 2)
PPTX
Dev environment with Vagrant, Volodymyr Pavlenko
PPTX
Web sockets - Pentesting
PDF
London Hug 20/6 - Clustering RabbitMQ using Consul
PPTX
London Hug 20/6 - Vault production
PDF
Introduction to Reactive with Play and Akka - Markus Jura
PPTX
Introduction to node
.NET Conf 2018: Build Great Libraries using .NET Standard
Microservices with SenecaJS (part 2)
Dev environment with Vagrant, Volodymyr Pavlenko
Web sockets - Pentesting
London Hug 20/6 - Clustering RabbitMQ using Consul
London Hug 20/6 - Vault production
Introduction to Reactive with Play and Akka - Markus Jura
Introduction to node

What's hot (19)

PDF
How to Design Reliable and Scalable Webhooks with RabbitMQ
PPTX
Pune Ruby Meetup - November 2015
PDF
Master-Master Replication and Scaling of an Application Between Each of the I...
PPTX
Sitecore Universal tracker
PDF
Creating Custom Slack Integrations with Vapor 3 (Redux)
KEY
Moving to the Cloud with ny times.com
PDF
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
PPTX
PPTX
Introduction to node
PPTX
Mule esb How to convert from Json to Xml in 5 minutes
PDF
Protecting your site by detection
ODP
Ez Content Staging for the rest of us
PDF
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
PDF
How we found a firewall vendor bug using Teleport as a bastion jump host
PPTX
Exploradores.caroes
KEY
RocketJS Nodejs rapid development framework for production web apps
ODP
Continuous delivery of Windows micro services in the cloud
PPT
Find Number of VM message in Mule
PDF
Getting Started with CAS
How to Design Reliable and Scalable Webhooks with RabbitMQ
Pune Ruby Meetup - November 2015
Master-Master Replication and Scaling of an Application Between Each of the I...
Sitecore Universal tracker
Creating Custom Slack Integrations with Vapor 3 (Redux)
Moving to the Cloud with ny times.com
How to Shrink from 5 Tiers to 2 in a Multitier Microservices Architecture
Introduction to node
Mule esb How to convert from Json to Xml in 5 minutes
Protecting your site by detection
Ez Content Staging for the rest of us
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
How we found a firewall vendor bug using Teleport as a bastion jump host
Exploradores.caroes
RocketJS Nodejs rapid development framework for production web apps
Continuous delivery of Windows micro services in the cloud
Find Number of VM message in Mule
Getting Started with CAS
Ad

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

PPTX
Real time Communication with Signalr (Android Client)
PPTX
Signal R 2015
PPTX
Microsoft signal r
PDF
Developing Revolutionary Web Applications using Comet and Ajax Push
PDF
Writing Networking Clients in Go - GopherCon 2017 talk
PDF
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
PDF
Ajax Push For Revolutionary Enterprise Applications
PPTX
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
PPTX
SignalR Overview
PPT
DevNexus conference: How to Quickly Connect Internet of Things to IBM Bluemix...
PPTX
IoT with SignalR & .NET Gadgeteer - NetMF@Work
PPTX
.NET Conf 2019 高雄場 - .NET Core 3.0
PPTX
Mini-Training Owin Katana
PPTX
Azure Signalr Service
PPTX
SignalR with asp.net
PDF
The Happy Path: Migration Strategies for Node.js
PPTX
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
PDF
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
PDF
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
PDF
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
Real time Communication with Signalr (Android Client)
Signal R 2015
Microsoft signal r
Developing Revolutionary Web Applications using Comet and Ajax Push
Writing Networking Clients in Go - GopherCon 2017 talk
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
Ajax Push For Revolutionary Enterprise Applications
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
SignalR Overview
DevNexus conference: How to Quickly Connect Internet of Things to IBM Bluemix...
IoT with SignalR & .NET Gadgeteer - NetMF@Work
.NET Conf 2019 高雄場 - .NET Core 3.0
Mini-Training Owin Katana
Azure Signalr Service
SignalR with asp.net
The Happy Path: Migration Strategies for Node.js
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
Ad

More from Tomas Jansson (12)

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

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Modernizing your data center with Dell and AMD
PDF
Network Security Unit 5.pdf for BCA BBA.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Spectral efficient network and resource selection model in 5G networks
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Modernizing your data center with Dell and AMD
Network Security Unit 5.pdf for BCA BBA.

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