Subject: Re: [hybi] Opera Core Concerns - WebSockets in Opera

From: "Simon Pieters" <[email-masked]>
Date: Thu, 14 Oct 2010 13:19:09 +0200

On Thu, 14 Oct 2010 13:00:37 +0200, James Graham <[email-masked]> wrote:

> On 10/14/2010 12:39 PM, Simon Pieters wrote:
>> +jgraham
>>
>> (Actually maybe we should just discuss this on hybi?)
>
> That seems sensible to me. Also, it is quite hard to unpick who said  
> what from the below :)

+hybi

Philip Jägenstedt wrote the first bit quoted below...

>>> I met with nice guy Chris on several occasions and timezones in the US
>>> recently and we discussed WebSockets a bit in between the <video>
>>> stuff. Since I'm not involved in that work, I leave it to the rest of
>>> you to discuss what needs discussing :)
>>
>> You can tell which version the browser supports by looking at the
>> handshake, since the different versions have different handshakes. (In
>> -02 the handshake is the same as -00 except it has a Sec-WebSocket-Draft
>> field indicating the draft version.)
>>
>> As far as I can tell prefixing only communicates that it's experimental,
>> it doesn't help with telling which version the browser supports.
>>
>> Prefixing the constructor has the advantage that it is easier to feature
>> test (compared to prefixing the scheme). If we prefix the scheme then
>> you'd need to try to connect to a server and catch the exception to
>> feature test, which is not so obvious nor clean.
>
> I don't think prefixing the constructor will help anyone at this point.  
> Webkit have already shipped an unprefixed constructor and I would expect  
> developers to write code that hides the difference between prefixed and  
> unprefixed constructors. Therefore I would expect exactly the same  
> breakage from implementing an incompatible protocol change whether or  
> not there is a corresponding change in the spelling of the constructor.

Yeah, I agree.

>> If we find when the protocol is "finished" that we can't move away from
>> 'ws' and 'wss' from -00, then we could just mint new names for the
>> standard protocol, as abarth said in the moz bug.
>>
>> At this point I'm still not convinced that it's a good idea to prefix
>> anything.
>
> Yeah, I think if everyone had agreed up front to use prefixes somewhere  
> it would work. But they didn't so we don't live in that world... If we  
> end up needing long-lived support for multiple incompatible versions of  
> the protocol then it makes some conceptual sense to give them different  
> schemes.

Right.

-- 
Simon Pieters
Opera Software