Вы находитесь на странице: 1из 16

INDIA │ 28-30 September 2011

virtual techdays

Socket Programming on the web


Rajasekharan Vengalil│ Developer Evangelist, Microsoft
INDIA │ 28-30 September 2011
virtual techdays
SESSION AGENDA

• WebSockets
– Why, but why?
– WebSockets defined
– How to get it
– Demo – Socket Chat
– Demo – Building a collaborative doodling app
WebSockets – Why, but why?

• Real time web


–Twitter, Stock tickers, Games
–Hard to efficiently push data to a
browser
Current polling methods
WebSockets – What is it?
a socket that works anywhere across the
web …even through network
intermediaries
WebSockets Spec is really two separate
specs

WebSockets Protocol W3C WebSockets API


HyBi Working Group Web Applications Working Group
WebSockets in IE, Windows & .NET
• Implements hybi-10
• IE 10
• IIS 8.0
• .NET 4.5
– ASP.NET
– WCF
– HttpListener
WebSocket protocol: how it works
• Connection established using HTTP handshake
• Data is sent over the underlying TCP
connection
– Binary or UTF8
• Can traverse firewalls and proxies
– Best results when tunneled over SSL
WebSockets - How to get it?

• Options:
1. Get web sockets prototype from html5labs.com
and work with IE9
2. Download Windows 8 Developer Preview and get
it out of the box on IE10 Platform Preview 3
3. Chrome 14
4. Firefox 7
Socket chat
DEMO 1

10
A collaborative doodling app
DEMO 2

11
Resources
• Web Sockets Spec • Shameless Plug
– My blog
• Get Win8 Dev Preview
• blogorama.nerdworks.in
• IE 10 developer’s guide – Twitter
on Web Sockets • @avranju
• Paul Batum’s blog post – Email
on setting up on Win8 • rajave@microsoft.com

• BUILD session on
WebSockets

12
THANKS│28-30 September 2011
virtual techdays
Please do give your Feedback. Its important! Well, kind of.
Puhleeze!
Description
• Free e-learning program
• 100, 200 and some 300 level-multiproduct content
• Organized by product, careers & specializations
• 5 tracks released, 1 more every week
• Online and offline components

Register and study a course in MVA


www.MicrosoftVirtualAcademy.com
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in
the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft
must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any
information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Вам также может понравиться