SlideShare une entreprise Scribd logo
1  sur  23
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

Contenu connexe

Tendances

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 SignalRShravan Kumar Kasagoni
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalRAdam Mokan
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudOrkhan Gasimov
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web applicationRan Wahle
 
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)brendankowitz
 
Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Natan Silnitsky
 
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 2012Maarten Balliauw
 
Advanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKAdvanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKNatan Silnitsky
 
Exactly Once Delivery is a Harsh Mistress - Natan Silnitsky
Exactly Once Delivery is a Harsh Mistress  - Natan SilnitskyExactly Once Delivery is a Harsh Mistress  - Natan Silnitsky
Exactly Once Delivery is a Harsh Mistress - Natan SilnitskyDevOpsDays Tel Aviv
 
IoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkIoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkMirco Vanini
 

Tendances (19)

Real-time ASP.NET with SignalR
Real-time ASP.NET with SignalRReal-time ASP.NET with SignalR
Real-time ASP.NET with 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
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SignalR with ASP.NET MVC 6
SignalR with ASP.NET MVC 6SignalR with ASP.NET MVC 6
SignalR with ASP.NET MVC 6
 
signalr
signalrsignalr
signalr
 
SignalR with asp.net
SignalR with asp.netSignalR with asp.net
SignalR with asp.net
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
SignalR Overview
SignalR OverviewSignalR Overview
SignalR Overview
 
Intro to signalR
Intro to signalRIntro to signalR
Intro to signalR
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web application
 
Real-time Communications with SignalR
Real-time Communications with SignalRReal-time Communications with SignalR
Real-time Communications with SignalR
 
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)
 
Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...Jax london - Battle-tested event-driven patterns for your microservices archi...
Jax london - Battle-tested event-driven patterns for your microservices archi...
 
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
 
Advanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UKAdvanced Microservices Caching Patterns - Devoxx UK
Advanced Microservices Caching Patterns - Devoxx UK
 
Exactly Once Delivery is a Harsh Mistress - Natan Silnitsky
Exactly Once Delivery is a Harsh Mistress  - Natan SilnitskyExactly Once Delivery is a Harsh Mistress  - Natan Silnitsky
Exactly Once Delivery is a Harsh Mistress - Natan Silnitsky
 
IoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@WorkIoT with SignalR & .NET Gadgeteer - NetMF@Work
IoT with SignalR & .NET Gadgeteer - NetMF@Work
 

Similaire à Signal R 2015

What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
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.jsChristian Heindel
 
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 ServiceJalpesh Vadgama
 
Streaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_VirenderStreaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_Virendervithakur
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svenssonrajivmordani
 
Netflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open SourceNetflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open Sourceaspyker
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008codebits
 
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 PushDoris Chen
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Bluegrass Digital
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los AngelesVMware Tanzu
 
Real Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.jsReal Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.jsSunny Sharma
 
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
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global dominationStfalcon Meetups
 
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...Amazon Web Services
 

Similaire à Signal R 2015 (20)

What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
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
 
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
 
Streaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_VirenderStreaming Sensor Data Slides_Virender
Streaming Sensor Data Slides_Virender
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
 
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
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Netflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open SourceNetflix Cloud Architecture and Open Source
Netflix Cloud Architecture and Open Source
 
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008Practical Thin Server Architecture With Dojo Sapo Codebits 2008
Practical Thin Server Architecture With Dojo Sapo Codebits 2008
 
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
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Real Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.jsReal Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.js
 
SignalR
SignalR SignalR
SignalR
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.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!
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...
AWS September Webinar Series - Visual Effects Rendering in the AWS Cloud with...
 

Dernier

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

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