2. Dinusha Kumarasiri
• MVP in SharePoint server
• Software Architect focusing on
SharePoint and related
technologies
• Interested in SharePoint,
Office365 and Microsoft Azure
Email : kumarasiri048@gmail.com
Twitter : kumarasiri048
Facebook : dinushak
LinkedIn : dinushak
Contact Details
3. Agenda
• Evolution of web
• Real time web applications
• ASP.Net SignalR
• SignalR with SharePoint
• Microsoft Azure Service Bus
4. Evolution of web
• HTTP Protocol
Client
Server
Request
Response
• HTTP is stateless
• Current state is not saved
• New requests from the same users are treated as brand new requests
• HTTP is half duplex
• Either send a request or receive a response. But not at the same time
5. Evolution of web
• What are the current work arounds for being stateless
• HTTP Cookies, Server side sessions, etc.
• Additional information in HTTP headers
6. Evolution of web
• Ajax HTTP requests
• Uses XML HttpRequest
• Able to load parts of the web page without loading the entire page
• How can we load data, without any interaction from the end
user?
7. Real-time web applications
• Set of technologies and practices that enable users to receive
information as it is published
• Instantly receive messages if there are any
• Up to date
• Delivered to any device
8. Real-time web applications
• Use cases
• Social networking
• Gaming
• Gambling
• Trading
• Monitoring
• Tracking
• Sports events
• Collaborative applications
• Real-time forms
• Sites with messaging
capabilities
10. Real-time web applications
• Technologies to enable real-time web applications
• Polling
• Long Polling
• Forever frame
• Server-Sent Events (SSE)
• WebSockets
11. Real-time web applications
Polling Long Polling
• Periodically request the server for any
updates
• Client poll the server, but server respond if
there is data to return
• The server holds on the request until timeout
or if it has new data
• Polling and Long Polling
12. Real-time web applications
• Forever Frame
• Uses a hidden iframe
• The iframe loads another page which has a loop
• HTML5 Server-Sent Events (SSE)
• Create new EventSource object, which opens a connection to server
13. Real-time web applications
• WebSockets
• Extended HTTP
• But may not be compatible
• Windows 8 + , Server 2012 +
• There may be network security concerns
14. Real-time web applications
• How to select what technology is best for current scenario
• Should fallback to another technology if primary is not
supported
• Frameworks support to achieve that
15. SignalR
• Asynchronous signaling library that enables real-time, multi-
user web applications.
• Creates a persistent connection between server and client(s)
• Within ASP.Net stack
• Source code is open and in GitHub
• Available via NuGet
16. SignalR
• Features
• Libraries for client and server
• Use WebSockets when available, if not fallback to other technologies
• Supported in many platforms
• SignalR Team
• .Net 4.0 +
• WinRT
• Windows Phone 8
• Silverlight 5
• JQuery
• C++
• Community
• IOS Native
• IOS via Mono
• Android via Mono
21. SignalR
• Server side development models
• Persistent connection : IHttpHandler
• Hubs : An abstraction over persistent connection
• Hubs
• Public methods defined in hubs are callable from outside
• Send messages to clients by invoking client-side methods
• Communication is serialized by JSON
27. Working with external data
• Scenarios
• Output from LOB systems
• IOT and other external devices
• Production lines
• Communication from multiple sources
28. Working with external data
• Challenges
• Can lose data
• Data from multiple sources
• Data can be in multiple formats
• Cost
• Availability of infrastructure
• Heavy load in peak times
29. Azure Service Bus
• What is azure service bus?
• Reliable information delivery service
• It ensures that the information is delivered even both parties are not online in
the same time
• Azure service bus queue
• Sender sends a message to the queue
• A receiver can pickup
• One-way asynchronous communication
30. Azure Service Bus
• Azure service bus topics
• Filters
• One-way asynchronous communication
31. Azure Service Bus
• Azure service bus relays
• If your applications need to both send and receive messages
32. Azure Service Bus
• Real-time web applications with SignalR and Azure Service Bus
Service Bus Topics
SignalR (Server Side)
Hub
Client 1
Client 2
Client 2
Process 1 Process 2