W3C home > Mailing lists > Public > www-tag@w3.org > June 2009

Push processing and Web Socket Protocol

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 5 Jun 2009 15:24:12 -0400
To: www-tag@w3.org
Cc: Ian Hickson <ian@hixie.ch>
Message-ID: <OF7C4F52CC.FF960261-ON852575CC.0068B119-852575CC.006A98F3@lotus.com>
I just became aware of the "Web Socket Protocol" [1] that Ian Hickson has 
published through IETF.    The draft says:

"This document is automatically generated from, and is therefore a  subset 
of, the HTML5 specification produced by the WHATWG", but as far as I can 
tell, the text of [1] does not appear in recent versions of the HTML5 
draft.  Anyway, I'm far from expert on this, but taken together with the 
Web Sockets API, this seems to give HTML 5 applications the ability to use 
Javascript to open what is ultimately a full duplex, non-HTTP connection, 
optionally through a proxy or firewall, to exchange information with a 
server using a non-HTTP protocol documented at [1].   The intended 
applications appear primarily to be Comet-like push data transfers to Ajax 
applications, though the protocol is bidirectional and could in principle 
be used for a variety of non-HTTP data exchanges.

 If I understand the data transmission part of the protocol, it boils down 
to sending sequences of frames, encoded as UTF-8, delimited with a 0x00 
byte to start and a 0xFF byte to end each frame.

Where I said that what is opened is "ultimately" a non-HTTP connection, I 
was referring to the fact that connections are initiated and proxies and 
firewalls are traversed by sending an HTTP  GET with:

        Upgrade: WebSocket
        Connection: Upgrade

The successful response to which is:

        HTTP/1.1 101 Web Socket Protocol Handshake
        Upgrade: WebSocket
        Connection: Upgrade

>From there, the non-HTTP full duplex traffic begins, as I understand it.

Question:  has anyone on the TAG looked at this?  Comet and similar 
techniques aren't new, but it does seem to be worth asking whether [1] 
and/or [2] raise any Web architecture issues of concern to the TAG. FWIW: 
I'm not offering an opinion one way or the other at this point, just 
asking.  FWIW: the use of upgrade looks to me pretty much consistent with 
the letter and spirit of section 14.42 of RFC 2616 [3], though I'm a 
little curious as to whether there's an implicit requirement that the 
information exchanged must be representations of the resource identified 
by the original request URI.  Anyway, I just want to make sure that we are 
all comfortable with this from a Web architecture point of view.  Thank 
you.

Noah

[1]  http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-15
[2] http://dev.w3.org/html5/websockets/
[3] http://www.ietf.org/rfc/rfc2616.txt

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------
Received on Friday, 5 June 2009 19:24:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:48:14 GMT