SlideShare a Scribd company logo
1 of 39
Download to read offline
The entire contents of this document are subject to copyright with all rights reserved. All copyrightable text and graphics, the selection, arrangement and presentation
of all information and the overall design of the document are the sole and exclusive property of Virtusa.
Copyright © 2012 Virtusa Corporation. All rights reserved
2000 West Park Drive
Westborough MA 01581 USA
Phone: 508 389 7300 Fax: 508 366 9901
Introduction to SignalR
SharePoint CEG | K-Talk
Shehan Peruma
August 23, 2013
2
Agenda
• Real-Time Web Technologies
• SignalR
• Getting Started
• Hubs API
• SignalR & SharePoint
• Summary
3
Real-Time Web Technologies
4
What?
• Stock Ticker
• Live Scores
• News Feeds
• Dashboards
• VoIP
• Chat
• Auctions
• Activity
Streams
Improved User Experience & Server Performance
D e f i n i t i o n : an application that functions within a time
frame that the user senses as immediate or current.
Real Time Web Technologies
5
How?
Multiple approaches exist to provide near real time functionality, but each has
it’s own set of pros & cons.
• Polling
• Long Polling
• Forever Frame (IE only)
• Server Sent Events (SSE)
• Web Sockets
Real Time Web Technologies
Server
Client
Server
Client
6
Response4
Response3
Response2
Response1
Web Sockets – Quick Intro.
• Part of the Html 5 specification
• Full-duplex (unlike HTTP)
• Built on top of HTTP – can share
HTTP ports (i.e. 80 & 443)
• URL: ws:// & wss:// similar to
http:// & https://
• Client & Server support required
Real Time Web Technologies
Server
Client
Request1
Request2
Request3
Request4
Time
Frame3
Frame2
Frame1
Handshake
Response
Server
Client
Handshake
Request
Time
Frame4
PollingWebSockets
7
8
• Initially developed by members of the ASP.NET team
• Part of the ASP.NET Technologies
• Open source and hosted on GitHub
• Distributed via NuGet
• Requires .NET 4.0 and above
What is SignalR?
S i g n a l R : An ASP.NET asynchronous, persistent
signaling library that enables the real-time, multi-user
web functionality for applications.
SignalR
9
Demo – A Simple Example
11
Transports
Long
Polling
Forever
Frame
Server
Sent
Events
Web
Sockets
SignalR
12
Demo – Transport Fallback
14
Supported Clients & Hosts
Client
JavaScript
Silverlight
5
Windows
Phone 8
.NETWinRT
iOS
Android
SignalR
Host
ASP.NET
Self-Hosting
(OWIN)
15
Demo – Clients
17
Connections & Hubs
SignalR
Persisted Connections (low-level)
• Can communicate with 1 to N clients
• Is an IHttpHandler
• Requires a route to be defined
• Limited to sending messages
• You define the “protocol”
Hubs (high-level)
• Can communicate with 1 to N clients
• Abstraction over
PersistentConnection
• Route automatically mapped
(/signalr/hubs)
• Can send messages and call
methods
• SignalR defines the protocol
18
Hubs
• Hub methods can be called by the
clients (e.g. javascript)
• Client methods can be called by
the Hub
• Can send messages to all or
individual clients
• Ability to add clients to groups
• Messages can be sent to groups
• Handles connection lifetime
events
SignalR
19
jQuery Proxy
• Two approaches:
• with generated proxy
• Use signalr.exe tool to create the proxy file.
• Without proxy but ‘late binding’
• Can be accessed by navigating to http://yoursite/signalr/hubs
• The proxy simplifies the code needed to communicate with the
server
SignalR
20
Getting Started
21
Installing NuGet Packages
Getting Started
Search for SignalRInstall Microsoft ASP.NET SignalR
The required scripts & assemblies
will be added to the project.
22
Route Mapping
Getting Started
Defined in Global.asax
Defines the routes the client will use to connect to the hub
Part of System.Web.Routing
23
Hub Class
Getting Started
Inherits from Microsoft.AspNet.SignalR.Hub
Sends the message to all the clients by
calling the clients broadcastMessage method
Connected clients can call
the Hubs NewMessage method
24
Client (JavaScript)
• Add reference to JavaScript
files
• Get reference to Hub
• Wireup events
• Start hub connection
• Call hub methods
Getting Started
25
Demo – Code/App
26
Hubs API
27
Groups
Hubs API
• Provides the ability to broadcast messages to a selected set of
clients
• Groups are not persisted on the server
• No API to retrieve group count or members
The developer would need to
keep track of this (e.g.
database).
Adding a client to a group
Sending
messages
to a group
28
Demo – Groups
29
• Override the event handlers
• OnConnected
• OnReconnected
• OnDisconnected
• JavaScript methods available to notify client about connectivity
states
• $.connection.hub.connectionSlow
• $.connection.hub.reconnecting
• $.connection.hub.reconnected
• $.connection.hub.disconnected
Lifetime/Lifecycle Events
Hubs API
30
• Send data to connected clients by calling methods from outside
the Hub
HubContext
Hubs API
SignalR Client SignalR Server
Windows
Service/Scheduler
The Hub classMethod belongs to a class that is not a Hub
Call the client method
31
Demo – HubContext
32
• Authorize - specify which users or roles have access to a hub or
method
• Scaleout
• Windows Azure Service Bus
• Redis
• SQL Server
Other Features
Hubs API
33
SignalR & SharePoint
34
• Create a ASP.NET Web Application
• Install SignalR using nuget
• Create the Hub
• Update Global.asax
• Publish
• Set web application pool to use .Net Framework 4.0 (you might
need to run the aspnet_regiis after changing the framework)
• Optional:
• Set the port to 80 and provide a host header (make sure to
update the host file with the same header name)
• Navigate to the site and ensure you can access the JavaScript
hub proxy (i.e. http://signalr.mydomain.com/signalr/hubs)
Hub Setup
SignalR & SharePoint
35
• Within the page/CEWP/Webpart,etc.. Add reference to the
scripts in the hubs site
• Set jQuery to support cross domain communication
• Set the hub url
• Start the connection
Client Setup (SharePoint 2010)
SignalR & SharePoint
36
Demo – SignalR & SharePoint
37
Summary
38
Summary
• Provides the ability to add real time web functionality to
applications
• Push data to clients and/or groups
• Hubs enables remote procedure calls (RPCs) to be made from a
server to connected clients and from clients to the server
• Not limited to web clients
39
Resources
• SignalR documentation - http://www.asp.net/signalr
• Pluralsight training -
http://pluralsight.com/training/Player?author=christian-
weyer&name=signalr-introduction-m2-
realtime&mode=live&clip=0&course=signalr-introduction
40
Q&A
Q&A
41
Thanks!
Thank you for attending!
www.virtusa.com
© 2012 All rights reserved. Virtusa and all other related logos are either registered trademarks or trademarks of Virtusa Corporation in the United States, the European Union, and/or India. All
other company and service names are the property of their respective holders and may be registered trademarks or trademarks in the United States and/or other countries.

More Related Content

What's hot

Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsKnoldus Inc.
 
Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계Wangeun Lee
 
Flexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkFlexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkDataWorks Summit
 
Service discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudService discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudMarcelo Serpa
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...Redis Labs
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistentconfluent
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka IntroductionAmita Mirajkar
 
Apache Flink 101 - the rise of stream processing and beyond
Apache Flink 101 - the rise of stream processing and beyondApache Flink 101 - the rise of stream processing and beyond
Apache Flink 101 - the rise of stream processing and beyondBowen Li
 
Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQelliando dias
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupStephan Ewen
 
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...HostedbyConfluent
 
Full stack development
Full stack developmentFull stack development
Full stack developmentArnav Gupta
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 

What's hot (20)

Web server
Web serverWeb server
Web server
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
 
Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계
 
Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Apache Kafka - Overview
Apache Kafka - OverviewApache Kafka - Overview
Apache Kafka - Overview
 
Flexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache FlinkFlexible and Real-Time Stream Processing with Apache Flink
Flexible and Real-Time Stream Processing with Apache Flink
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
Service discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudService discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring Cloud
 
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
 
Apache Flink 101 - the rise of stream processing and beyond
Apache Flink 101 - the rise of stream processing and beyondApache Flink 101 - the rise of stream processing and beyond
Apache Flink 101 - the rise of stream processing and beyond
 
Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQ
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 

Viewers also liked

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
 
SignalR
SignalRSignalR
SignalRmstDe3
 
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 ELEIÇÕES 2012 - ASTORGA: Toninho 31123 ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123Joao Carlos Passari
 
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
 
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
 
«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
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture AppDynamics
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
Ppt on World Of Smartphones
Ppt on World Of SmartphonesPpt on World Of Smartphones
Ppt on World Of SmartphonesPulkit Syal
 
Social Media Marketing For Business
Social Media Marketing For BusinessSocial Media Marketing For Business
Social Media Marketing For BusinessJeff Bullas
 
Social networking PPT
Social networking PPTSocial networking PPT
Social networking PPTvarun0912
 

Viewers also liked (19)

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)
 
SignalR
SignalRSignalR
SignalR
 
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 ELEIÇÕES 2012 - ASTORGA: Toninho 31123 ELEIÇÕES 2012 - ASTORGA: Toninho 31123
ELEIÇÕES 2012 - ASTORGA: Toninho 31123
 
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)
 
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
 
«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
SignalRSignalR
SignalR
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
SignalR
SignalRSignalR
SignalR
 
Startups Getting Started
Startups Getting StartedStartups Getting Started
Startups Getting Started
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
Ppt on World Of Smartphones
Ppt on World Of SmartphonesPpt on World Of Smartphones
Ppt on World Of Smartphones
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
Presentation social network
Presentation social networkPresentation social network
Presentation social network
 
Social Media Marketing For Business
Social Media Marketing For BusinessSocial Media Marketing For Business
Social Media Marketing For Business
 
Social networking PPT
Social networking PPTSocial networking PPT
Social networking PPT
 

Similar to Introduction to SignalR

ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2Jaliya Udagedara
 
SignalR Dublin ALT.NET
SignalR Dublin ALT.NETSignalR Dublin ALT.NET
SignalR Dublin ALT.NETDorin Manoli
 
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
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusReal-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusDinusha Kumarasiri
 
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
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsRonny López
 
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
 
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel AppelBuilding Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel.NET Conf UY
 
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.pdfGVNSK Sravya
 
Overview of SignalR
Overview of SignalROverview of SignalR
Overview of SignalRAmit Naik
 
Getting started with ASPNET Core SignalR
Getting started with ASPNET Core SignalRGetting started with ASPNET Core SignalR
Getting started with ASPNET Core SignalRNemi Chand
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 
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
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersONE BCG
 
Realtime web experience with signal r
Realtime web experience with signal rRealtime web experience with signal r
Realtime web experience with signal rRan Wahle
 
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
 

Similar to Introduction to SignalR (20)

ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2ASP.NET MVC 5 and SignalR 2
ASP.NET MVC 5 and SignalR 2
 
SignalR Dublin ALT.NET
SignalR Dublin ALT.NETSignalR Dublin ALT.NET
SignalR Dublin ALT.NET
 
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
 
Real-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service BusReal-time web applications using SharePoint, SignalR and Azure Service Bus
Real-time web applications using SharePoint, SignalR and Azure Service Bus
 
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
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP Applications
 
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
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel AppelBuilding Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
Building Real Time Applications with ASP.NET SignalR 2.0 by Rachel Appel
 
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
 
Overview of SignalR
Overview of SignalROverview of SignalR
Overview of SignalR
 
Getting started with ASPNET Core SignalR
Getting started with ASPNET Core SignalRGetting started with ASPNET Core SignalR
Getting started with ASPNET Core SignalR
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
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
 
Signal R 2015
Signal R 2015Signal R 2015
Signal R 2015
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
 
signalr
signalrsignalr
signalr
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
Realtime web experience with signal r
Realtime web experience with signal rRealtime web experience with signal r
Realtime web experience with signal r
 
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
 

More from University of Hawai‘i at Mānoa

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...University of Hawai‘i at Mānoa
 
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...University of Hawai‘i at Mānoa
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...University of Hawai‘i at Mānoa
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...University of Hawai‘i at Mānoa
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...University of Hawai‘i at Mānoa
 
Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUniversity of Hawai‘i at Mānoa
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...University of Hawai‘i at Mānoa
 
Using Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUsing Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUniversity of Hawai‘i at Mānoa
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...University of Hawai‘i at Mānoa
 
Contextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesContextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesUniversity of Hawai‘i at Mānoa
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...University of Hawai‘i at Mānoa
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...University of Hawai‘i at Mānoa
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyUniversity of Hawai‘i at Mānoa
 

More from University of Hawai‘i at Mānoa (20)

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
 
A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]
 
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
A Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier NamingA Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier Naming
 
Test Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to DetectionTest Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to Detection
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory Study
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
 
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal ToolIDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal Tool
 
Using Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUsing Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name Evolution
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
 
Contextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesContextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit Messages
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
 
A Preliminary Study of Android Refactorings
A Preliminary Study of Android RefactoringsA Preliminary Study of Android Refactorings
A Preliminary Study of Android Refactorings
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory Study
 
A Career In IT
A Career In ITA Career In IT
A Career In IT
 
Web Content Management - Introduction
Web Content Management - IntroductionWeb Content Management - Introduction
Web Content Management - Introduction
 

Recently uploaded

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 

Recently uploaded (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 

Introduction to SignalR

  • 1. The entire contents of this document are subject to copyright with all rights reserved. All copyrightable text and graphics, the selection, arrangement and presentation of all information and the overall design of the document are the sole and exclusive property of Virtusa. Copyright © 2012 Virtusa Corporation. All rights reserved 2000 West Park Drive Westborough MA 01581 USA Phone: 508 389 7300 Fax: 508 366 9901 Introduction to SignalR SharePoint CEG | K-Talk Shehan Peruma August 23, 2013
  • 2. 2 Agenda • Real-Time Web Technologies • SignalR • Getting Started • Hubs API • SignalR & SharePoint • Summary
  • 4. 4 What? • Stock Ticker • Live Scores • News Feeds • Dashboards • VoIP • Chat • Auctions • Activity Streams Improved User Experience & Server Performance D e f i n i t i o n : an application that functions within a time frame that the user senses as immediate or current. Real Time Web Technologies
  • 5. 5 How? Multiple approaches exist to provide near real time functionality, but each has it’s own set of pros & cons. • Polling • Long Polling • Forever Frame (IE only) • Server Sent Events (SSE) • Web Sockets Real Time Web Technologies Server Client Server Client
  • 6. 6 Response4 Response3 Response2 Response1 Web Sockets – Quick Intro. • Part of the Html 5 specification • Full-duplex (unlike HTTP) • Built on top of HTTP – can share HTTP ports (i.e. 80 & 443) • URL: ws:// & wss:// similar to http:// & https:// • Client & Server support required Real Time Web Technologies Server Client Request1 Request2 Request3 Request4 Time Frame3 Frame2 Frame1 Handshake Response Server Client Handshake Request Time Frame4 PollingWebSockets
  • 7. 7
  • 8. 8 • Initially developed by members of the ASP.NET team • Part of the ASP.NET Technologies • Open source and hosted on GitHub • Distributed via NuGet • Requires .NET 4.0 and above What is SignalR? S i g n a l R : An ASP.NET asynchronous, persistent signaling library that enables the real-time, multi-user web functionality for applications. SignalR
  • 9. 9 Demo – A Simple Example
  • 12. 14 Supported Clients & Hosts Client JavaScript Silverlight 5 Windows Phone 8 .NETWinRT iOS Android SignalR Host ASP.NET Self-Hosting (OWIN)
  • 14. 17 Connections & Hubs SignalR Persisted Connections (low-level) • Can communicate with 1 to N clients • Is an IHttpHandler • Requires a route to be defined • Limited to sending messages • You define the “protocol” Hubs (high-level) • Can communicate with 1 to N clients • Abstraction over PersistentConnection • Route automatically mapped (/signalr/hubs) • Can send messages and call methods • SignalR defines the protocol
  • 15. 18 Hubs • Hub methods can be called by the clients (e.g. javascript) • Client methods can be called by the Hub • Can send messages to all or individual clients • Ability to add clients to groups • Messages can be sent to groups • Handles connection lifetime events SignalR
  • 16. 19 jQuery Proxy • Two approaches: • with generated proxy • Use signalr.exe tool to create the proxy file. • Without proxy but ‘late binding’ • Can be accessed by navigating to http://yoursite/signalr/hubs • The proxy simplifies the code needed to communicate with the server SignalR
  • 18. 21 Installing NuGet Packages Getting Started Search for SignalRInstall Microsoft ASP.NET SignalR The required scripts & assemblies will be added to the project.
  • 19. 22 Route Mapping Getting Started Defined in Global.asax Defines the routes the client will use to connect to the hub Part of System.Web.Routing
  • 20. 23 Hub Class Getting Started Inherits from Microsoft.AspNet.SignalR.Hub Sends the message to all the clients by calling the clients broadcastMessage method Connected clients can call the Hubs NewMessage method
  • 21. 24 Client (JavaScript) • Add reference to JavaScript files • Get reference to Hub • Wireup events • Start hub connection • Call hub methods Getting Started
  • 24. 27 Groups Hubs API • Provides the ability to broadcast messages to a selected set of clients • Groups are not persisted on the server • No API to retrieve group count or members The developer would need to keep track of this (e.g. database). Adding a client to a group Sending messages to a group
  • 26. 29 • Override the event handlers • OnConnected • OnReconnected • OnDisconnected • JavaScript methods available to notify client about connectivity states • $.connection.hub.connectionSlow • $.connection.hub.reconnecting • $.connection.hub.reconnected • $.connection.hub.disconnected Lifetime/Lifecycle Events Hubs API
  • 27. 30 • Send data to connected clients by calling methods from outside the Hub HubContext Hubs API SignalR Client SignalR Server Windows Service/Scheduler The Hub classMethod belongs to a class that is not a Hub Call the client method
  • 29. 32 • Authorize - specify which users or roles have access to a hub or method • Scaleout • Windows Azure Service Bus • Redis • SQL Server Other Features Hubs API
  • 31. 34 • Create a ASP.NET Web Application • Install SignalR using nuget • Create the Hub • Update Global.asax • Publish • Set web application pool to use .Net Framework 4.0 (you might need to run the aspnet_regiis after changing the framework) • Optional: • Set the port to 80 and provide a host header (make sure to update the host file with the same header name) • Navigate to the site and ensure you can access the JavaScript hub proxy (i.e. http://signalr.mydomain.com/signalr/hubs) Hub Setup SignalR & SharePoint
  • 32. 35 • Within the page/CEWP/Webpart,etc.. Add reference to the scripts in the hubs site • Set jQuery to support cross domain communication • Set the hub url • Start the connection Client Setup (SharePoint 2010) SignalR & SharePoint
  • 33. 36 Demo – SignalR & SharePoint
  • 35. 38 Summary • Provides the ability to add real time web functionality to applications • Push data to clients and/or groups • Hubs enables remote procedure calls (RPCs) to be made from a server to connected clients and from clients to the server • Not limited to web clients
  • 36. 39 Resources • SignalR documentation - http://www.asp.net/signalr • Pluralsight training - http://pluralsight.com/training/Player?author=christian- weyer&name=signalr-introduction-m2- realtime&mode=live&clip=0&course=signalr-introduction
  • 39. www.virtusa.com © 2012 All rights reserved. Virtusa and all other related logos are either registered trademarks or trademarks of Virtusa Corporation in the United States, the European Union, and/or India. All other company and service names are the property of their respective holders and may be registered trademarks or trademarks in the United States and/or other countries.