Local Touch – Global Reach




  Intro to SignalR + Awesome Mobile Possibilities !



Samidip Basu
Solutions Lead | MSFT Mobility
Email: Samidip.Basu@us.sogeti.com
Twitter: @samidip
Info: http://samidipbasu.info
Blog: http://samidipbasu.com

Sogeti USA
8425 Pulsar Place, Suite 300 | Columbus, OH 43240.
www.us.sogeti.com




                                                                   www.us.sogeti.com
Central Ohio Windows Phone User Group
http://cowpug.org
http://meetup.com/cowpug
@cowpug
3rd Monday @ TechColumbus
Why do we need real-time?
New email

Twitter/Facebook updates

Stock Ticker/Live Auctions

Game Scores

Real-time Notifications

Turn-by-Turn Games

Collaboration

Progress Bars

And obviously, Chat
Existing Technologies
HTTP – purely Request/Response protocol

Internet – stateless; servers don’t call your app back

Consumption model .. But we’ve learnt tricks

Periodic/Ajax Polling – not real-time, bandwidth misuse




                                    Image courtesy
Existing Technologies ..
Contd.
    Use plugins like SL/Flash – to access sockets

    Native Web Sockets help – but low level & support flaky

    Long Polling – server does not respond unless X happens,
                  client polls after data receive or time-out




                                       Image courtesy @maartenballiauw
Enter SignalR
An async, persistent connection/signalling library for .NET ... aids in building
   real time, multi-user connected applications.

Persistent client-server connection over best transport .. Abstracts away the
   transport layer.

From ASP.NET team-members (Damian Edwards & David Fowler) ..
   Not officially MSFT product, but OSS Booyah 

https://github.com/SignalR/SignalR
http://jabbr.net/#/rooms/signal

SignalR is broken up into a few packages on NuGet:
    SignalR - Package for SignalR.Server and SignalR.Js
    SignalR.Server - Server components needed for SignalR endpoints
    SignalR.Js - Javascript client for SignalR
    SignalR.Client - .NET client for SignalR
    SignalR.WP7 & SignalR.Silverlight – For the cool folks 
    SignalR.WebSockets - WebSocket Transport for SignalR
Live Demos
Whoa .. What happened here?

Client calls server; Server calls client; seamlessly

No polling, at least in our code

Server maintains Clients .. Broadcast to all, group or individual clients

Low level – PersistentConnection; more control

Abstraction – Hub; easier to use
Where does this fit?
Other technologies have solved this problem

Socket.IO is a client-side Jscript library that talks to node.js

Nowjs supports namespace sync between client-server

Primary SignalR advantages

    → Simplicity & ease of use
    → Works natively in .NET
    → Works out of browser
    → Supports Web Sockets through a NuGet package
      [ASP.NET 4.5/IIS 8 on Win8 only]
       WebSocket is a web technology providing for multiplexing bi-directional, full-duplex
         communications channels over a single TCP connection. Still being standardized.
    → Works on other platforms
SignalR Client for iOS




http://dyknow.github.com/SignalR-ObjC/
SignalR Client for Mono




http://blog.rthand.com/post/2012/03/14/SignalR-client-on-Mono-for-Android.aspx
Local Touch – Global Reach




Questions?

Thank you !!

@samidip




                             www.us.sogeti.com

SignalR Intro + WPDev

  • 1.
    Local Touch –Global Reach Intro to SignalR + Awesome Mobile Possibilities ! Samidip Basu Solutions Lead | MSFT Mobility Email: Samidip.Basu@us.sogeti.com Twitter: @samidip Info: http://samidipbasu.info Blog: http://samidipbasu.com Sogeti USA 8425 Pulsar Place, Suite 300 | Columbus, OH 43240. www.us.sogeti.com www.us.sogeti.com
  • 2.
    Central Ohio WindowsPhone User Group http://cowpug.org http://meetup.com/cowpug @cowpug 3rd Monday @ TechColumbus
  • 3.
    Why do weneed real-time? New email Twitter/Facebook updates Stock Ticker/Live Auctions Game Scores Real-time Notifications Turn-by-Turn Games Collaboration Progress Bars And obviously, Chat
  • 4.
    Existing Technologies HTTP –purely Request/Response protocol Internet – stateless; servers don’t call your app back Consumption model .. But we’ve learnt tricks Periodic/Ajax Polling – not real-time, bandwidth misuse Image courtesy
  • 5.
    Existing Technologies .. Contd. Use plugins like SL/Flash – to access sockets Native Web Sockets help – but low level & support flaky Long Polling – server does not respond unless X happens, client polls after data receive or time-out Image courtesy @maartenballiauw
  • 6.
    Enter SignalR An async,persistent connection/signalling library for .NET ... aids in building real time, multi-user connected applications. Persistent client-server connection over best transport .. Abstracts away the transport layer. From ASP.NET team-members (Damian Edwards & David Fowler) .. Not officially MSFT product, but OSS Booyah  https://github.com/SignalR/SignalR http://jabbr.net/#/rooms/signal SignalR is broken up into a few packages on NuGet: SignalR - Package for SignalR.Server and SignalR.Js SignalR.Server - Server components needed for SignalR endpoints SignalR.Js - Javascript client for SignalR SignalR.Client - .NET client for SignalR SignalR.WP7 & SignalR.Silverlight – For the cool folks  SignalR.WebSockets - WebSocket Transport for SignalR
  • 7.
    Live Demos Whoa ..What happened here? Client calls server; Server calls client; seamlessly No polling, at least in our code Server maintains Clients .. Broadcast to all, group or individual clients Low level – PersistentConnection; more control Abstraction – Hub; easier to use
  • 8.
    Where does thisfit? Other technologies have solved this problem Socket.IO is a client-side Jscript library that talks to node.js Nowjs supports namespace sync between client-server Primary SignalR advantages → Simplicity & ease of use → Works natively in .NET → Works out of browser → Supports Web Sockets through a NuGet package [ASP.NET 4.5/IIS 8 on Win8 only] WebSocket is a web technology providing for multiplexing bi-directional, full-duplex communications channels over a single TCP connection. Still being standardized. → Works on other platforms
  • 9.
    SignalR Client foriOS http://dyknow.github.com/SignalR-ObjC/
  • 10.
    SignalR Client forMono http://blog.rthand.com/post/2012/03/14/SignalR-client-on-Mono-for-Android.aspx
  • 11.
    Local Touch –Global Reach Questions? Thank you !! @samidip www.us.sogeti.com