19
christian.heindel@communar do.de Christian Heindel @c_heindel Bild durch Klicken auf Symbol hinzufügen Asynchrone Echtzeitanwendungen in SharePoint mit SignalR und knockout.JS SignalR

SignalR beim ShareCamp 2013

Embed Size (px)

Citation preview

Page 1: SignalR beim ShareCamp 2013

[email protected]

Christian Heindel @c_heindel

Bild durch Klicken auf Symbol hinzufügen

Asynchrone Echtzeitanwendungen in SharePoint mitSignalR und knockout.JS

SignalR

Page 2: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

SignalR ist ein Projekt von• David Fowler

(Senior Software Design Engineer, ASP.NET Team) • Damien Edwards

(Senior Program Manager, Microsoft)

GitHub, Nuget Gallery, SignalR 0.5

ShareCamp 2012Christian Heindel:Push-Benachrichtigungen in SharePoint via SignalR

Vor einem Jahr…

2

Page 3: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Bild durch Klicken auf Symbol hinzufügenhttp://de.slideshare.net/c.heindel/pushbenachrichtigungen-in-sharepoint-via-signalr

Folien ShareCamp 2012

3

Page 4: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

• SignalR offiziell zu ASP.NET aufgenommen• Größeres Team bei Microsoft (z.B. Patrick Fletcher)• Professionelle Software- und Lasttests ;-)• fast 50.000 Downloads via nuget• Zusätzliche Open Source-Bibliotheken und Projekte

entstehen, z.B. SignalR-ObjC @ GitHub (für iOS and Mac)

• Jabbr.net (mächtig!)• IE10 (Yippie!)

Mittlerweile…

4

Page 5: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

• Mai 2012: DEMO: Max Melcher (Download-Tracking)• November 2012: DEMO: Realtime

ASP.NET Web API tracing with SignalR• Dezember 2012: Max Melcher schwitzt und flucht:

http://melcher.it/2012/12/signalr-in-sharepoint-2013-the-real-time-web-is-coming/

• Dezember 2012: SignalR on Mono rücken näher zusammen (Link)

• Februar 2013: Channel 9 veröffentlicht VideoBuilding Web Apps with ASP.NET Jump Start: (08) Real-time Communication with SignalR (Link, 53m)

• Februar 2013: Publish the SignalR Getting Started Sample as a Windows Azure Web Site

Mittlerweile…

5

Page 6: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

• März 2013: Ergänzung zur Download DEMO, ein Upload-Beispiel (BEKK)

• März 2013: Christian Weyer: 3h 28m, Intermediate Introducing ASP.NET SignalR - Push Services with Hubs (Link)

• März 2013: MSDN Dokumentation verfügbar• März 2013: Shopping Cart Beispiel• Seit 2 Tagen:

12.04.13: SignalR 1.1.0beta(mit ScaleOut Providern für Redis, SqlServer and Azure Service Bus)

• ShareCamp 2013…

Mittlerweile…

6

Page 7: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Was ist SignalR?

7

Page 8: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Bild durch Klicken auf Symbol hinzufügen• WebSockets• Server Sent Events• Forever Frame• Ajax long polling

(Dokumentation)

Transportwege und Fallbacks

8

Page 9: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

http://www.asp.net/signalr/overview/introduction/connections-and-hubs

- simple endpoint for sending single-recipient, grouped, or broadcast messages

- Connection API (represented in .NET code by the PersistentConnection class)

- direct access to the low-level communication network that SignalR exposes

- familiar to developers who have used connection-based APIs such as Windows Communication Foundation.

Modell 1: Connection

9

Page 10: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

- high-level pipeline built upon the Connection API - allows client and server to call methods on each other

directly- SignalR handles dispatching across machine boundaries

as if by magic- For different types of messages, it is recommended that

you use the Hub class, so that you won't have to create your own dispatching

- using the Hub, you can call methods on the clients, rather than sending an explicit message that needs to be received, interpreted, and acted upon

- familiar to developers who have used remote invocation APIs such as .NET Remoting.

Modell 2: Hub

10

Page 11: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Auf Facebook würde man schreiben: “Es ist kompliziert”

Auszug aus der Dokumentation:

Server: 2012*, 2008 r2, Azure Website, Windows 8*, Windows 7.NET Framework: 4.0 / 4.5*IIS: 7,7.5,8*, 8 Express*Browser: IE10*Silverlight: N/A (restr. 5+)WP8: IE* (restr. WP8 App)

Nur * unterstützt auch Websockets

Systemanforderungen

11

Page 12: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

• Standardlimit im IIS: 5.000 Verbindungen pro CPU• Für SignalR gehen z.B. auch 20.000 Verbindungen• Spezielle Protokolle erfordern spezielles

Lasttestwerkzeughttps://github.com/SignalR/SignalR/tree/dev/src/Microsoft.AspNet.SignalR.Crank

Lastgrenzen / Lasttest

12

Page 13: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

The source code for ASP.NET SignalR is available under an open source license.Developers outside of Microsoft may submit patches and code contributions that the Microsoft development team will review for potential inclusion.The framework continues to be fully support and staffed by Microsoft.

Open Source

13

Page 14: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Bild durch Klicken auf Symbol hinzufügenhttp://forums.asp.net/1254.aspx

Forum

14

Page 15: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

SharePoint 2010• SharePoint verwendet .NET Framework 3.5• SignalR benötigt .NET Framework 4.0 / 4.5• Proxy notwendig (WCF, HttpHandler o.ä.)

SharePoint 2013• .NET Framework 4.0

Aber: • Normalerweise hängt sich SignalR an „App_Start“ Event und

registriert die Route „~/signalr/hubs“ (Clients finden damit immer den Hub)

• In SharePoint gibt es aber kein „App_Start“! ¯\_(ツ )_/¯Global.asax kann man nicht automatisch deploybar anpassen Lösung: HttpModule (Link)

SharePoint macht mal wieder nur Probleme…

15

Page 16: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

• HttpModule• SPWebConfigModificationHandler• VirtualPathProvider

<SanftenDruckErhoehen>Nette Verpackung als Open Source Lösung von Max Melcher geplant… ;-)</SanftenDruckErhoehen>

Derzeitige Lösung für SharePoint 2013

16

Page 17: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Bild durch Klicken auf Symbol hinzufügen

17

Page 18: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Socket.IO (Framwork für node.js)

NowJS (ein node.js Modul)

Alternative

18

Page 19: SignalR beim ShareCamp 2013

Seite© Communardo Software GmbH · Kleiststraße 10 a · D-01129 Dresden/Germany · Fon +49 (351) 833 82-0 · Mail [email protected] · www.communardo.de

Communardo Software GmbHKleiststraße 10 a01129 Dresdenhttp://[email protected]

Telefon: +49 (351) 833 820 Standort Stuttgart

Leinfelder Straße 6470771 Leinfelden-Echterdingen

Telefon: +49 (711) 722 497 09

Kontakt

19

Christian Heindel

[email protected] www.communardo.de

Telefon: +49 (351) 833 82-234