Re: [hybi] thewebsocketprotocol #28 (new): Fragmentation

John Tamplin <jat@google.com> Wed, 24 November 2010 19:03 UTC

Return-Path: <jat@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 2875B3A6996 for <hybi@core3.amsl.com>; Wed, 24 Nov 2010 11:03:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.135
X-Spam-Level:
X-Spam-Status: No, score=-104.135 tagged_above=-999 required=5 tests=[AWL=1.841, 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 AokX+ZoHbsYm for <hybi@core3.amsl.com>; Wed, 24 Nov 2010 11:03:58 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id B2DF23A6944 for <hybi@ietf.org>; Wed, 24 Nov 2010 11:03:57 -0800 (PST)
Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id oAOJ4uJq020159 for <hybi@ietf.org>; Wed, 24 Nov 2010 11:04:57 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1290625497; bh=RKNyISXCTess616MLxmlXM00LBk=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mtFtoiDpG9DZkVPwB6NUvpnltkgSjGZs+xtWlpswaWI/LS/o99gxcTNlO3lKwNVUE yZD2e8BkZWcesYpQocBHA==
Received: from ywf9 (ywf9.prod.google.com [10.192.6.9]) by hpaq2.eem.corp.google.com with ESMTP id oAOJ4nk8021483 for <hybi@ietf.org>; Wed, 24 Nov 2010 11:04:55 -0800
Received: by ywf9 with SMTP id 9so49324ywf.11 for <hybi@ietf.org>; Wed, 24 Nov 2010 11:04:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=2wzW/LDLtUSsymDMfUx4/OTVxmpTCfa9xp3pVdr5LUM=; b=Odvo2zqwfEy6Wvxxk6yaGtGOUQr4jySq8tk+cyBfv+2nDhCH1I9tdo8kxs8qhuLLzO 5NEUb1CMi4/Nyn8PXbrQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=KhFc5a7Nq6WmQn5zIvwkicRqv4Gqj6onp/52UAwO3mAgDkyLcfTazKCRIfyoWbOpYy rCQRhQZxIQezB8Fk5QJA==
Received: by 10.150.91.18 with SMTP id o18mr1588630ybb.92.1290625494335; Wed, 24 Nov 2010 11:04:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.54.13 with HTTP; Wed, 24 Nov 2010 11:04:34 -0800 (PST)
In-Reply-To: <AANLkTim4djXE2DXdqpn5kSbHPj93UgE3rOvO7vvUE+=m@mail.gmail.com>
References: <059.5b3c3b280c1320a26d9c11c25e067e06@tools.ietf.org> <AANLkTinE95cwFQjFWc3SYsWFYSiY4mu27oQpedYJGgDJ@mail.gmail.com> <AANLkTikS+N4ZjhoRLgZv5yetD2LceWXO=KC2ksgbfySQ@mail.gmail.com> <AANLkTimaRzGObYrTCB8p7qbvqUpPPhR-uErNRaV_wPzr@mail.gmail.com> <AANLkTikzKLVT=kYKoc67rsZOaeP=0hKe8rkk7y8kuimH@mail.gmail.com> <20101124104050.GY22787@shareable.org> <AANLkTim4djXE2DXdqpn5kSbHPj93UgE3rOvO7vvUE+=m@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Wed, 24 Nov 2010 14:04:34 -0500
Message-ID: <AANLkTikvPrC52YUpfiOao7emU7wQ4FKUtQXB4m0Mh52T@mail.gmail.com>
To: Zhong Yu <zhong.j.yu@gmail.com>
Content-Type: multipart/alternative; boundary="000e0cd406dc20fb5d0495d12a1c"
X-System-Of-Record: true
Cc: hybi <hybi@ietf.org>
Subject: Re: [hybi] thewebsocketprotocol #28 (new): Fragmentation
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: Wed, 24 Nov 2010 19:03:59 -0000

On Wed, Nov 24, 2010 at 1:01 PM, Zhong Yu <zhong.j.yu@gmail.com> wrote:

> > Right now, WS provides *two* abstractions: The one to app developers,
> > and the one over TCP.
> >
> > Some of us believe they *should not be the same* due to network
> > engineering issues *because that makes the app developer's job easier*.
> >
> > Right now, the "simplicity" of WS means *robust* apps need to
> > implement half of TCP in Javascript on the client, which is not a good
>
> That's where frameworks come in, which can provide degrees of
> robustness suitable for different applications. I don't think WS
> should or could address these application level concerns.
>
> The #1 feature needed for robustness is auto reconnect. Nobody
> proposed to build that feature in the WS protocol.
>
> > sign.  (For example the "tic tac toe" example, which is supposed to be
> > simple, can lock up on real networks: No more moves when a TCP is
> > silently dropped.  A HTTP equivalent doesn't have this problem.)
> >
> > Why do you think the two abstractions should be the same?
>
> They should not be. But no matter how complex the protocol must
> become, I wish it won't jeopardize the simple application abstraction.
> I don't want WebSocket to become WebService, and everybody needs to
> buy a 1000 page "The Definitive Guide".


A simple implementation, which does not implement any extensions, is still
quite simple.  See
http://code.google.com/p/websocket-draft-eval/source/browse/trunk/src/com/google/websocket/SimpleWebSocket.java
for
an example.

We are making slow enough progress as it is -- we don't need to be
revisiting framing decisions agreed upon months ago.


> chunks within a frame. frames can't overlap, therefore messages cannot
> overlap.
>

And how do you identify the chunk and frame boundaries if you don't know the
length up front?  This exact suggestion was made and rejected months ago --
please read the archives.

-- 
John A. Tamplin
Software Engineer (GWT), Google