Re: [hybi] frame length encoding

Roberto Peon <fenix@google.com> Sun, 22 August 2010 08:48 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 D7D273A681B for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 01:48:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.03
X-Spam-Level:
X-Spam-Status: No, score=-104.03 tagged_above=-999 required=5 tests=[AWL=1.946, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, 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 xQdKpS5ldWzF for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 01:48:44 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 32BEB3A677D for <hybi@ietf.org>; Sun, 22 Aug 2010 01:48:43 -0700 (PDT)
Received: from hpaq6.eem.corp.google.com (hpaq6.eem.corp.google.com [172.25.149.6]) by smtp-out.google.com with ESMTP id o7M8nHEr020216 for <hybi@ietf.org>; Sun, 22 Aug 2010 01:49:17 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1282466957; bh=9cIb1+e9M5ZctYO0/OwjMTO/V/Y=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type; b=fYY4Afym6kPnb9c95/kIKM3z89UyP+PRDI6MiccoMuVIxf5B1rSdGE0taIq1GXTW4 ZZeyAcsDCJTZhU56HBMMQ==
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=AHzphT2rrlf3E6FVYxAZmUaLOAO/rG8xN7fwLirXu/y5+SVbZruXJJh24QG33UkSn zRsUeeHBkphI9kWtQ5/8g==
Received: from gwb11 (gwb11.prod.google.com [10.200.2.11]) by hpaq6.eem.corp.google.com with ESMTP id o7M8nF8U020521 for <hybi@ietf.org>; Sun, 22 Aug 2010 01:49:16 -0700
Received: by gwb11 with SMTP id 11so1727205gwb.32 for <hybi@ietf.org>; Sun, 22 Aug 2010 01:49:15 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.92.3 with SMTP id u3mr3978113ybl.209.1282466955198; Sun, 22 Aug 2010 01:49:15 -0700 (PDT)
Received: by 10.150.177.20 with HTTP; Sun, 22 Aug 2010 01:49:15 -0700 (PDT)
In-Reply-To: <9dffe328cf36cd4acddad3282208ae5b.squirrel@sm.webmail.pair.com>
References: <AANLkTimKbmcpgx8k0uXUWvCO=8w9pPrtV=3y4qh6363k@mail.gmail.com> <alpine.DEB.2.00.1008212037190.27211@tvnag.unkk.fr> <AANLkTinrsT+wV48nHvVW_1ChGYffkq7jisU2-PZnMyKg@mail.gmail.com> <alpine.DEB.2.00.1008212123460.27211@tvnag.unkk.fr> <20ef7ed5e135c57c1ee5a741658b9d98.squirrel@sm.webmail.pair.com> <1282423311.2014.6.camel@tng> <b09e8e740ef2b5b5ec3c85a5d9dcfd08.squirrel@sm.webmail.pair.com> <AANLkTikE8+oEbviWrPO=Pi+=CHSMnCD9KYmH8EMxMktw@mail.gmail.com> <1282435090.2014.12.camel@tng> <5628917d835c46121071f82037969615.squirrel@sm.webmail.pair.com> <AANLkTi=RVA4GQTExr9wjLR5+jH7q8R42_MKFPnp0eQU9@mail.gmail.com> <9dffe328cf36cd4acddad3282208ae5b.squirrel@sm.webmail.pair.com>
Date: Sun, 22 Aug 2010 01:49:15 -0700
Message-ID: <AANLkTi=r3j26Fc=2EX4V6eHno3iVwOR+y6CZ3mVC-X1t@mail.gmail.com>
From: Roberto Peon <fenix@google.com>
To: shelby@coolpage.com
Content-Type: multipart/alternative; boundary="000e0cd257744cffdc048e659b06"
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] frame length encoding
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: Sun, 22 Aug 2010 08:48:45 -0000

On Sun, Aug 22, 2010 at 1:42 AM, Shelby Moore <shelby@coolpage.com> wrote:

> > On Sat, Aug 21, 2010 at 8:23 PM, Shelby Moore <shelby@coolpage.com>
> wrote:
> >
> >> > On Sat, 2010-08-21 at 16:59 -0400, John Tamplin wrote:
> >> >> On Sat, Aug 21, 2010 at 4:57 PM, Shelby Moore <shelby@coolpage.com>
> >> >> wrote:
> >> >
> >> >>          Can you simply rewrite
> >> >>         one sector on disk and the memory manager remaps?
> >> >>
> >> >>
> >> >> I haven't tried it personally, but I would suspect you could use
> >> >> TCP_CORK, write a header, use sendfile to send a chunk of the file to
> >> >> finish the frame, uncork, repeat until done.  I don't think there
> >> >> would be any extra copying involved here, but you can't just issue
> >> the
> >> >> sendfile and go on to the next message, you need some thread that
> >> will
> >> >> queue up the next frame when it is ready.
> >> >
> >> > That is correct (and I have done this personally), you need multiple
> >> > calls of the ZC API interleaved with the write of the chunk header.
> >> > There is no copying of the data through the CPU just because it
> >> requires
> >> > multiple calls. And there is no reason you couldn't implement some
> >> kind
> >> > of writev() like API that lets you interleave copied and zero-copied
> >> > data.
> >> >
> >> > And yes, multiple calls are more overhead than 1 call. but at 1 per
> >> 4GB,
> >> > it really is inconsequential.
> >>
> >> That is an extremely technical solution applicable to experienced
> >> sysadmins.
> >>
> >> But WebSockets is supposed to be used also by web programming amateurs.
> >> It is much easier for them to issue a single sendFile() call from PHP,
> >> Perl, Ruby, etc., without all the fuss and low-level network stack API
> >> synchronization.
> >>
> >
> > No, that (amateur programmers) is not a requirement currently as I
> > understand things.
> > The expectation is that we develop the minimal featureset necessary to
> > ensure a robust and hopefully efficient transport.
> > There are different perspectives about what that featureset need be
> > assuming
> > competent professional programmers, and that is how you should be looking
> > it
> > it!
> > -=R
>
> My understanding is that the "amateur programmers" requirement was only
> removed for those who process the protocol directly, not for those who use
> WS in scripting applications such as Javascript in browser, PHP, Perl, etc
> on server. Am I incorrect?
>

The API should be easily used and there should be trivial applications which
may use it.
I don't believe there is any requirement for this which has been explicitly
stated, but there have been concerns voiced about the feasibility of
representing various data in JS. I believe that consensus was reached on
binary/utf representation of data as a result of these concerns.

Which is a long-winded way of saying that you're correct that protocol
implementors (servers, browsers, intermediaries) had the "amateur
programmer" requirement lifted.


>
> I would strongly disagree if we go against "amateur programming" in
> scripting uses of WS.  I do agree with the elimination of "amateur
> programming" requirement for protocol implementation programmers.
>

Excellent, then I think that matches what I perceived as the stated
consensus.

-=R