Re: Hello from Mozilla

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 07 Jul 2009 22:21:31 -0600

On 07/07/2009 05:39 PM, Ian Hickson wrote:
> On Tue, 7 Jul 2009, Alex Rousskov wrote:
>> What is the motivation behind adding more ports?
>
> WebSocket is its own protocol, so the "right thing" to do is to use new
> ports. However, WebSocket can be sent over 80 or 443 quite happily.

If WebSocket is a new protocol on top of TCP, new TCP ports are
appropriate. Like virtually any protocol on top of TCP, WebSocket can
then rely on HTTP CONNECT tunneling mechanism without trying to redefine
or narrow it down.

If WebSocket is a new protocol on top of HTTP, then the talk of ports
seems far less appropriate because HTTP already has commonly used ports.

The fact that I could not tell which of the above statements is true
based on a quick draft read and things like prohibiting valid HTTP
messages in WebSocket responses worry me, but it is likely I just missed
some important pieces or caveats.

>> I have noticed there is something about the Upgrade header in the
>> websocket draft so perhaps that mechanism can be polished to implement a
>> proper protocol switch? Or is that too late?
>
> It actually does support a true HTTP Upgrade also, so that people who are
> already using ports 80 or 443 for HTTP can still use WebSocket if they are
> able to make their servers handle the protocol upgrade.

As far as I can tell, the protocol does not support true HTTP Upgrade
sequence but just one specific exchange of hard-coded (down to each
octet level!) HTTP messages. This clever hack smells like a layering
violation and can be a real pain to support if the client or server HTTP
stack just happens to generate slightly different messages. Again,
perhaps general-purpose client and server stacks are simply not the
targeted audience for the protocol and their limitation simply do not
matter.

Cheers,

Alex.
Received on Wed Jul 08 2009 - 04:21:50 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 08 2009 - 12:00:04 MDT