As we launch our new HTML5 Labs today, this is one of two guest blogs about the first two HTML5 prototypes. It is written by Tomasz Janczuk, a Principal Development Lead in Microsoft’s Business Platform Division.
In my blog post from last summer I wrote about a prototype .NET implementation of two drafts of the WebSockets protocol specification - draft-hixie-thewebsocketprotocol-75 and draft-hixie-thewebsocketprotocol-76 - making their way through the IETF at that time.
Since then, there have been a number of revisions to the protocol specification, and it is time to revisit the topic. Given the substantial demand for code to experiment with, we are sharing the Windows Communication Foundation server and Silverlight client prototype implementation of one of the latest proposed drafts of the WebSockets protocol: draft-montenegro-hybi-upgrade-hello-handshake-00.
You can read more about the effort and download the .NET prototype code at the new HTML5 Labs site.
WebSockets is one of the HTML 5 working specifications driven by the IETF to define a duplex communication protocol for use between web browsers and servers. The protocol enables applications that exchange messages between the client and the server with communication characteristics that cannot be met with the HTTP protocol.
In particular, the protocol enables the server to send messages to the client at any time after the WebSockets connection has been established and without the HTTP protocol overhead. This contrasts WebSockets with technologies based on the HTTP long polling mechanism available today.
For this early WebSockets prototype we are using a Silverlight plug-in on the client and a WCF service on the server. In the future, you may see HTML5 Labs using a variety of other technologies.
Along with the downloadable .NET prototype implementation of the WebSocket proposed draft-montenegro-hybi-upgrade-hello-handshake specification, we are also hosting a sample web chat application based on that prototype in Windows Azure here. The sample web chat application demonstrates the following components of the prototype:
The downloadable package contains a .NET prototype implementation consisting of the following components:
Given the prototype nature of the implementation, the following restrictions apply:
This implementation has been tested to work on Internet Explorer 8 and 9.
Why is this important?
Through access to emerging specifications like WebSockets, the HTML5 Labs sandbox gives you implementation experience with the draft specifications, helps enable faster iterations around Web specifications without getting locked in too early with a specific draft, and gives you the opportunity to provide feedback to improve the specification. This unstable prototype also has the potential to benefit a broad audience.
As you try this implementation we welcome your feedback and we are looking forward to your comments!
Tomasz