[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hybi] WebSocket and metadata (Was: BWTP Proposal - Bidirection Web Transfer Protocol)



On Wed, 17 Jun 2009, Salvatore Loreto wrote:
> > 
> > The WebSocket protocol is designed on the principle that there should 
> > be minimal framing (the only framing that exists is to make the 
> > protocol frame-based instead of stream-based, and to support a 
> > distinction between Unicode text and binary frames). It is expected 
> > that metadata would be layered on top of WebSocket by the application 
> > layer, in the same way that metadata is layered on top of TCP/IP by 
> > the application layer (HTTP).
>
> I don't see any minimal framing requirement from the requirements list 
> you sent on this list a couple of months ago: 
> http://www.ietf.org/mail-archive/web/hybi/current/msg00007.html

Minimal framing isn't a requirement. Being able to implement the 
server-side component easily is:

| - It must be possible to implement a fully-conforming server-side 
|   component for this in a few dozen lines of scripting code, in the case 
|   where sharing the connection with an HTTP server isn't required.

(I haven't tried implementing BWTP to see if it's possible to implement it 
in a few dozen lines of code; WebSocket can be implemented in Perl using 
only Encode, IO::Socket, and IO::Select in about 100 lines of code.)


I should say, though, that I have no objection to BWTP personally (or to 
any other protocol for that matter). It's more complex than what I would 
ideally like, but if there are implementors or authors who think it is the 
better solution than Web Socket then I encourage them to use it.


> > Conceptually, WebSocket is really just a layer on top of TCP/IP that adds a
> > Web "origin"-based security model for browsers; 
>
> the problem here is that WebSocket are not built directly on top of 
> TCP/IP, but it tries to reuse the HTTP infrastructure to in somehow 
> perform a downgrade from the HTTP protocol to the TCP protocol and then 
> start to build on top of it.

WebSocket stands alone, it just happens to be compatible with an HTTP 
Upgrade handshake. I expect most uses of WebSocket to not involve any HTTP 
servers and to just be a client connecting straight to a WebSocket server.

This is why, for instance, the handshake isn't actually defined in terms 
of HTTP, but in terms of bytes that happen to be compatible with HTTP.

It's wrong to consider WebSocket to be based on HTTP more than TCP.

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

Note Well: Messages sent to this mailing list are the opinions of the senders and do not imply endorsement by the IETF.