Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Building real-time web apps with WebSockets using IIS, ASP.NET and WCF

Download

Right click “Save as…”

Slides (view online)
WebSockets is a new technology under joint development by Microsoft and other industry leaders, designed to enable secure, real-time bidirectional communication across the Web. Windows 8 has a comprehensive WebSocket offering with support in IE10, Metro style apps, WCF and ASP.NET. Come learn how HTML5 apps can make dramatic improvements in terms of user experience and performance by taking advantage of this exciting technology.
For more information, check out these courses on Microsoft Virtual Academy:

Follow the Discussion

  • I really enjoyed the session, is there a location to download the chat app source leveraging SignalR? Additionally, you guys mentioned that WebSockets support load balancing, is there magic that automatically notifies each server in the cluster of all the clients to broadcast or is there some configuration?

    Cheers!

  • Paul BatumPaul Batum

    Glad to hear that you enjoyed it! I'll try to find out about the source code for the SignalR chat and see if someone can post a link here.

    You ask a good question regarding load balancing and this is something that I wish we had more time during the session to dive into the technical details on. The short answer is no we don't have any magic to do what you are describing. WebSockets works well with TCP load balancers in that a single client will stay connected to the same server, however if you want to do broadcast to clients that are connected to different servers then right now you would need to implement this yourself. SignalR does have some hookpoints that should make it easier to implement this and you can be sure you will be hearing more from us in the future about solving these scale out problems (and not just in the SignalR space, this is important for WCF as well).

  • GillesGilles

    Is the WNS service based on this technology?

  • Paul BatumPaul Batum

    I know very little about WNS but I'm confident that it does not utilize WebSockets. If I had to hazard a guess I would say that WNS is probably based on SMS or something similar. One of the reasons I say this is because WNS notifications have to be really small ( < 4k):

    "The maximum size of a notification is 1 KB for the header and 3 KB for the payload. Notifications exceeding these limits will be discarded"

    http://msdn.microsoft.com/en-us/library/ff402558(v=vs.92).aspx

  • SoshSosh

    This should come with a warning about the screech at 12.35 - nearly deafened me with headphones on...

  • ojormaojorma

    Great, great.

  • So do I understand that this will only work on Windows 8 currently? If I were to download the vNext developer bits on my Win7 box would the WebSocket stuff not function?

  • Correct. You would get something like a "PlatformNotSupportedException". 

    If you'd like step by step instructions in setting up a Win8 preview machine and running the samples we showed in this talk, they are now available on my blog:

    http://www.paulbatum.com/2011/09/getting-started-with-websockets-in.html

  • Dominic PettiferDominic Pettifer

    Any word on whether ASP.NET 4.5 + WebSockets will be supported in IIS 7.0 - 7.5, and possibly IIS 6.0?

    While we can easily get clients to upgrade their .NET version, getting them to upgrade their server software is nigh on impossible.

  • Hi Dominic! I understand where you are coming from, but WebSockets is a new feature for IIS 8.0. At this stage there is no plan to support earlier versions of IIS. 

  • FredFred

    Where to find the sample of this session online?

  • Hi Fred, I wrote a blog post that covers how you can try out the samples using the Windows 8 developer preview: 

    http://www.paulbatum.com/2011/09/getting-started-with-websockets-in.html

  • Are there any metrics available that state how many concurrent WebSocket connections IIS + SignalR can support on a machine with a specification X? (maybe an Amazon EC2 small instance as an example). Any metrics on concurrent connection support in addition to standard HTTP requests? If so, a point in the right direction would be great. Thanks.

  • @undefined:for SignalR, we've sucessfully connected >100,000 concurrent clients to a single box. This is idle connections. I'm currently working on profiling and load testing SignalR with active connections and hope to have more numbers soon. FWIW, supporing lots of concurrent idle connections is pretty easy in IIS/ASP.NET if they're hitting asynchronous handlers and you tweak some settings. You'll only be limited by memory in real terms. Once you start adding traffic is when it gets really interesting Smiley

  • TomTom

    @DamianEdwards ,although it is a "pretty" library keeping 100,000 or 1million connections doesn't make any sense unless you can send them the same message the same time which is impossible with SignalR due to lack of chunk management, several IIS dependency etc.

    It is a good start but lots of missing.

  • MattMatt

    Have there been any tests with sending video from client to server or the other way? I'm very excited about this either way, great conference!

    Matt

  • VinayakVinayak

    any code for doing it for one to one and one to many video chat and conference?

    Thanks in advance

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.