Real time web applications with signal r

35
Copyright © SELA Software & Education Labs, Ltd. | 14-18 Baruch Hirsch St., Bnei Brak 51202, Israel | www.selagroup.com Real-Time Web Applications with SignalR [email protected] l http://il.linkedin.com/in/eladavn http:// blogs.microsoft.co.il/el Elad Avneri Architect, ALM and Software Development

Transcript of Real time web applications with signal r

Copyright © SELA Software & Education Labs, Ltd. | 14-18 Baruch Hirsch St., Bnei Brak 51202, Israel | www.selagroup.com

Real-Time Web Applications with SignalR

[email protected]

http://il.linkedin.com/in/eladavneri/

http://blogs.microsoft.co.il/elada

Elad AvneriArchitect, ALM and Software Development

Agenda

What is SignalR?SignalR BasicsScaling OutGoing Mobile

Agenda

What is SignalR?SignalR BasicsScaling OutGoing Mobile

What is SignalR?

SignalR is a library for ASP.NET developers that simplifies the process of adding real-time

web functionality to applications

Real-time: 2 Way CommunicationSignalR is a library for ASP.NET developers that simplifies the process of adding real-time web functionality to applications

Push content to connected clientsWhat for?

Instead of refreshMonitoringGamingProgressChatEtc…

Real-time: Performance

Throughput100,000s of messages per secondVery low memory overhead

ScaleFully async to optimise resource utilisation1,000s of connections per server (concurrent)Supports horizontal scale-out using pluggable message bus backplane

SimpleSignalR is a library for ASP.NET developers that simplifies the process of adding real-

time web functionality to applications

It’s a kind of magic… we’ll see in a minuteAll “plumbing” is done behind the scenesAutomatically choosing the most efficient protocol

Server SideSignalR is a library for ASP.NET developers that simplifies the process of adding real-

time web functionality to applications

HostSelf host OWINIIS

.NetScaling out Azure mobile services

Client SideSignalR is a library for ASP.NET developers that simplifies the process of adding real-time web functionality to applications

JavaScriptAny .Net flavorObjective CJava

WebDesktopMobile

Client SideSignalR is a library for ASP.NET developers that simplifies the process of adding real-

time web functionality to applications

Available as NuGet packages for both client and server

Agenda

What is SignalR?SignalR BasicsScaling OutGoing Mobile

Pub/Sub

Features

Full Duplex RPC (=Remote Procedure Call)Connection management

Maintain connection statusEvents

Connections groupingE.g. Chat rooms

RPC

“Fake” Bi-directional Transport

Got Data?

Got Data?

Got Data?

Here’s some data!

Got Data?

Got Data?

Got Data?ServerClient

“Real” Bi-directional Transport

I do real-time, do you?

Yep!

ServerClientLet’s Party in Real-time!

SignalR Fallback

Long Polling

Forever Frames

Server Sent Events

Web Sockets

HTML 5

Comet

“Fake” “Real”

APIs

HubsHigh levelRPCAutomatic client proxy generationStrongly typed

Persistent connectionLow levelDirect access to the communication protocolMessaging modelMuch more communication events

Architecture

Security

Authentication is done by the hosting applicationAuthorizations in the Hub or method level with attributes

Connection Token Initialization

Connection Token Usage

Broadcast Models

Client

Client

ClientHub

Clients.All.doWork()Clients.Caller.doWork()Clients.Others.doWork()

Demo

Web Application with SignalR

Agenda

What is SignalR?SignalR BasicsScaling OutGoing Mobile

Scaling Out SignalR with Backplanes

Client

Client

Client Server

Server

Server

Backplane

Scale-out Options

Out of the box:SQL ServerWindows Azure Service BusRedis

Others can be plugged-in too

Demo

Scale-out with Azure Service Bus

Agenda

What is SignalR?SignalR BasicsScaling OutGoing Mobile

Azure Mobile Services

Connected Apps

Windows Store iOSAndroid

Windows Phone 8iOSAndroidHTML 5/JS

Data in the Cloud

SQL Table Blob

User Authentication

Facebook Twitter Microsoft Google

Push Notifications

WNS & APNS GCMMPNS

SDKs

Server-Side Scripts

&

Scheduler

Supported Platforms

iOSWindows 8Windows Phone 8 Android

HTML5 & Javascript

Demo

ToDo with SignalR

Summary

SignalR isSimpleScalableReachable

SignalR fits with the latest technologiesCloudMobile

Questions

Copyright © SELA Software & Education Labs, Ltd. | 14-18 Baruch Hirsch St., Bnei Brak 51202, Israel | www.selagroup.com

Thank You

[email protected]

http://il.linkedin.com/in/eladavneri/

http://blogs.microsoft.co.il/elada

Elad AvneriArchitect, ALM and Software Development