SlideShare une entreprise Scribd logo
1  sur  34
Real time websites and
mobile apps with SignalR

Roy Cornelissen
Software Architect, Info Support
    @roycornelissen
agenda
                                     SignalR
           intro     push / pull
                                   architecture




                        multi       beyond
         implement
                      platform      websites
modern user interaction…
NServiceBus
 SignalR
                production
 gateway
                 monitor




showcase: real time production monitor
http has a pull model
http pull interactions                                                                “ajax”

server           processing                  read file    read file        process              process
           GET default.aspx                  GET a.jpg   GET b.js         GET x.ashx?...        POST

 client                          render                                            page lifetime




client 1
           Got msg?       Nope    Got msg?        Nope                               Got msg?     “message”

server      process                process                process                    process
                                                         POST “message”

client 2

                                             polling
!(realTime)
the push concept
the server takes the
initiative to send
data to the client
push protocols



    irc    smtp   websocket   server sent
                                events
today„s push protocols
                      • two way, persistent connection, initiated by
                        client
                      • W3C draft, worked on my IETF
                      • support (partial) in some browsers
        websocket


                      •   “pub/sub” like protocol over http
                      •   also still a W3C draft
                      •   one-way, client needs extra channel for send
                      •   proxies need to know about
 server sent events       content-type:text/event-stream
but I want it now!
                                   Veruca Salt
     Willy Wonka & The Chocolate Factory, 1971
other options
client 1
                      Got msg?                    “message”       Got msg?        “message”

server
                                             POST “message”                  POST “message”
client 2

                                     long polling
           <iframe src=“/forever”>
client 1                                            <script>                        <script>
                      GET /forever                   display(“message”);             display(“message”);
                                                    </script>                       </script>
server
                                              POST “message”                 POST “message”
client 2

                                     forever frame
SignalR to the rescue!
SignalR will abstract away the
actual protocol used, and adds
a couple of layers on top to
make things even easier

SignalR‟s layers of abstraction
hub


                                            persistent connection


SignalR 1.0                                         protocols
                              web sockets   server events     long polling   forever frame


•   Unified programming model
•   Deals with connectivity issues (connection slow, reconnect, disconnects)
•   Available for multiple types of clients
•   Messaging bus
•   Utilizes Json.NET for serialization
my connection

                            override Task OnConnected
       persistent
      connection            override Task OnReceived


                            override Task OnDisconnected


•   Base class for your own connection class
•   Fires events when clients connect, disconnect or send data
•   Allows grouping of connections
•   Deals with “raw” (string) data: do your own serialization
•   Your class gets instantiated with each new http connection
hubs
client/server boundaries fade
• hubs let you provide a sematic API between client and
  server
• SignalR creates a proxy between the two parties

        client (javascript)                                  server
var chat = $.connection.chatHub;              class ChatHub: Hub
…                                             {
chat.server.message(“hi!”);           proxy       public void message(string text)
…                                                 {
chat.client.notify = function(text)                   Clients.All.notify(text);
{                                                 }
    // do something with text                 }
}                                                       dynamic
sharing state
        client (javascript)                         server
var chat = $.connection.chatHub;   class ChatHub: Hub
                                   {
                                       public void message(string text)
chat.message(“test”);                  {
...                                        Clients.Caller.yourTicket = “123”;
alert(chat.state.yourTicket);          }
                                   }
                                                 dynamic
other platforms
SignalR clients



 JavaScript
JavaScript




             .NET
JavaScript   .NET




   Windows
    Phone
Windows
JavaScript   .NET
                     Phone




  Silverlight
Windows
JavaScript   .NET             Silverlight
                     Phone




        WinRT
Windows
JavaScript   .NET             Silverlight   WinRT
                     Phone
NServiceBus
 SignalR
                production
 gateway
                 monitor




showcase: real time production monitor
app architecture

       WinRT                        WPF                    iOS
      (data binding)             (data binding)   (INotifyPropertyChanged)




                               ViewModels



                       SignalR proxy & data contracts
beyond websites
                               clients


                     Windows
JavaScript   .NET              Silverlight   WinRT      iOS       Android
                      Phone



                                                                  Service
ASP.NET      OWIN    Custom                   SQL       Redis
                                                                    Bus



             hosts                                   backplanes
scaling out via backplanes


       B
www.nuget.org

www.github.com/signalr

www.github.com/gshackles/signalr
@roycornelissen

royc@infosupport.com

roycornelissen.wordpress.com




          thanks!

Contenu connexe

Tendances

Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesArmonDadgar
 
«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.NETAlessandro Giorgetti
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? Anton Weiss
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web applicationRan Wahle
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceRick Hightower
 
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
 
Linkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLinkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLeandro Totino Pereira
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservicesKunal Hire
 
21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIONiklaus Hirt
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio Mandar Jog
 
An Open-Source Platform to Connect, Manage, and Secure Microservices
An Open-Source Platform to Connect, Manage, and Secure MicroservicesAn Open-Source Platform to Connect, Manage, and Secure Microservices
An Open-Source Platform to Connect, Manage, and Secure MicroservicesDoiT International
 
Greyhound - Powerful Pure Functional Kafka Library
Greyhound - Powerful Pure Functional Kafka LibraryGreyhound - Powerful Pure Functional Kafka Library
Greyhound - Powerful Pure Functional Kafka LibraryNatan Silnitsky
 
Load Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native ArchitectureLoad Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native ArchitectureChiradeep Vittal
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first stepsThe Software House
 
Envoy, Wasm and Rust - the Mighty Trio
Envoy, Wasm and Rust -  the Mighty TrioEnvoy, Wasm and Rust -  the Mighty Trio
Envoy, Wasm and Rust - the Mighty TrioAnton Weiss
 
Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019Ram Vennam
 

Tendances (20)

SignalR
SignalRSignalR
SignalR
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
«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 Overview
SignalR OverviewSignalR Overview
SignalR Overview
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh?
 
Scale your signalR realtime web application
Scale your signalR realtime web applicationScale your signalR realtime web application
Scale your signalR realtime web application
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST Microservice
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web 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
 
SignalR with ASP.NET MVC 6
SignalR with ASP.NET MVC 6SignalR with ASP.NET MVC 6
SignalR with ASP.NET MVC 6
 
Linkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backendLinkerd – Service mesh with service Discovery backend
Linkerd – Service mesh with service Discovery backend
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
 
21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO21st Docker Switzerland Meetup - ISTIO
21st Docker Switzerland Meetup - ISTIO
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio
 
An Open-Source Platform to Connect, Manage, and Secure Microservices
An Open-Source Platform to Connect, Manage, and Secure MicroservicesAn Open-Source Platform to Connect, Manage, and Secure Microservices
An Open-Source Platform to Connect, Manage, and Secure Microservices
 
Greyhound - Powerful Pure Functional Kafka Library
Greyhound - Powerful Pure Functional Kafka LibraryGreyhound - Powerful Pure Functional Kafka Library
Greyhound - Powerful Pure Functional Kafka Library
 
Load Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native ArchitectureLoad Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native Architecture
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first steps
 
Envoy, Wasm and Rust - the Mighty Trio
Envoy, Wasm and Rust -  the Mighty TrioEnvoy, Wasm and Rust -  the Mighty Trio
Envoy, Wasm and Rust - the Mighty Trio
 
Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019Istio Triangle Kubernetes Meetup Aug 2019
Istio Triangle Kubernetes Meetup Aug 2019
 

Similaire à Real time websites and mobile apps with SignalR

Real time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRReal time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRRoy Cornelissen
 
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...Damir Dobric
 
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
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationStuart (Pid) Williams
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
Gwt session
Gwt sessionGwt session
Gwt sessionMans Jug
 
Realtime web experience with signal r
Realtime web experience with signal rRealtime web experience with signal r
Realtime web experience with signal rRan Wahle
 
Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2goodfriday
 
Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Dan Wendlandt
 
Consuming Web Services in Microsoft Silverlight 3
Consuming Web Services in Microsoft Silverlight 3Consuming Web Services in Microsoft Silverlight 3
Consuming Web Services in Microsoft Silverlight 3goodfriday
 
Quantum grizzly summit
Quantum   grizzly summitQuantum   grizzly summit
Quantum grizzly summitDan Wendlandt
 
Quantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxQuantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxOpenStack Foundation
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008Joe Walker
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DayTechMaster Vietnam
 
Fancy Features in Asp.Net Core SignalR
Fancy Features in Asp.Net Core SignalRFancy Features in Asp.Net Core SignalR
Fancy Features in Asp.Net Core SignalRVladimir Georgiev
 

Similaire à Real time websites and mobile apps with SignalR (20)

Real time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalRReal time event feeds with NServiceBus and SignalR
Real time event feeds with NServiceBus and SignalR
 
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
 
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
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
WebSocket
WebSocketWebSocket
WebSocket
 
Gwt session
Gwt sessionGwt session
Gwt session
 
Gwt session
Gwt sessionGwt session
Gwt session
 
Realtime web experience with signal r
Realtime web experience with signal rRealtime web experience with signal r
Realtime web experience with signal r
 
Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2Working with Data and Web Services in Microsoft Silverlight 2
Working with Data and Web Services in Microsoft Silverlight 2
 
Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13Openstack Quantum yahoo meetup 1 23-13
Openstack Quantum yahoo meetup 1 23-13
 
Consuming Web Services in Microsoft Silverlight 3
Consuming Web Services in Microsoft Silverlight 3Consuming Web Services in Microsoft Silverlight 3
Consuming Web Services in Microsoft Silverlight 3
 
Quantum grizzly summit
Quantum   grizzly summitQuantum   grizzly summit
Quantum grizzly summit
 
Quantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptxQuantum PTL Update - Grizzly Summit.pptx
Quantum PTL Update - Grizzly Summit.pptx
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 
Building Scalable and Robust Solutions with Service Bus in Cloud and Server
Building Scalable and Robust Solutions with Service Bus in Cloud and ServerBuilding Scalable and Robust Solutions with Service Bus in Cloud and Server
Building Scalable and Robust Solutions with Service Bus in Cloud and Server
 
Fancy Features in Asp.Net Core SignalR
Fancy Features in Asp.Net Core SignalRFancy Features in Asp.Net Core SignalR
Fancy Features in Asp.Net Core SignalR
 

Dernier

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 

Dernier (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"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...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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?
 

Real time websites and mobile apps with SignalR

  • 1.
  • 2. Real time websites and mobile apps with SignalR Roy Cornelissen Software Architect, Info Support @roycornelissen
  • 3. agenda SignalR intro push / pull architecture multi beyond implement platform websites
  • 5. NServiceBus SignalR production gateway monitor showcase: real time production monitor
  • 6. http has a pull model
  • 7. http pull interactions “ajax” server processing read file read file process process GET default.aspx GET a.jpg GET b.js GET x.ashx?... POST client render page lifetime client 1 Got msg? Nope Got msg? Nope Got msg? “message” server process process process process POST “message” client 2 polling
  • 9. the push concept the server takes the initiative to send data to the client
  • 10. push protocols irc smtp websocket server sent events
  • 11. today„s push protocols • two way, persistent connection, initiated by client • W3C draft, worked on my IETF • support (partial) in some browsers websocket • “pub/sub” like protocol over http • also still a W3C draft • one-way, client needs extra channel for send • proxies need to know about server sent events content-type:text/event-stream
  • 12. but I want it now! Veruca Salt Willy Wonka & The Chocolate Factory, 1971
  • 13. other options client 1 Got msg? “message” Got msg? “message” server POST “message” POST “message” client 2 long polling <iframe src=“/forever”> client 1 <script> <script> GET /forever display(“message”); display(“message”); </script> </script> server POST “message” POST “message” client 2 forever frame
  • 14. SignalR to the rescue!
  • 15. SignalR will abstract away the actual protocol used, and adds a couple of layers on top to make things even easier SignalR‟s layers of abstraction
  • 16. hub persistent connection SignalR 1.0 protocols web sockets server events long polling forever frame • Unified programming model • Deals with connectivity issues (connection slow, reconnect, disconnects) • Available for multiple types of clients • Messaging bus • Utilizes Json.NET for serialization
  • 17. my connection override Task OnConnected persistent connection override Task OnReceived override Task OnDisconnected • Base class for your own connection class • Fires events when clients connect, disconnect or send data • Allows grouping of connections • Deals with “raw” (string) data: do your own serialization • Your class gets instantiated with each new http connection
  • 18. hubs
  • 19. client/server boundaries fade • hubs let you provide a sematic API between client and server • SignalR creates a proxy between the two parties client (javascript) server var chat = $.connection.chatHub; class ChatHub: Hub … { chat.server.message(“hi!”); proxy public void message(string text) … { chat.client.notify = function(text) Clients.All.notify(text); { } // do something with text } } dynamic
  • 20. sharing state client (javascript) server var chat = $.connection.chatHub; class ChatHub: Hub { public void message(string text) chat.message(“test”); { ... Clients.Caller.yourTicket = “123”; alert(chat.state.yourTicket); } } dynamic
  • 23. JavaScript .NET
  • 24. JavaScript .NET Windows Phone
  • 25. Windows JavaScript .NET Phone Silverlight
  • 26. Windows JavaScript .NET Silverlight Phone WinRT
  • 27. Windows JavaScript .NET Silverlight WinRT Phone
  • 28. NServiceBus SignalR production gateway monitor showcase: real time production monitor
  • 29. app architecture WinRT WPF iOS (data binding) (data binding) (INotifyPropertyChanged) ViewModels SignalR proxy & data contracts
  • 30.
  • 31. beyond websites clients Windows JavaScript .NET Silverlight WinRT iOS Android Phone Service ASP.NET OWIN Custom SQL Redis Bus hosts backplanes
  • 32. scaling out via backplanes B

Notes de l'éditeur

  1. Polling is still Pull; Twitter does this. There are some tricks, such as piggy backing results/messages on other requests (responses) but still not real time.