SlideShare a Scribd company logo
SIGNALR : INCREDIBLY SIMPLE REAL-TIME FOR ASP.NET
COȘCODAN MIHAIL
SUMMARY
• DEFINING PROBLEM SPACE
• EXISTING TECHNOLOGIES
• INTRODUCTION TO SIGNALR
• ARCHITECTURE AND COMPONENTS
• DEMO/EXAMPLES
THE PROBLEM: CLIENT WANT FRESH
DATA
• You (the «customer») want latest info (data)!
• You need them NOW!
• RealTime!
Examples of apps :
• Twitter / Facebook / many more…
• Notifications.
• Auctions / Stock trading / Banking.
• Live user analitics
• Search/update
• Collaborative apps(Google docs,
• Interactive games
REALTIME APPLICATIONS, DEVELOPERVIEW
• Persistent Connections between endpoints.
• Two way communication (full-duplex).
• Low Latency ( :D ).
• Low overhead.
• Over the «wire» (intranet/internet/generic communication medium).
EXISTINGTECHNIQUES/SOLUTIONS
• Pooling;
• Long Pooling;
• Forever Frame;
• Server Sent Events(SSE);
• WebSockets;
PERIODIC POLLING
 Poll from time to time using Ajax
 Delay in communication due to polling interval
 Wastes bandwidth & latency & resources
Server
Client
Polling interval
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
 Better than the previous one: less requests.
Server
Client
FOREVER FRAME
Server
Client
 This technique is very low-latency because it avoids HTTP and
TCP/IP set-up and tear-down by reusing a single long-lived
connection. It uses "chunked encoding", a feature of HTTP/1.1
intended for an entirely different purpose, but which allows the
server to maintain a connection to the client indefinitely, sending
additional data to the client at will.
IFRAME ("Forever frame"): Loading a page in an IFRAME that incrementally receives
commands wrapped in <script> tags, which the browser evaluates as they are
received.
• Data is sent out in chunks.
• Add an IFrame to the page (its content length is declared to be
indefinitely long).
• Load in the IFrame a page with a script in it (execute it to get your
chunk of data).
• The next chunk of data arrives in the form of another script that is
executed again.
• The cycle goes on and on and on...
It causes pollution in the long run…all those script tags stays there even if you don’t
need them anymore.
FOREVER FRAME IEWAY
Server-Sent Events (SSE) are a standard describing how servers can
initiate data transmission towards clients once an initial client
connection has been established. They are commonly used to send
message updates or continuous data streams to a browser client and
designed to enhance native, cross-browser streaming through a
JavaScript API called EventSource, through which a client requests a
particular URL in order to receive an event stream.
Server-Sent Events (SSE)
HOWTO BUILD REAL-TIMEWEB APPS?
 Never designed for real-time communications
 Web is all about request-response
 Web is stateless
INTRODUCTING SIGNALR HISTORY
• Signal R was created as an open source project by two
Microsoft employees: David Fowler & Damien Edwards
• Adopted by Microsoft, but remains open source on
GitHub
• Like jQuery for communication
• Distributed via NuGet
INTRODUCTING SIGNALR
• SignalR is a series of abstractions around a few persistent HTTP
techniques(library).
• Persistent Connection Abstraction communication library.
• Abstracts protocol and transfer (choses the best one).
• A single programming model (a unified development experience).
• Extremely simple to use.
• Server-side it can be hosted in different «environments» (ASP.NET,
console apps, windows services, etc…).
• Client-side there’s support for: Javascript clients, .NET clients, WP;
provide by the community: iOS, Android.
SIGNALR COMPONENTS
Clients
.NET 4.0+
JavaScript
Windows store apps
Silverlight 5
Windows Phone 8
iOS
Android
Hosts
ASP.NET
OWIN
Backplanes
SQL
Service Bus
Redis
ARCHITECTURE DIAGRAM
Picture was taken from http://www.asp.net/signalr
SIGNALR: SETUP DEMO
Demo: how to setup SignalR,
GitHub or NuGet,
see websockets in action.
TWO LEVELS OF ABSTRACTION
Picture was taken from book ASP.NET SignalR Incredibily simple real-time features for your web apps by Jose M. Aguilar
CONCEPTUAL IMPLEMENTATIONOF
PERSISTENTCONNECTIONS
CONCEPTUAL IMPLEMENTATION OF
HUBS
The use of hubs is recommended when we need to send different types of
messages with various structures between the client and the server.
CONCLUSIONS
• SignalR is a server-side software system designed for writing
scalable Internet applications, notably web servers. Programs are
written on the server side in C#, using event-driven, asynchronous
I/O to minimize overhead and maximize scalability.
• SignalR takes advantage of several transports, automatically
selecting the best available transport given the client's and server's
best available transport.
RESOURCES
Microsoft ASP.NET SignalR: The Real-Time Web Made Simple
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DEV-B302
Building Real-time Web Apps with ASP.NET SignalR
http://channel9.msdn.com/Events/Build/2012/3-034
Introducing ASP.NET SignalR - Push Services with Hubs
http://pluralsight.com/training/courses/TableOfContents?courseName=signalr-
introduction
github.com/SignalR/SignalR
https://html.spec.whatwg.org/multipage/comms.html
TIME FOR SOME Q&A
THANK ALL FOR ATTENDING

More Related Content

PPTX
«Real Time» Web Applications with SignalR in ASP.NET
PDF
SignalR
PPSX
SignalR With ASP.Net part1
PPT
PPTX
SignalR for ASP.NET Developers
PPTX
SignalR
PPSX
Signalr with ASP.Net part2
PPTX
Real time Communication with Signalr (Android Client)
«Real Time» Web Applications with SignalR in ASP.NET
SignalR
SignalR With ASP.Net part1
SignalR for ASP.NET Developers
SignalR
Signalr with ASP.Net part2
Real time Communication with Signalr (Android Client)

What's hot (19)

PPTX
Real-time ASP.NET with SignalR
PPTX
Building Realtime Web Applications With ASP.NET SignalR
PPTX
Introduction to SignalR
PPTX
SignalR with ASP.NET MVC 6
PPTX
signalr
PPTX
SignalR with asp.net
PDF
Introduction to SignalR
PPTX
SignalR Overview
PPT
Intro to signalR
PPTX
Real time web with SignalR
PPTX
Spring Cloud: API gateway upgrade & configuration in the cloud
PPTX
Scale your signalR realtime web application
PPTX
Real-time Communications with SignalR
PPTX
Real time web applications with SignalR (BNE .NET UG)
PDF
Jax london - Battle-tested event-driven patterns for your microservices archi...
PPTX
SignalR. Code, not toothpaste - TechDays Belgium 2012
PDF
Advanced Microservices Caching Patterns - Devoxx UK
PDF
Exactly Once Delivery is a Harsh Mistress - Natan Silnitsky
PPTX
IoT with SignalR & .NET Gadgeteer - NetMF@Work
Real-time ASP.NET with SignalR
Building Realtime Web Applications With ASP.NET SignalR
Introduction to SignalR
SignalR with ASP.NET MVC 6
signalr
SignalR with asp.net
Introduction to SignalR
SignalR Overview
Intro to signalR
Real time web with SignalR
Spring Cloud: API gateway upgrade & configuration in the cloud
Scale your signalR realtime web application
Real-time Communications with SignalR
Real time web applications with SignalR (BNE .NET UG)
Jax london - Battle-tested event-driven patterns for your microservices archi...
SignalR. Code, not toothpaste - TechDays Belgium 2012
Advanced Microservices Caching Patterns - Devoxx UK
Exactly Once Delivery is a Harsh Mistress - Natan Silnitsky
IoT with SignalR & .NET Gadgeteer - NetMF@Work
Ad

Similar to Signal R 2015 (20)

PPTX
SignalR powered real-time x-plat mobile apps!
PPTX
SignalR Powered X-Platform Real-Time Apps!
PPTX
Real-time web applications using SharePoint, SignalR and Azure Service Bus
PPTX
Real Time Web with SignalR
PDF
PPTX
Real time web applications with signal r
PPTX
Web e device in real time con asp.net Signal R
PPTX
SignalR
PPTX
Realtime web experience with signalR
PPTX
Microsoft signal r
PPTX
Aplicaciones en tiempo real con SignalR
PPTX
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
PPTX
SignalR Intro + WPDev
PPTX
SignalR + Mobile Possibilities
PPTX
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
PPTX
SignalR Dublin ALT.NET
PPTX
ASP.NET MVC 5 and SignalR 2
PDF
PPTX
Real time websites and mobile apps with SignalR
PPTX
Real Time Apps with SignalR Core
SignalR powered real-time x-plat mobile apps!
SignalR Powered X-Platform Real-Time Apps!
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real Time Web with SignalR
Real time web applications with signal r
Web e device in real time con asp.net Signal R
SignalR
Realtime web experience with signalR
Microsoft signal r
Aplicaciones en tiempo real con SignalR
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
SignalR Intro + WPDev
SignalR + Mobile Possibilities
How SignalR and SQL Dependency Work Process in ASP.NET with SQL Server?
SignalR Dublin ALT.NET
ASP.NET MVC 5 and SignalR 2
Real time websites and mobile apps with SignalR
Real Time Apps with SignalR Core
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Building Integrated photovoltaic BIPV_UPV.pdf
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
“AI and Expert System Decision Support & Business Intelligence Systems”
Encapsulation_ Review paper, used for researhc scholars

Signal R 2015

  • 1. SIGNALR : INCREDIBLY SIMPLE REAL-TIME FOR ASP.NET COȘCODAN MIHAIL
  • 2. SUMMARY • DEFINING PROBLEM SPACE • EXISTING TECHNOLOGIES • INTRODUCTION TO SIGNALR • ARCHITECTURE AND COMPONENTS • DEMO/EXAMPLES
  • 3. THE PROBLEM: CLIENT WANT FRESH DATA • You (the «customer») want latest info (data)! • You need them NOW! • RealTime! Examples of apps : • Twitter / Facebook / many more… • Notifications. • Auctions / Stock trading / Banking. • Live user analitics • Search/update • Collaborative apps(Google docs, • Interactive games
  • 4. REALTIME APPLICATIONS, DEVELOPERVIEW • Persistent Connections between endpoints. • Two way communication (full-duplex). • Low Latency ( :D ). • Low overhead. • Over the «wire» (intranet/internet/generic communication medium).
  • 5. EXISTINGTECHNIQUES/SOLUTIONS • Pooling; • Long Pooling; • Forever Frame; • Server Sent Events(SSE); • WebSockets;
  • 6. PERIODIC POLLING  Poll from time to time using Ajax  Delay in communication due to polling interval  Wastes bandwidth & latency & resources Server Client Polling interval
  • 7. 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  Better than the previous one: less requests. Server Client
  • 8. FOREVER FRAME Server Client  This technique is very low-latency because it avoids HTTP and TCP/IP set-up and tear-down by reusing a single long-lived connection. It uses "chunked encoding", a feature of HTTP/1.1 intended for an entirely different purpose, but which allows the server to maintain a connection to the client indefinitely, sending additional data to the client at will.
  • 9. IFRAME ("Forever frame"): Loading a page in an IFRAME that incrementally receives commands wrapped in <script> tags, which the browser evaluates as they are received. • Data is sent out in chunks. • Add an IFrame to the page (its content length is declared to be indefinitely long). • Load in the IFrame a page with a script in it (execute it to get your chunk of data). • The next chunk of data arrives in the form of another script that is executed again. • The cycle goes on and on and on... It causes pollution in the long run…all those script tags stays there even if you don’t need them anymore. FOREVER FRAME IEWAY
  • 10. Server-Sent Events (SSE) are a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established. They are commonly used to send message updates or continuous data streams to a browser client and designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client requests a particular URL in order to receive an event stream. Server-Sent Events (SSE)
  • 11. HOWTO BUILD REAL-TIMEWEB APPS?  Never designed for real-time communications  Web is all about request-response  Web is stateless
  • 12. INTRODUCTING SIGNALR HISTORY • Signal R was created as an open source project by two Microsoft employees: David Fowler & Damien Edwards • Adopted by Microsoft, but remains open source on GitHub • Like jQuery for communication • Distributed via NuGet
  • 13. INTRODUCTING SIGNALR • SignalR is a series of abstractions around a few persistent HTTP techniques(library). • Persistent Connection Abstraction communication library. • Abstracts protocol and transfer (choses the best one). • A single programming model (a unified development experience). • Extremely simple to use. • Server-side it can be hosted in different «environments» (ASP.NET, console apps, windows services, etc…). • Client-side there’s support for: Javascript clients, .NET clients, WP; provide by the community: iOS, Android.
  • 14. SIGNALR COMPONENTS Clients .NET 4.0+ JavaScript Windows store apps Silverlight 5 Windows Phone 8 iOS Android Hosts ASP.NET OWIN Backplanes SQL Service Bus Redis
  • 15. ARCHITECTURE DIAGRAM Picture was taken from http://www.asp.net/signalr
  • 16. SIGNALR: SETUP DEMO Demo: how to setup SignalR, GitHub or NuGet, see websockets in action.
  • 17. TWO LEVELS OF ABSTRACTION Picture was taken from book ASP.NET SignalR Incredibily simple real-time features for your web apps by Jose M. Aguilar
  • 19. CONCEPTUAL IMPLEMENTATION OF HUBS The use of hubs is recommended when we need to send different types of messages with various structures between the client and the server.
  • 20. CONCLUSIONS • SignalR is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in C#, using event-driven, asynchronous I/O to minimize overhead and maximize scalability. • SignalR takes advantage of several transports, automatically selecting the best available transport given the client's and server's best available transport.
  • 21. RESOURCES Microsoft ASP.NET SignalR: The Real-Time Web Made Simple http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DEV-B302 Building Real-time Web Apps with ASP.NET SignalR http://channel9.msdn.com/Events/Build/2012/3-034 Introducing ASP.NET SignalR - Push Services with Hubs http://pluralsight.com/training/courses/TableOfContents?courseName=signalr- introduction github.com/SignalR/SignalR https://html.spec.whatwg.org/multipage/comms.html
  • 23. THANK ALL FOR ATTENDING