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

Van Catha <vans554@gmail.com> Thu, 20 October 2016 18:55 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 C5B8D1295B0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Oct 2016 11:55:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.931
X-Spam-Level:
X-Spam-Status: No, score=-6.931 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.431, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 0ne3ddVoDAjm for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Oct 2016 11:55:44 -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 C80441295D2 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 20 Oct 2016 11:55:44 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bxIQo-0007DF-Rx for ietf-http-wg-dist@listhub.w3.org; Thu, 20 Oct 2016 18:51:10 +0000
Resent-Date: Thu, 20 Oct 2016 18:51:10 +0000
Resent-Message-Id: <E1bxIQo-0007DF-Rx@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <vans554@gmail.com>) id 1bxIQj-0007CU-Bp for ietf-http-wg@listhub.w3.org; Thu, 20 Oct 2016 18:51:05 +0000
Received: from mail-qt0-f179.google.com ([209.85.216.179]) by lisa.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <vans554@gmail.com>) id 1bxIQc-0007Qa-T7 for ietf-http-wg@w3.org; Thu, 20 Oct 2016 18:51:04 +0000
Received: by mail-qt0-f179.google.com with SMTP id q7so67061016qtq.1 for <ietf-http-wg@w3.org>; Thu, 20 Oct 2016 11:50:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pB/nvLj7+So2YdSPksZf3ZGxGAObo47ELXDHNFnAKgI=; b=DwOOyD4/4mYjvMqgkAtNsgOC1BDkVnVV0b4ySseQpb6VV4KpsK9NxWAGLLRSP8BuUD 1hXDAWM8VyOwPrgEwE7Q2rK2P9hm79pc1tE306DcCpiAvR4toguTx5YKKy/TIICRdSS/ i3Vn2Ia3hHm3rXB0trpG7r8CpdPXOFhibg8spHKhqJerBVjs1qXkLVZAO8LSGsR+OnbD ZnqsFDd9xSZ5FcIayAE26+JI9a3R2SNyBQ5OCQDVFOk31NQ5AGlXKlZXYMScRGpM8oOd YXl131PsxtyMipopsOg5hmDCvT9gRz4SW9uAnQ3p6rLuskYRnAu0Y/YrlvKUXvv1ZT52 k6lQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pB/nvLj7+So2YdSPksZf3ZGxGAObo47ELXDHNFnAKgI=; b=eoHU/DkDoBl7uLtm/7KNRLiKKkkUxJ7wuih+5Xkr6fnny6x1bDFvzzQcuULaY81dCv IJ6P9qhLuLa6R2BU+1gnNultAJvpysxuWR/bHCZhHe+PeHGMUjwJlO1lsATvnPTGCv3m Rd+r4/wH8hEslhD+ToVhdmPKln32DQaZiUSU76t6ywI6QpP1kkw2U3Oi7IGls1WKKuiQ oR8Gf0dV0NAq3Nyfs0xBqcI/r2Ik+K2PxtDNF37j/mANHqf2bGpISykRLTxxRYjGWF1q WsxiZdLHRNZ2Jc10h0OekvmIb32j0gXaaVdswPiMmmb32AWpaP4TofiW6E2lNPFVForu /OyA==
X-Gm-Message-State: ABUngvfPwlB6DCMmsi1F/yjH2kIEGVVXXag1zJqpxAPfEixk0QRqAw+20UJiqx5fqMTVS+fYGgXLbgYOPFFDLg==
X-Received: by 10.200.37.204 with SMTP id f12mr1854905qtf.123.1476989432651; Thu, 20 Oct 2016 11:50:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.55.209.66 with HTTP; Thu, 20 Oct 2016 11:50:32 -0700 (PDT)
In-Reply-To: <0f79ddf6-c455-c41a-f269-a1bdcef05b14@ninenines.eu>
References: <CAH9hSJZdBJ02+Z6o=aanZ=5PN=9VwyL1ZcX2jct-6f_FFivLGA@mail.gmail.com> <0f79ddf6-c455-c41a-f269-a1bdcef05b14@ninenines.eu>
From: Van Catha <vans554@gmail.com>
Date: Thu, 20 Oct 2016 14:50:32 -0400
Message-ID: <CAG-EYCjfvtSFNeVV9ufHBKit+GnHBnJiU+Nqhv=SDwqcoRgVFA@mail.gmail.com>
To: Loïc Hoguin <essen@ninenines.eu>
Cc: Takeshi Yoshino <tyoshino@google.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Wenbo Zhu <wenboz@google.com>
Content-Type: multipart/alternative; boundary="001a113bff3e786314053f50660b"
Received-SPF: pass client-ip=209.85.216.179; envelope-from=vans554@gmail.com; helo=mail-qt0-f179.google.com
X-W3C-Hub-Spam-Status: No, score=-5.1
X-W3C-Hub-Spam-Report: AWL=-1.138, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1bxIQc-0007Qa-T7 70912ab5d93541e94c2ba024a974dec1
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/CAG-EYCjfvtSFNeVV9ufHBKit+GnHBnJiU+Nqhv=SDwqcoRgVFA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32657
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>

This is great and should be backward compatible quite easily!

On Thu, Oct 20, 2016 at 6:11 AM, Loïc Hoguin <essen@ninenines.eu> wrote:

> On 10/20/2016 09:22 AM, Takeshi Yoshino wrote:
>
>> Hi HTTP WG,
>>
>
> Hello,
>
> Comments are appreciated.
>>
>
> Great work. I have two general comments and three typos:
>
>
> You write:
>
>    The Content-Type header value of the underlying HTTP request/response
>    message MUST be "application/webstream".
>
> With the current draft this media type is not enough to indicate what the
> frames will actually contain. Websocket has sec-websocket-protocol for that
> purpose. SSE allows defining event types for each events. WiSH currently
> only has payload frames with no meaning beyond text or binary.
>
> Maybe have the media type define an optional parameter "protocol", for
> example? Then clients can use content negotiation to request protocols they
> accept. For example:
>
> Client sends:
>
>   Accept: application/webstream;protocol=v12.stomp;q=1,
>           application/webstream;protocol=mqtt;q=0.5,
>           text/event-stream;q=0.1, */*
>
> Server picks the appropriate type and replies:
>
>   Content-type: application/webstream;protocol=v12.stomp
>
> Using content negotiation doesn't require extra logic which is a big plus.
> And we can still use the existing Websocket subprotocol registry, which
> will be required if Websocket compatibility is a concern.
>
>
> You write:
>
>    The message type distinction by the opcode field (text and binary) is
>    kept to allow better Web support.  One of the possible use cases is
>    to use the text type for exchaning meta data encoded in JSON, etc.,
>    and the binary type for exchanging non-meta data messages.
>
> In practice when using JSON and where performance is a concern, I have
> seen users use binary for everything. The problem being that Websocket text
> frames must be valid UTF-8; but so does JSON. The server not providing
> functionality to disable the Websocket UTF-8 check (and JSON decoders not
> able to), users just dropped text frames entirely.
>
> Which brings me to my question: do you think it could be worth adding a
> note to implementers that perhaps they should consider optionally disabling
> the UTF-8 check when JSON is expected for text frames?
>
>
> Typos:
>
> * Page 3: there are two "furthur" that probably should be "further".
> * Page 5: there is "exchaning" instead of "exchanging".
>
>
> Cheers,
>
> --
> Loïc Hoguin
> https://ninenines.eu
>
>