SlideShare a Scribd company logo
Copyright © 2018 ONE BCG. All rights reserved.
SignalR With ASP.NET MVC
2
Copyright © 2018 ONE BCG. All rights reserved.
Introduction
• What is SignalR?
• Why do we need it?
• Where can we use it?
• How does it work?
• SignalR backplanes
3
Copyright © 2018 ONE BCG. All rights reserved.
What is SignalR?
WHAT
4
Copyright © 2018 ONE BCG. All rights reserved.
SignalR?
• Real-time, open-source library, persistent connection
abstraction over HTTP for .NET
• Simple and powerful API’s
• Many techniques use to keep the logical connection up,
including retry logic if transport fail.
• Scaleout back plans.
5
Copyright © 2018 ONE BCG. All rights reserved.
Why do we need signalR?
WHY
6
Copyright © 2018 ONE BCG. All rights reserved.
Why do we need signalR?
• SignalR provides a simple API for creating server-to-client
remote procedure call(RPC) that call javascript functions in
client browsers from server-side .NET code.
• SignalR also includes API for connection management(for
instance, connect and disconnect events). It handle connection
management automatically.
7
Copyright © 2018 ONE BCG. All rights reserved.
Why do we need signalR?
• It can reach out to thousands of clients using service bus, SQL
server or Redis cache.
• Abstract away the network layer for bidirectional real-time
communications, thus helping developers focus on building the
application.
8
Copyright © 2018 ONE BCG. All rights reserved.
Where can we use it?
WHERE
9
Copyright © 2018 ONE BCG. All rights reserved.
Where can we use it?
• Dashboards
• Monitoring
• Job progress
• Real-time form
• Web games/ Chat rooms
• Trading
10
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
HOW
11
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
12
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Order of network transports:-
HTML 5 Transports:-
• WebSockets
• Server Sent Events
Comet Transports (long-held HTTP request):-
• Forever Frame
• Ajax Long Polling
13
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
WebSockets
• A new HTML5 API enables bi-directional, full-duplex
communication between the browser and the server.
• It is the new standard defined as a part of HTML 5 to solve
two major problems of the current web:
- Overhead of HTTP (Network Throughput)
- Low Latency
14
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Server sent event
• A technology, where a browser receives automatic updates
from a server via an HTTP connection, the Server-Sent Events
EventSource API is standardized as part of HTML5.
• The situation was also possible before, but the web page
would seek updates. With server-sent events, the updates
come automatically.
• It supports all major browsers, except Internet Explorer.
15
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Forever Frame
● Forever Frame creates a hidden IFrame which requests to an
endpoint on the server that does not complete. The server then
continually sends a script to the client which is immediately
executed, providing a one-way realtime connection from server to
client.
16
Copyright © 2018 ONE BCG. All rights reserved.
Forever Frame continued..
● The connection from the client to server uses a separate
attachment from the server to client connection, and like a
standard HTML request, creates a new link for each piece of
data sent.
17
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Ajax Long Polling
• Long polling does not create a persistent connection, but instead
polls the server with a request that stays open until the server
responds, at which point the connection closes, and a new
connection is requested immediately.
• This may introduce some latency while the connection resets.
18
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
• Fallback.
19
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
SignalR API & Architecture
The SignalR API contains two models for communicating between
clients and servers: Persistent Connections & Hubs Connection
Persistent Connections
• Low level access to communication.
• Direct developer access to network pipeline.
• Access to lot more communication events.
• Will be familiar to developers who have used connection-based
APIs such as WCF.
20
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Hubs
• High level abstraction
• Built on top of Persistent Connections
• Least developer work.
• Works for majority of user.
• Will be familiar to developers who have used remote invocation
APIs such as .Net Remoting.
21
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
22
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
23
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Demo Link
https://sahilsaini.azurewebsites.net/
24
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Selecting which clients will receive the RPC
• Clients.All.refresh(message); // All connected clients
• Clients.Caller.refresh(message); // Only the calling client
• Clients.others.refresh(message); // All clients except the calling
client
• Clients.Client(Context.ConnectionId).refresh(message); // A specific
client identified by connection ID
25
Copyright © 2018 ONE BCG. All rights reserved.
How does it work?
Selecting which clients will receive the RPC
• clients.AllExcept(connectionId1,
connectionId2).refresh(message); // All connected clients except
the specified clients, identified by connection ID.
• clients.Group(groupName).refresh(message); // All connected
clients in a specified group.
• clients.Group(groupName).refresh(message); // All connected
clients in a specified group.
26
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
Backplane is basically for forward messages between servers in
scaleout environments.
Why we need it?
When you application scale out, clients can get routed to different
servers. A client that is connected to one server will not receive
messages sent from another server.
27
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
28
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
SignalR currently provides three backplanes:
• Azure Service Bus
• Redis
• SQL Server
29
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
SignalR scaleout with SQL Server:
30
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
SignalR scaleout with SQL Server:
• Install Microsoft.AspNet.SignalR.SqlServer package to signalR
application.
• Write below code in startup file:-
public void Configuration(IAppBuilder app)
{
// Any connection or hub wire up and configuration should go here
string sqlConnectionString = "Connecton string to your SQL DB";
GlobalHost.DependencyResolver.UseSqlServer(sqlConnectionString);
app.MapSignalR();
}
31
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
SignalR scaleout with Redis:
• Install Microsoft.AspNet.SignalR.StackExchangeRedis package to
web application
• Write below code in Startup file:-
32
Copyright © 2018 ONE BCG. All rights reserved.
SignalR Backplanes
SignalR scaleout with Azure service bus:
• Install Microsoft.AspNet.SignalR.ServiceBus package to web
application
• Write below code in Startup file:-
33
Copyright © 2018 ONE BCG. All rights reserved.
Azure SignalR
WHAT is Azure SignalR
• Azure SignalR Service simplifies the process of adding real-time web
functionality to applications over HTTP.
• This real-time functionality allows the service to push content
updates to connected clients, such as a single page web or mobile
application.
• Fully managed service.
34
Copyright © 2018 ONE BCG. All rights reserved.
Azure SignalR
Benefits using Azure SignalR Service
• Standard based
• Native ASP.NET Core support
• Broad client support
• Handle large-scale client connections
• Remove the burden to self-host SignalR
35
Copyright © 2018 ONE BCG. All rights reserved.
Azure SignalR
How to use Azure signalR
• Install Microsoft.Azure.SignalR.AspNet to web application
• Write below code in Startup file:-
36
Copyright © 2018 ONE BCG. All rights reserved.
Azure SignalR
How to use Azure signalR
37
Copyright © 2018 ONE BCG. All rights reserved.
Azure SignalR
Demo Link
https://testazuresignalr.azurewebsites.net/
38
Copyright © 2018 ONE BCG. All rights reserved.
Thank You
THANK YOU

More Related Content

What's hot

Opa in the api management world
Opa in the api management worldOpa in the api management world
Opa in the api management world
Red Hat
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
NGINX, Inc.
 
Building a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istioBuilding a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istio
SAMIR BEHARA
 
Fundamentals of microservices
Fundamentals of microservicesFundamentals of microservices
Fundamentals of microservices
NGINX, Inc.
 
OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the Hood
Lohika_Odessa_TechTalks
 
Intro to signalR
Intro to signalRIntro to signalR
Intro to signalR
Mindfire Solutions
 
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
apidays
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Christian Posta
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
NGINX, Inc.
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
ArmonDadgar
 
Scribe Online CDK & Connector Development
Scribe Online CDK & Connector DevelopmentScribe Online CDK & Connector Development
Scribe Online CDK & Connector Development
CloudFronts Technologies LLP.
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
Rafik HARABI
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
inovia
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway
Chris Mague
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
University of Hawai‘i at Mānoa
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
ScyllaDB
 
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
Sergii Bishyr
 
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka ScalaccAWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
Scalac
 
Kong
KongKong
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO lang
SHAKIL AKHTAR
 

What's hot (20)

Opa in the api management world
Opa in the api management worldOpa in the api management world
Opa in the api management world
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
 
Building a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istioBuilding a scalable microservice architecture with envoy, kubernetes and istio
Building a scalable microservice architecture with envoy, kubernetes and istio
 
Fundamentals of microservices
Fundamentals of microservicesFundamentals of microservices
Fundamentals of microservices
 
OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the Hood
 
Intro to signalR
Intro to signalRIntro to signalR
Intro to signalR
 
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
APIdays Singapore 2019 - API Gateway in a Nutshell, Allan Chua, Solution and ...
 
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and LinkerdNavigating the service mesh landscape with Istio, Consul Connect, and Linkerd
Navigating the service mesh landscape with Istio, Consul Connect, and Linkerd
 
Do You Need A Service Mesh?
Do You Need A Service Mesh?Do You Need A Service Mesh?
Do You Need A Service Mesh?
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
Scribe Online CDK & Connector Development
Scribe Online CDK & Connector DevelopmentScribe Online CDK & Connector Development
Scribe Online CDK & Connector Development
 
Managing microservices with Istio Service Mesh
Managing microservices with Istio Service MeshManaging microservices with Istio Service Mesh
Managing microservices with Istio Service Mesh
 
Microservice: starting point
Microservice:  starting pointMicroservice:  starting point
Microservice: starting point
 
Kong API Gateway
Kong API Gateway Kong API Gateway
Kong API Gateway
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
 
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
Voxxed Days Minsk. Microservices:
 The phantom menace
. Istio Service Mesh: 
...
 
AWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka ScalaccAWS Api Gateway by Łukasz Marchewka Scalacc
AWS Api Gateway by Łukasz Marchewka Scalacc
 
Kong
KongKong
Kong
 
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO lang
 

Similar to Brushing skills on SignalR for ASP.NET developers

IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018
Chris Phillips
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
GVNSK Sravya
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
srinivasa teja
 
Hyperledger Composer architecture
Hyperledger Composer architectureHyperledger Composer architecture
Hyperledger Composer architecture
Simon Stone
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2
 
Serverless patterns
Serverless patternsServerless patterns
Serverless patterns
Jesse Butler
 
HostBridge Virtual User Group December 2020
HostBridge Virtual User Group December 2020HostBridge Virtual User Group December 2020
HostBridge Virtual User Group December 2020
HostBridge Technology
 
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
Amazon Web Services
 
How to add stuff to MySQL
How to add stuff to MySQLHow to add stuff to MySQL
How to add stuff to MySQL
Georgi Kodinov
 
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
Amazon Web Services
 
Akachain Hyperledger Fabric best practices
Akachain Hyperledger Fabric best practicesAkachain Hyperledger Fabric best practices
Akachain Hyperledger Fabric best practices
Eledra Nguyen
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsSignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsEugene Zharkov
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
Simon Stone
 
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Amazon Web Services
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Deepak Gupta
 
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
Amazon Web Services
 
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
Christian Heindel
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
Matt Lucas
 
The Current And Future State Of Service Mesh
The Current And Future State Of Service MeshThe Current And Future State Of Service Mesh
The Current And Future State Of Service Mesh
Ram Vennam
 
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
Amazon Web Services
 

Similar to Brushing skills on SignalR for ASP.NET developers (20)

IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018
 
IoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdfIoT Physical Servers and Cloud Offerings.pdf
IoT Physical Servers and Cloud Offerings.pdf
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
 
Hyperledger Composer architecture
Hyperledger Composer architectureHyperledger Composer architecture
Hyperledger Composer architecture
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
Serverless patterns
Serverless patternsServerless patterns
Serverless patterns
 
HostBridge Virtual User Group December 2020
HostBridge Virtual User Group December 2020HostBridge Virtual User Group December 2020
HostBridge Virtual User Group December 2020
 
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
How HSBC Uses Serverless to Process Millions of Transactions in Real Time (FS...
 
How to add stuff to MySQL
How to add stuff to MySQLHow to add stuff to MySQL
How to add stuff to MySQL
 
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
Deep Dive on Amazon Managed Blockchain: re:Invent 2018 Recap at the AWS Loft ...
 
Akachain Hyperledger Fabric best practices
Akachain Hyperledger Fabric best practicesAkachain Hyperledger Fabric best practices
Akachain Hyperledger Fabric best practices
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsSignalR: Add real-time to your applications
SignalR: Add real-time to your applications
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
Monitor the World: Meaningful Metrics for Containerized Apps and Clusters (CO...
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
Designing Network Architectures with Direct Connect for Multiple Traffic Stre...
 
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
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
The Current And Future State Of Service Mesh
The Current And Future State Of Service MeshThe Current And Future State Of Service Mesh
The Current And Future State Of Service Mesh
 
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
How Disney Streaming Services and TrueCar Deliver Web Applications for Scale,...
 

More from ONE BCG

A comprehensive guide to user behavioral analytics
A comprehensive guide to user behavioral analytics A comprehensive guide to user behavioral analytics
A comprehensive guide to user behavioral analytics
ONE BCG
 
What is product development and its process?
What is product development and its process?What is product development and its process?
What is product development and its process?
ONE BCG
 
Why effective communication with clients is necessary?
Why effective communication with clients is necessary?Why effective communication with clients is necessary?
Why effective communication with clients is necessary?
ONE BCG
 
An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
How Artificial intelligence and machine learning are different?
How Artificial intelligence and machine learning are different? How Artificial intelligence and machine learning are different?
How Artificial intelligence and machine learning are different?
ONE BCG
 
What is Agile and Scrum, their guiding principles and methods?
What is Agile and Scrum, their guiding principles and methods?What is Agile and Scrum, their guiding principles and methods?
What is Agile and Scrum, their guiding principles and methods?
ONE BCG
 
Prototype: Its methods, techniques, and key features.
Prototype: Its methods, techniques, and key features.Prototype: Its methods, techniques, and key features.
Prototype: Its methods, techniques, and key features.
ONE BCG
 
How to prepare a project for automated deployment?
How to prepare a project for automated deployment?How to prepare a project for automated deployment?
How to prepare a project for automated deployment?
ONE BCG
 
What is Load, Stress and Endurance Testing?
What is Load, Stress and Endurance Testing?What is Load, Stress and Endurance Testing?
What is Load, Stress and Endurance Testing?
ONE BCG
 
Software risk analysis and management
Software risk analysis and managementSoftware risk analysis and management
Software risk analysis and management
ONE BCG
 
What is security testing and why it is so important?
What is security testing and why it is so important?What is security testing and why it is so important?
What is security testing and why it is so important?
ONE BCG
 

More from ONE BCG (11)

A comprehensive guide to user behavioral analytics
A comprehensive guide to user behavioral analytics A comprehensive guide to user behavioral analytics
A comprehensive guide to user behavioral analytics
 
What is product development and its process?
What is product development and its process?What is product development and its process?
What is product development and its process?
 
Why effective communication with clients is necessary?
Why effective communication with clients is necessary?Why effective communication with clients is necessary?
Why effective communication with clients is necessary?
 
An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.An ultimate guide to SOLID Principles, developers must know.
An ultimate guide to SOLID Principles, developers must know.
 
How Artificial intelligence and machine learning are different?
How Artificial intelligence and machine learning are different? How Artificial intelligence and machine learning are different?
How Artificial intelligence and machine learning are different?
 
What is Agile and Scrum, their guiding principles and methods?
What is Agile and Scrum, their guiding principles and methods?What is Agile and Scrum, their guiding principles and methods?
What is Agile and Scrum, their guiding principles and methods?
 
Prototype: Its methods, techniques, and key features.
Prototype: Its methods, techniques, and key features.Prototype: Its methods, techniques, and key features.
Prototype: Its methods, techniques, and key features.
 
How to prepare a project for automated deployment?
How to prepare a project for automated deployment?How to prepare a project for automated deployment?
How to prepare a project for automated deployment?
 
What is Load, Stress and Endurance Testing?
What is Load, Stress and Endurance Testing?What is Load, Stress and Endurance Testing?
What is Load, Stress and Endurance Testing?
 
Software risk analysis and management
Software risk analysis and managementSoftware risk analysis and management
Software risk analysis and management
 
What is security testing and why it is so important?
What is security testing and why it is so important?What is security testing and why it is so important?
What is security testing and why it is so important?
 

Recently uploaded

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

Brushing skills on SignalR for ASP.NET developers

  • 1. Copyright © 2018 ONE BCG. All rights reserved. SignalR With ASP.NET MVC
  • 2. 2 Copyright © 2018 ONE BCG. All rights reserved. Introduction • What is SignalR? • Why do we need it? • Where can we use it? • How does it work? • SignalR backplanes
  • 3. 3 Copyright © 2018 ONE BCG. All rights reserved. What is SignalR? WHAT
  • 4. 4 Copyright © 2018 ONE BCG. All rights reserved. SignalR? • Real-time, open-source library, persistent connection abstraction over HTTP for .NET • Simple and powerful API’s • Many techniques use to keep the logical connection up, including retry logic if transport fail. • Scaleout back plans.
  • 5. 5 Copyright © 2018 ONE BCG. All rights reserved. Why do we need signalR? WHY
  • 6. 6 Copyright © 2018 ONE BCG. All rights reserved. Why do we need signalR? • SignalR provides a simple API for creating server-to-client remote procedure call(RPC) that call javascript functions in client browsers from server-side .NET code. • SignalR also includes API for connection management(for instance, connect and disconnect events). It handle connection management automatically.
  • 7. 7 Copyright © 2018 ONE BCG. All rights reserved. Why do we need signalR? • It can reach out to thousands of clients using service bus, SQL server or Redis cache. • Abstract away the network layer for bidirectional real-time communications, thus helping developers focus on building the application.
  • 8. 8 Copyright © 2018 ONE BCG. All rights reserved. Where can we use it? WHERE
  • 9. 9 Copyright © 2018 ONE BCG. All rights reserved. Where can we use it? • Dashboards • Monitoring • Job progress • Real-time form • Web games/ Chat rooms • Trading
  • 10. 10 Copyright © 2018 ONE BCG. All rights reserved. How does it work? HOW
  • 11. 11 Copyright © 2018 ONE BCG. All rights reserved. How does it work?
  • 12. 12 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Order of network transports:- HTML 5 Transports:- • WebSockets • Server Sent Events Comet Transports (long-held HTTP request):- • Forever Frame • Ajax Long Polling
  • 13. 13 Copyright © 2018 ONE BCG. All rights reserved. How does it work? WebSockets • A new HTML5 API enables bi-directional, full-duplex communication between the browser and the server. • It is the new standard defined as a part of HTML 5 to solve two major problems of the current web: - Overhead of HTTP (Network Throughput) - Low Latency
  • 14. 14 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Server sent event • A technology, where a browser receives automatic updates from a server via an HTTP connection, the Server-Sent Events EventSource API is standardized as part of HTML5. • The situation was also possible before, but the web page would seek updates. With server-sent events, the updates come automatically. • It supports all major browsers, except Internet Explorer.
  • 15. 15 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Forever Frame ● Forever Frame creates a hidden IFrame which requests to an endpoint on the server that does not complete. The server then continually sends a script to the client which is immediately executed, providing a one-way realtime connection from server to client.
  • 16. 16 Copyright © 2018 ONE BCG. All rights reserved. Forever Frame continued.. ● The connection from the client to server uses a separate attachment from the server to client connection, and like a standard HTML request, creates a new link for each piece of data sent.
  • 17. 17 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Ajax Long Polling • Long polling does not create a persistent connection, but instead polls the server with a request that stays open until the server responds, at which point the connection closes, and a new connection is requested immediately. • This may introduce some latency while the connection resets.
  • 18. 18 Copyright © 2018 ONE BCG. All rights reserved. How does it work? • Fallback.
  • 19. 19 Copyright © 2018 ONE BCG. All rights reserved. How does it work? SignalR API & Architecture The SignalR API contains two models for communicating between clients and servers: Persistent Connections & Hubs Connection Persistent Connections • Low level access to communication. • Direct developer access to network pipeline. • Access to lot more communication events. • Will be familiar to developers who have used connection-based APIs such as WCF.
  • 20. 20 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Hubs • High level abstraction • Built on top of Persistent Connections • Least developer work. • Works for majority of user. • Will be familiar to developers who have used remote invocation APIs such as .Net Remoting.
  • 21. 21 Copyright © 2018 ONE BCG. All rights reserved. How does it work?
  • 22. 22 Copyright © 2018 ONE BCG. All rights reserved. How does it work?
  • 23. 23 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Demo Link https://sahilsaini.azurewebsites.net/
  • 24. 24 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Selecting which clients will receive the RPC • Clients.All.refresh(message); // All connected clients • Clients.Caller.refresh(message); // Only the calling client • Clients.others.refresh(message); // All clients except the calling client • Clients.Client(Context.ConnectionId).refresh(message); // A specific client identified by connection ID
  • 25. 25 Copyright © 2018 ONE BCG. All rights reserved. How does it work? Selecting which clients will receive the RPC • clients.AllExcept(connectionId1, connectionId2).refresh(message); // All connected clients except the specified clients, identified by connection ID. • clients.Group(groupName).refresh(message); // All connected clients in a specified group. • clients.Group(groupName).refresh(message); // All connected clients in a specified group.
  • 26. 26 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes Backplane is basically for forward messages between servers in scaleout environments. Why we need it? When you application scale out, clients can get routed to different servers. A client that is connected to one server will not receive messages sent from another server.
  • 27. 27 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes
  • 28. 28 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes SignalR currently provides three backplanes: • Azure Service Bus • Redis • SQL Server
  • 29. 29 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes SignalR scaleout with SQL Server:
  • 30. 30 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes SignalR scaleout with SQL Server: • Install Microsoft.AspNet.SignalR.SqlServer package to signalR application. • Write below code in startup file:- public void Configuration(IAppBuilder app) { // Any connection or hub wire up and configuration should go here string sqlConnectionString = "Connecton string to your SQL DB"; GlobalHost.DependencyResolver.UseSqlServer(sqlConnectionString); app.MapSignalR(); }
  • 31. 31 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes SignalR scaleout with Redis: • Install Microsoft.AspNet.SignalR.StackExchangeRedis package to web application • Write below code in Startup file:-
  • 32. 32 Copyright © 2018 ONE BCG. All rights reserved. SignalR Backplanes SignalR scaleout with Azure service bus: • Install Microsoft.AspNet.SignalR.ServiceBus package to web application • Write below code in Startup file:-
  • 33. 33 Copyright © 2018 ONE BCG. All rights reserved. Azure SignalR WHAT is Azure SignalR • Azure SignalR Service simplifies the process of adding real-time web functionality to applications over HTTP. • This real-time functionality allows the service to push content updates to connected clients, such as a single page web or mobile application. • Fully managed service.
  • 34. 34 Copyright © 2018 ONE BCG. All rights reserved. Azure SignalR Benefits using Azure SignalR Service • Standard based • Native ASP.NET Core support • Broad client support • Handle large-scale client connections • Remove the burden to self-host SignalR
  • 35. 35 Copyright © 2018 ONE BCG. All rights reserved. Azure SignalR How to use Azure signalR • Install Microsoft.Azure.SignalR.AspNet to web application • Write below code in Startup file:-
  • 36. 36 Copyright © 2018 ONE BCG. All rights reserved. Azure SignalR How to use Azure signalR
  • 37. 37 Copyright © 2018 ONE BCG. All rights reserved. Azure SignalR Demo Link https://testazuresignalr.azurewebsites.net/
  • 38. 38 Copyright © 2018 ONE BCG. All rights reserved. Thank You THANK YOU