microsoft signal r

21
Pranav Rastogi Program Manager Microsoft Twitter : rustd ASP.NET SignalR Real time web made simple

Upload: rustd

Post on 14-Jan-2015

927 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Microsoft signal r

Pranav Rastogi

Program ManagerMicrosoft

Twitter : rustd

ASP.NET SignalRReal time web made

simple

Page 2: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

INTRODUCTIONSIt always helps to know who you’re dealing with, so here’s a little background on me.

@rustd

ASP.NETProgram Manager

http://blogs.msdn.com/pranav_rastogi/

Author

Page 3: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

WHAT IS ASP.NET SIGNALR?Incredibly simple real-time web for .NET

Simplicity

Reach

Performance

Page 4: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

HOW SIMPLE?

Page 5: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

HOW CAN I USE REAL-TIME IN MY APP?Anytime a user refreshes the page or you use polling

Dashboards & monitoring

Collaborative anything

Job progress

Real-time forms & concurrency management

Gaming…

Page 6: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SHOOTR.SIGNALR.NET

Page 7: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SIMPLICITYREACHPERFORMANCE

Page 8: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SIMPLICITY: TWO-LEVEL API

ConnectionsLow level

Raw strings up & down

Broadcast to all clients, groups or individuals

Connection, reconnect & disconnect semantics

HubsBuilt on top of connections

RPC from client-server *AND* server-client

Automatic client proxy generation (JavaScript)

Page 9: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

CONNECTIONS VS. HUBS

Page 10: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

CONNECTION LIFETIMEA SignalR connection’s lifetime may be made up of many physical connections

Events are raised on both server and client

Fast disconnect for “clean” abort, timeout based for “unclean”

Page 11: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SIMPLICITYREACHPERFORMANCE

Page 12: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

REACH: BUT WHAT ABOUT WEBSOCKETS?WebSockets works if…You use ASP.NET 4.5 on Windows Server 2012 AND

Client uses IE10 or latest Chrome, FF, Safari AND

Your load balancer/reverse proxy supports it AND

Client proxy server/NAT supports it AND

Everybody between client & server supports it AND

You’re happy coding against raw sockets AND

You manage scale-out yourself

SignalR works…Everywhere

We’ll try WebSockets then fallback to:

• Server Sent Events

• Forever Frame

• Long Polling

We give you a simple & powerful API to work with

We do our best to keep the logical connection up, including retry logic if transports fail

We scale-out to web-farms

Page 13: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

TRANSPORT NEGOTIATION

Page 14: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

REACH: CLIENTS FOR EVERYBODY!

Right nowJavaScript (jQuery)

.NET 4.0/4.5

Silverlight 5

Windows Store apps

Windows Phone 8

Portable Class Library

MonoTouch

MonoDroid

In the futureC++

Pure JavaScript (no jQuery)

iOS native

Java

.NET Micro Framework

Page 15: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

MIXED CLIENTS

Page 16: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SIMPLICITYREACHPERFORMANCE

Page 17: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

PERFORMANCE: THROUGHPUT & SCALEThroughput

Very high performance on a single box

100,000’s of messages per second

Very low memory overhead

Scale

Fully async to optimize resource utilization

1,000’s of connections per server

Supports horizontal scale-out using a pluggable message bus backplane (Azure Service Bus, Redis, SQL)

Page 18: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

SCALE-OUT

web nodes

clients

backplane

Page 19: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

THERE’S MORE…

Host-agnosticRun it in your ASP.NET application or standalone with self-host on OWIN

Cross-platformRun it on OSX or Linux with Mono

Open Source#1 watched C# repo on GitHub

SupportedSupported part of the ASP.NET family

Documentation at www.asp.net/signalr

Page 20: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

RELATED CONTENT

ASP.NET Identity & Security Introduction to .NET Web Development

on Azure Microsoft ASP.NET, Web, and Cloud

Tools Preview

Page 21: Microsoft signal r

www.devconnections.com

ASP.NET SIGNALR

THANK YOU!!!