Re: [hybi] Frame size

Justin Erenkrantz <justin@erenkrantz.com> Fri, 16 April 2010 07:44 UTC

Return-Path: <justin.erenkrantz@gmail.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 1C4853A6934 for <hybi@core3.amsl.com>; Fri, 16 Apr 2010 00:44:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.244
X-Spam-Level:
X-Spam-Status: No, score=-0.244 tagged_above=-999 required=5 tests=[AWL=-0.867, BAYES_50=0.001, FM_FORGED_GMAIL=0.622]
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 sDGkTNNDwv-B for <hybi@core3.amsl.com>; Fri, 16 Apr 2010 00:44:17 -0700 (PDT)
Received: from mail-qy0-f171.google.com (mail-qy0-f171.google.com [209.85.221.171]) by core3.amsl.com (Postfix) with ESMTP id 98F4E3A69D1 for <hybi@ietf.org>; Fri, 16 Apr 2010 00:43:33 -0700 (PDT)
Received: by qyk1 with SMTP id 1so2332736qyk.15 for <hybi@ietf.org>; Fri, 16 Apr 2010 00:43:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=re4OQq7its2UlK2wJcrSTP40qQCfUsBeRkOga6U0uHM=; b=Eek0ox5+ujt+GFPjOQeTh3WyndLWfXb4aikofW3NKfn72cemdaRuCVlbNkYEtJyByc iuH1V4ifJYBFDfpV/+7LVVYCbh5BKdeTHbxkqm6Bhh2cyYjmkw7hUvZPfW107CS1x2zc Bb/BU9USOHmI23lbdzpbADu7TiwlqWwRBQbCs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=YhN4EWEs5RK/hCpAn6HxSZBJZOZ8fp4p3uJ9C7JG5e+L4gIlMd4T5xlvrfEdrq6vaP jJs5PD6YoGEc6GOMY9nD0RdQMjDW5/TGIrSB4qiOcnB+jApasX266/j5YiSnfgGbZFZ/ 21qDkfPSREuYMKayw4Fi4CrsXbqDgWRmXXvxg=
MIME-Version: 1.0
Sender: justin.erenkrantz@gmail.com
Received: by 10.229.17.84 with HTTP; Fri, 16 Apr 2010 00:43:25 -0700 (PDT)
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03E3F313ED@SISPE7MB1.commscope.com>
References: <8B0A9FCBB9832F43971E38010638454F03E3F313ED@SISPE7MB1.commscope.com>
Date: Fri, 16 Apr 2010 00:43:25 -0700
X-Google-Sender-Auth: 209129018d0d70c4
Received: by 10.229.212.132 with SMTP id gs4mr1617739qcb.53.1271403805803; Fri, 16 Apr 2010 00:43:25 -0700 (PDT)
Message-ID: <v2m5c902b9e1004160043i7b5ccc79y2346e1b2b2c55cf5@mail.gmail.com>
From: Justin Erenkrantz <justin@erenkrantz.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Frame size
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: Fri, 16 Apr 2010 07:44:19 -0000

On Fri, Apr 16, 2010 at 12:22 AM, Thomson, Martin
<Martin.Thomson@andrew.com> wrote:
> Responding to specific concerns on framing seems not especially productive.
>
> Proposal:
>
>  - Frame size is indicated up front.
>  - Frames are binary.
>  - Frame size be strictly limited (2 octets should suffice).

To be clear, this would be 16-bits for the size or a max of 65,535
bytes in a single frame, correct?

(I'm assuming that you don't mean "2 octets" as being that's all you
can send in one frame.  *grin*)

>  - Sub-protocol needed if messages are larger than the max frame.

One other note from Ireland is that when httpd and tomcat devs talked
about small frame sizes, most people thought that frame sizes in this
range would be artificially limiting - a few folks talked about Comet
apps they've seen transferring large XML files.  Silly perhaps, but
that's what the app writers did...trying to get them to change is
pointless.

IMO, going to 32 bits or even 64 bits simply isn't that much of a
difference - and may actually be easier if it means removing a
sub-protocol or extension - the phrase "premature optimization" was
bandied about in keeping the frame size arbitrarily low.  =)

Anyway, if we flesh out a way up-front to do "jumbo" frames (via an
extension), I think that'd be fine, but I'd be leery of throwing too
much into extensions.

Other than that caveat, I'm okay with what you propose.

...snip...
> IF used for UTF-8 AND implementer counts characters instead of octets THEN framing doesn't work.  (One solution to this problem is to start a frame with a known sequence of octets, so that this can be detected.  Another "solution" is to not worry about it.)

+1 to "not worry about it".  -- justin