Push processing and Web Socket Protocol

View: New views
3 Messages — Rating Filter:   Alert me  

Push processing and Web Socket Protocol

by noah_mendelsohn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
--------------------------------------






Re: Push processing and Web Socket Protocol

by Ian Hickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 5 Jun 2009 noah_mendelsohn@... wrote:
>
> "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.

Good catch; this note became out of date when I stopped including the
WebSocket text in the HTML5 spec a few months back. I've updated the note
to be more accurate. Thanks!

--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: Push processing and Web Socket Protocol

by noah_mendelsohn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, great.  That was more or less an aside anyway; I just assumed that you
still had some hiddent meta-HTML5 source from which this was indeed
generated (though I was intrigued that you took the trouble to do that and
have it come out as such an idiomatic IETF draft.)

Anyway, my main point was to doublecheck that TAG members and www-tag
readers are comfortable with the protocol from a Web arch perspective.
Thank you.

Noah

--------------------------------------
Noah Mendelsohn
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








Ian Hickson <ian@...>
06/05/2009 03:55 PM
 
        To:     noah_mendelsohn@...
        cc:     www-tag@...
        Subject:        Re: Push processing and Web Socket Protocol


On Fri, 5 Jun 2009 noah_mendelsohn@... wrote:
>
> "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.

Good catch; this note became out of date when I stopped including the
WebSocket text in the HTML5 spec a few months back. I've updated the note
to be more accurate. Thanks!

--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'