Re: [hybi] Framing proposal with start/end demarcation

Roberto Peon <fenix@google.com> Thu, 05 August 2010 16:32 UTC

Return-Path: <fenix@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id DD5D63A6B15 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 09:32:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.548
X-Spam-Level:
X-Spam-Status: No, score=-101.548 tagged_above=-999 required=5 tests=[AWL=-0.172, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_24=0.6, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F47dVN0WBvXI for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 09:32:26 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 286723A68B6 for <hybi@ietf.org>; Thu, 5 Aug 2010 09:32:22 -0700 (PDT)
Received: from hpaq5.eem.corp.google.com (hpaq5.eem.corp.google.com [172.25.149.5]) by smtp-out.google.com with ESMTP id o75GWmWV022844 for <hybi@ietf.org>; Thu, 5 Aug 2010 09:32:48 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1281025970; bh=r9SViTx4b9vin8tzvr3wNJEFuPM=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=h8m3CochcCdxCN2iZUQ4gr5B3HQwlYzBzA5MqeG2iFqMbMMt9cWt/o8+nhyu/8FQY RqaXUvtC1MbNEREIuz7kQ==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:x-system-of-record; b=T1LDmE+c5qN1G9ls9QBmMVTCmeysqlZqa6z5NYrKBeLGND+iuFX00ELel34jSzTWQ nBA5Vj8u1zyxU6FSsTHNA==
Received: from ywe9 (ywe9.prod.google.com [10.192.5.9]) by hpaq5.eem.corp.google.com with ESMTP id o75GWGPr007514 for <hybi@ietf.org>; Thu, 5 Aug 2010 09:32:46 -0700
Received: by ywe9 with SMTP id 9so3117930ywe.36 for <hybi@ietf.org>; Thu, 05 Aug 2010 09:32:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.132.9 with SMTP id f9mr12804484ybd.386.1281025966362; Thu, 05 Aug 2010 09:32:46 -0700 (PDT)
Received: by 10.150.59.4 with HTTP; Thu, 5 Aug 2010 09:32:46 -0700 (PDT)
In-Reply-To: <4C5AE0CA.9050007@opera.com>
References: <4C5651AB.2020005@mail-abuse.org> <AANLkTi=Eq_Ynh5oHC1rgmomPydMFz09DYMbdqJvRFjHH@mail.gmail.com> <Pine.LNX.4.64.1008040043360.5947@ps20323.dreamhostps.com> <AANLkTinwmLYAQnh25L-n2n+ySBKOOReEJv5Ywg7OmZTr@mail.gmail.com> <AANLkTi=tWRpobNX45b7-7K=zkJT1dqwYud5h577gg9za@mail.gmail.com> <Pine.LNX.4.64.1008040622520.5947@ps20323.dreamhostps.com> <AANLkTikaruGt6pXacHWqF+FAkgXg1uh3kN4RPyay+bnR@mail.gmail.com> <Pine.LNX.4.64.1008040808390.5947@ps20323.dreamhostps.com> <AANLkTik+mEKsZz8-CojnMip1Vpp06f6uutNX3eT6gPpD@mail.gmail.com> <Pine.LNX.4.64.1008041803400.5947@ps20323.dreamhostps.com> <AANLkTinQtkGLf+YvJ5c724nas3xqbRchfHSRkfKoEb5u@mail.gmail.com> <op.vgyd890464w2qv@anne-van-kesterens-macbook-pro.local> <AANLkTin9wTTzrLNSu5AZz+MLx4NT-PHZV0kj8tv4RKm+@mail.gmail.com> <op.vgykq4ul64w2qv@anne-van-kesterens-macbook-pro.local> <AANLkTik4bcOFkdvq3DWuDs1RRLPzXCEyvHK1ef1dAr8E@mail.gmail.com> <4C5AD3F6.90108@opera.com> <AANLkTim+tsT8jh=s0mUKvkVSQceG7kPxhg7J-0_yCKmH@mail.gmail.com> <4C5AE0CA.9050007@opera.com>
Date: Thu, 05 Aug 2010 09:32:46 -0700
Message-ID: <AANLkTimZdxYuO8usffaSKVNpG97dDbm5uTT2yhyJa2pP@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: James Graham <jgraham@opera.com>
Content-Type: multipart/alternative; boundary="000e0cd4871cac5148048d1619ef"
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing proposal with start/end demarcation
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Aug 2010 16:32:31 -0000

On Thu, Aug 5, 2010 at 9:03 AM, James Graham <jgraham@opera.com> wrote:

> On 08/05/2010 05:19 PM, Roberto Peon wrote:
>
>>
>>
>> On Thu, Aug 5, 2010 at 8:08 AM, James Graham <jgraham@opera.com
>> <mailto:jgraham@opera.com>> wrote:
>>
>>    On 08/05/2010 04:55 PM, Roberto Peon wrote:
>>
>>
>>        So, playing devils advocate, why are we implementing any framing
>>        at all?
>>        It is trivial for an application developer to do framing themselves
>>        (they can do length prefixing as a string, they can do sentinel
>>        demarcation, etc, etc.).
>>        Why aren't we waiting to see a strong need for this from the
>>        application
>>        developers?
>>        Now I don't really think that a lack of framing is a good thing,
>>        but if
>>        we're applying this litmus test we should apply it to all
>>        features, not
>>        just the ones that I want! :)
>>
>>
>>    Because we can't have a sensible javascript API at all without
>>    making the protocol message-based. In particular a typical
>>    sockets-style API with blocking .recv() calls doesn't play well with
>>    browsers (you don't want to let people block the UI thread). Since
>>    the API has to be asynchronous, making it messaged based and using
>>    events flows very naturally from the basic requirements.
>>
>>
>> Why not do it in a Worker and provide the appropriate JS which sets this
>> up automatically?
>> Or, why use blocking recv() calls? Use nonblocking recv()!
>> This would result in a far more simple protocol at the cost of moving
>> complexity to the application writers.
>>
>
>
You cut off the part where I said that I thought that the above was a bad
idea, BTW :)


>
> Sure. But everyone seems to agree that this makes the protocol gratuitously
> difficult to use. And that difficulty applies to everyone who wants to use
> it, which makes it relatively bad compared to something that only affects
> people working at scale.
>

Agreed, but with the coloring that we've been talking about the application
developers instead of the users. If users don't get to use WS to places that
need to scale, then we're penalizing a large segment of the user population.


>
> So, for every possible feature we have to make some judgment call on
> whether we want to support it and if so how. It comes down to weighing up
> the costs of the additional complexity, against its usefulness against the
> value to authors, taking into account at every stage that we could be wrong
> about the value if we have insufficient evidence to support the value
> proposition.
>
>
Understood.


> I don't think there is a simple litmus test that will tell us unambiguously
> what choices to make. But I do think that if you start simple and build up
> then you are sure to end up with something that at least works in the simple
> cases, and, as you identify more pain points (in usability, performance,
> etc.), you will cover more and more requirements with relatively low risk of
> being wrong. If you try and bake in lots of things from the start you run a
> high risk of being wrong about how the future will pan out. You also run a
> higher risk of buggy or incomplete implementations since implementers have
> more to do all at once. There is,some risk that future additions to the core
> never take off in the same way as the basic protocol. One would imagine that
> as long as we are really adding features that people want, the only barriers
> to adoption would be technical.


Well, unfortunately we know that isn't true. As we already know it is fairly
difficult to get all the browsers updated to something that speaks a new
protocol. Servers are a far easier chore to upgrade as there are far fewer
controlling parties. The technical challenges are the easy ones-- getting
users to upgrade or change their browsers is fairly difficult. If that
wasn't true there wouldn't be a significant population still using IE6 on
XP.


> So it is important to avoid such technical barriers upfront. Otherwise
> making small iterations should make the lack of a simple litmus test for
> determing which features will be needed in the future less significant.
>

I hope you're right. I'm afraid you won't be--  scaling is not optional. We
may not be able to use websockets if we can't get it to scale efficiently,
and I'm truly afraid that moving the complexity of multiplexing to the JS
applications will fail. And our ability to do that is limited to Google
owned properties.

So, what is the litmus test? I think that we should be thinking about the
users of the browsers in addition to the application developers, but I
haven't seen many mentioning anything like this explicitly.

-=R