Re: WiSH: A General Purpose Message Framing over Byte-Stream Oriented Wire Protocols (HTTP)

Loïc Hoguin <essen@ninenines.eu> Fri, 28 October 2016 18:00 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1C6051294C7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 28 Oct 2016 11:00:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.352
X-Spam-Level:
X-Spam-Status: No, score=-7.352 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.431, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2czdoRMN4Jpq for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 28 Oct 2016 11:00:56 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C37D912940E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 28 Oct 2016 11:00:56 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c0BO3-0000d3-RC for ietf-http-wg-dist@listhub.w3.org; Fri, 28 Oct 2016 17:56:15 +0000
Resent-Date: Fri, 28 Oct 2016 17:56:15 +0000
Resent-Message-Id: <E1c0BO3-0000d3-RC@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <essen@ninenines.eu>) id 1c0BNz-0000bZ-F9 for ietf-http-wg@listhub.w3.org; Fri, 28 Oct 2016 17:56:11 +0000
Received: from mout.kundenserver.de ([212.227.17.13]) by titan.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <essen@ninenines.eu>) id 1c0BNt-0007de-DQ for ietf-http-wg@w3.org; Fri, 28 Oct 2016 17:56:06 +0000
Received: from [192.168.0.101] ([77.122.110.220]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0Lhkwb-1cdNsn1tK5-00mqq8; Fri, 28 Oct 2016 19:55:36 +0200
To: Costin Manolache <costin@gmail.com>
References: <CAH9hSJZdBJ02+Z6o=aanZ=5PN=9VwyL1ZcX2jct-6f_FFivLGA@mail.gmail.com> <0f79ddf6-c455-c41a-f269-a1bdcef05b14@ninenines.eu> <CAH9hSJb2R9gv2vNqoyTjbMV4hZTYdpX2PoAoYgWUT1UuigLHRA@mail.gmail.com> <5541be74-afcc-6aef-404e-63acb2f608eb@ninenines.eu> <CAH9hSJarsNFqX1tAL7BZmZQwUrEQs1X3wtrAPuMyz8s-k_7WRg@mail.gmail.com> <43998e7b-9227-7562-b2c6-c08134065e22@ninenines.eu> <CAD3-0rPRPzVvYb6_Z4wDZp73L5Kyb7LmE0P5j4A-2VSRwT7FMw@mail.gmail.com> <CAH9hSJb=mWdHP8xcBis8-jhWgQTfN-cgQXVV3eCyT4U8JYQHZA@mail.gmail.com> <CAP8-FqnLaRvyQgXXkoNQPKcyMhv-O3RN67CMw5L_-1iQ9c6mhw@mail.gmail.com> <CAH9hSJYpsPW4S9n2LaaLTYYKB7wR3Sod2=fny2CZoUR7A0bSJA@mail.gmail.com> <CAP8-FqkOX1Sq6_=Sgb++QRiDWKEiOxAJ13kzMSr9heu-Ek3QmA@mail.gmail.com>
Cc: Takeshi Yoshino <tyoshino@google.com>, Wenbo Zhu <wenboz@google.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
From: =?UTF-8?Q?Lo=c3=afc_Hoguin?= <essen@ninenines.eu>
Organization: Nine Nines
Message-ID: <508f7085-b6b9-572e-7b0f-26cafc94dd44@ninenines.eu>
Date: Fri, 28 Oct 2016 20:55:34 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <CAP8-FqkOX1Sq6_=Sgb++QRiDWKEiOxAJ13kzMSr9heu-Ek3QmA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:aaPm9cEgmUhdyW1CwhV5E4YyrEaLIonJMbmOdmaqxopUCiYLw14 PYMO0/Z6YLQJIVoCrl3p6BvEowzIQhekvqu8gCQKonADh0AWB9dcCh/KO1314ekEPLrFtyk mhNvecSArzvkEEA57hzSiaKPoMYj1QI+oc5jegFfBT4JgnKsmQphoDgLpYbcg6DescE3WtQ hLcysh5eH5/YBmMw3dERQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:34Jfx+JhDCY=:/piSTecW1G6NjxS6+/aOc/ idVbvBGJ5lyKtFVXCb3+kYHH90wUMmbvnbXkYOakXKLAmVxk8LLEcIBR1ny3vzBTbAC7iKaLY 4Iv83gs5UTV14Tgz/E/ODJ+b/aEoAq5AHN2B32woR6F+PGviLGPI2ldnkq6LA/5B2GZqyx4+k VrkVZpVhnbD+FBy71l03gb7tiMtLvK3zaHabqQscU3fksDc7+NDCH3yDn7nB0AMoJL5Jc/xVO GVtlxm7MqZc4qS6t6fXgPkF4LsHTSH+95LvOs7d6sClBf6RkIDbjqUVD7jFttnhqQLbRR389e QaNJ7ernb3UDG2uZH+6h8Z74auT0afuYVb1eDc4SkGr7dR9Q0wQk9eRfyBK8UQeH7/Vn4t0gD b+1A7jH9eS/SPE7yf7k3oLfN+iSZmb+C/2lZPGI0JZ4th4AEqWsn9Awhu3mgbH6kOvzRCwHyh CxWMn9Uqp2wGaXUcdQzrX0BjicRx1ObDkTtQN/45sHu8+q1v5khAfvtEVvHxfkWnIeSToQ9JW 52IJIDS5WnuYZII0Q50bgZdBbJ8EonAAOyUEEx1vEJ511ums0I2ZWmWyE1hq6IjVcUZ9xg/MQ 4QcFFaTKhvZhuOC1A62ucZQiy3/3l4/dv9n0yjTYNGUzhEnCetbsXplc79VTv46MubVwSfFm+ lUUyvjTNs4UALsruq2CjOqp3N6BLdVel918V3ixywMKstnlx2w3Hv0BMvlAxGG2L85SYY6o72 PuF4YxxbvStZ4q8w
Received-SPF: none client-ip=212.227.17.13; envelope-from=essen@ninenines.eu; helo=mout.kundenserver.de
X-W3C-Hub-Spam-Status: No, score=-5.2
X-W3C-Hub-Spam-Report: AWL=-1.750, BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1c0BNt-0007de-DQ 9f6750facf3018bea1aef06ad0d8ace7
X-Original-To: ietf-http-wg@w3.org
Subject: Re: WiSH: A General Purpose Message Framing over Byte-Stream Oriented Wire Protocols (HTTP)
Archived-At: <http://www.w3.org/mid/508f7085-b6b9-572e-7b0f-26cafc94dd44@ninenines.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32712
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 10/28/2016 08:41 PM, Costin Manolache wrote:
> Current overhead is 2 bytes if frame is up to 125 bytes long - which I
> think it's not very common,
> 4 bytes for up to 64k, and 10 bytes for anything larger.
> IMHO adding one byte - i.e. making it fixed 5-byte, with first as is,
> and next 4 fixed length would
> be easiest to parse.

Is making it easy (or easier) to parse even a concern anymore?

Considering the number of agents and servers already supporting 
Websocket, the numerous libraries for nearly all languages and the great 
autobahntestsuite project validating it all, reusing the existing code 
is a very sensible solution.

> There are obviously too many options to encode and each has benefits -
> my only concern was
> that the choice of 1, 2, 8 bytes for length may not match common sizes.
>
> ( in webpush frames will be <4k ).

-- 
Loïc Hoguin
https://ninenines.eu