Re: 6455 Websockets and the relationship to HTTP
Van Catha <vans554@gmail.com> Mon, 05 December 2016 03:26 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 A3AE91296C0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 4 Dec 2016 19:26:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.896
X-Spam-Level:
X-Spam-Status: No, score=-9.896 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, RP_MATCHES_RCVD=-2.896, 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 cLZx_v7XezcO for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 4 Dec 2016 19:26:39 -0800 (PST)
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 264491296C5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 4 Dec 2016 19:26:39 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cDjtH-0004qT-4c for ietf-http-wg-dist@listhub.w3.org; Mon, 05 Dec 2016 03:24:31 +0000
Resent-Date: Mon, 05 Dec 2016 03:24:31 +0000
Resent-Message-Id: <E1cDjtH-0004qT-4c@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 <vans554@gmail.com>) id 1cDjt8-0004pR-FO for ietf-http-wg@listhub.w3.org; Mon, 05 Dec 2016 03:24:22 +0000
Received: from mail-qk0-f175.google.com ([209.85.220.175]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <vans554@gmail.com>) id 1cDjsy-00087f-MU for ietf-http-wg@w3.org; Mon, 05 Dec 2016 03:24:17 +0000
Received: by mail-qk0-f175.google.com with SMTP id n204so334007271qke.2 for <ietf-http-wg@w3.org>; Sun, 04 Dec 2016 19:23:51 -0800 (PST)
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=0ybPHYjfIqP7LypI1FL9fymrOeWj8jnVXewpTROIevs=; b=SMIoUpDGbcLh2nVF0gUiqoBO073Nw0cJlq3fBpXJAcN7rGlJUFRXhQxqKI/BWr+IKN fOALswuG+vj1bTSKtd/hIDi/SeEi2FOBeIrKIQjuAereIfqix/c7z7jjYVrnsBhqOVlh YwKaOIDC6nuJAaGKj4MKvR95tekOqegeOsw3ryTtjHQJVLZ/kmIQCaKsox7gDlK6kIxm fBufOs7MYMqubM2gbWbmH11kcJHKNeHGEGKIRfmcK2qfNC3GX3jCm0C8y87G09GjlESS q9mg3SyE274TQSSeJtlGEyeE4t7G6/Nb1DvWkWOy4+c3WNkfSHZ70j3GD6NpIOKCH1GA UeZg==
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=0ybPHYjfIqP7LypI1FL9fymrOeWj8jnVXewpTROIevs=; b=HoVnAwMriS/78U2E1Bh9edw8KMPZVsm2vEDKJ/6N7fG7rcQAsOC9zs7XWMTBdb7biG 6b9y0ZOOS4iBFQinOuaw8Y6HMYArxJUrugjKyRTCXE4yCVYpokTB4RVTgoH8FjCrgVXF vKTWsP7aZGEFK7eX5XqT3yIbUEgKlOO/bUneCRsvUsCfaCxgIYjPaPE2vJdq0wL1tUZA 1i0qcrRBDRcQmC3+bJdsBnvS6pBADnMpAmvfjLMjzqW5XExUzS/RtMB+0WQ8vwQgNVW/ 90cBT+dZ6VqB5qCcwLSRyJUS+5k/zHCXfZ9QPKHhX2PaVzwZwGk9f99DjHTcDSlWLhY6 jMHQ==
X-Gm-Message-State: AKaTC03Y/Bm/ymBHIoAPzWx8UWrrhrNWvfiuQFC9hVERo7hKZreNExWVzskDyvaifX0uPYRLFpbE3wCWCsAhUg==
X-Received: by 10.55.200.27 with SMTP id c27mr45851827qkj.276.1480908221221; Sun, 04 Dec 2016 19:23:41 -0800 (PST)
MIME-Version: 1.0
Received: by 10.55.209.8 with HTTP; Sun, 4 Dec 2016 19:23:40 -0800 (PST)
In-Reply-To: <1480906979.4219.31.camel@warmcat.com>
References: <CAOdDvNqk7W_oNWUismMb-ZuhvdboZNDQ0YV2BLsbka-FGC-7oA@mail.gmail.com> <39F32B28-7116-478A-B02A-E8310EA6E189@mnot.net> <CABkgnnVZeLQGES5Dige8u+ukSgqSfJNKiCuL=oK3gQnAb_3LNw@mail.gmail.com> <CANatvzwoUYaC_YPTTF6fdwN5aOiwrttyH9Xj7xYVR1i1DZ27bA@mail.gmail.com> <037D2D57-7423-4375-9FEC-50B3106F42ED@mnot.net> <CANatvzx=mOQ3kE-vnvwNvD2w26+RNTueHgu7BhHLnJixn0vRcw@mail.gmail.com> <9e6f1a46-a782-a688-5b16-836d28032823@treenet.co.nz> <1480646012.4219.21.camel@warmcat.com> <CAOdDvNqShPUdu6zt-dPDpXm31eP2xX_dahrTr8JEbOOGQFFNSw@mail.gmail.com> <220b575c-a953-a8fe-1591-00d1e676b201@gmail.com> <CAOdDvNpdxHWj97S=A+Xtf5k3aWfSWg6AStxji4PKemw=xnH_XQ@mail.gmail.com> <7d0180d5-b3fa-dc7f-e211-a6b9ae0d826c@gmail.com> <A5761229-B012-496C-8AFD-C9FBC85DB4FC@warmcat.com> <af3a3783-4cf6-6e30-4d3c-c7e856894f9f@gmail.com> <568365B5-5F46-4F8B-AAC6-E687116B8DD0@warmcat.com> <f1823fb8-5719-6ac6-d1d5-76ba4265d851@gmail.com> <CAG-EYChDjkEhNrT+GFXsHE_2Df5-NKzyhpJmRivFpReheHR4nw@mail.gmail.com> <1480906979.4219.31.camel@warmcat.com>
From: Van Catha <vans554@gmail.com>
Date: Sun, 04 Dec 2016 22:23:40 -0500
Message-ID: <CAG-EYCjhoXthjt7HsaV0MprZigJtzUOK=o7ybPwvj+uXwmBO1Q@mail.gmail.com>
To: Andy Green <andy@warmcat.com>
Cc: Jacob Champion <champion.p@gmail.com>, Patrick McManus <mcmanus@ducksong.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a11c1582c7891730542e0d0c0"
Received-SPF: pass client-ip=209.85.220.175; envelope-from=vans554@gmail.com; helo=mail-qk0-f175.google.com
X-W3C-Hub-Spam-Status: No, score=-5.3
X-W3C-Hub-Spam-Report: AWL=-0.889, 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_MSPIKE_H2=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1cDjsy-00087f-MU 3d48fd0c9b2ed483e1735caad6501167
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 6455 Websockets and the relationship to HTTP
Archived-At: <http://www.w3.org/mid/CAG-EYCjhoXthjt7HsaV0MprZigJtzUOK=o7ybPwvj+uXwmBO1Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33107
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>
> The meaning of ws1 PING is different than the h2 link PING, which is > defined to not be able to have a specific stream context but only > connectionwide. For ws1 it means the websockets server (which may be a > different process or on a different machine than the h2 endpoint) still > acknowledges the ws1 connection as alive and communication in both ways > on the stream is working. For h2 it means the h2 server is still > connected at the stream bundle level. They're not actually giving you > the same assurance. That is the responsibility of the h2 endpoint (if h2 is proxing/forwarding the request to another server). I do not see why this should be the responsibility of ws. I see your point, but I see it as out of scope. On Sun, Dec 4, 2016 at 10:02 PM, Andy Green <andy@warmcat.com> wrote: > On Sun, 2016-12-04 at 19:59 -0500, Van Catha wrote: > > > I do not see the need for Ping, Pong or Close ws frames. The h2/quic > > transport layer handles this. If you want to measure latency then > > send your own pings/pongs, do not bake it into the protocol. There > > is no need for this, and if there is, please present a compelling > > reason. > > He's making a slightly different point... there are some corner cases > about ws1 RFC6455 protocol that are not grounded in the JS API, > although almost everything else is. > > 1) ws1 PING / PONG for example aren't exposed in the JS API at all. > > But they are in wide use by non-browser clients, who at intervals want > to confirm their connection to the ws server is still live if it's > idle. > > The meaning of ws1 PING is different than the h2 link PING, which is > defined to not be able to have a specific stream context but only > connectionwide. For ws1 it means the websockets server (which may be a > different process or on a different machine than the h2 endpoint) still > acknowledges the ws1 connection as alive and communication in both ways > on the stream is working. For h2 it means the h2 server is still > connected at the stream bundle level. They're not actually giving you > the same assurance. > > 2) Jacob points out there is implicit serialization in ws1, a fragment > is atomic, blocking PING, PONG and CLOSE until it is all sent. Again > it's not explicit in the JS API. But again he's suggesting that > behaviour should be maintained in a ws2. > > These are at least reasonable-to-argue points. > > > The clientside API should not change, but it should definitely be > > extended OR more functionality should be added to browsers, like the > > ability to compress data from inside JS land. > > I dunno. I implemented permessage-deflate nicely, with good control > over its memory and streaming fixed-size buffers in and out, it can > pass Autobahn, but personally I have never had (or even seen) a good > use for it. I know some people love it... better to discuss with them > rather than me... > > -Andy > > > > > > > On Fri, Dec 2, 2016 at 4:41 PM, Jacob Champion <champion.p@gmail.com> > > wrote: > > > On 12/02/2016 12:58 PM, Andy Green wrote: > > > > On December 3, 2016 4:18:06 AM GMT+08:00, Jacob Champion <champio > > > > n.p@gmail.com> wrote: > > > > > My point is just that this ability to multiplex control frames > > > > > inside > > > > > of > > > > > in-flight messages is not something that is explicitly exposed > > > > > by the > > > > > JS > > > > > API, but it may be something that a (non-browser) client > > > > > requires for > > > > > proper operation. I think WS/2 should still support it, > > > > > regardless of > > > > > whether or not a JS client can make use of it. > > > > > > > > > > > > > OK. Although the only relevant control frames are PING / PONG. > > > > > > > > > > CLOSE too, plus any control frames added to the protocol between > > > now and the release of WS/2. > > > > > > > And if a client wants to send control frames inside a huge > > > > message, that client must have explicitly fragmented the message > > > > already. > > > > > > > > The general idea is just map ws2 payload frames direct to h2 > > > > framing... refragmenting them to fit. In that way, 'supporting' > > > > ws1 63-bit frame lengths compatibly doesn't require 63-bit frame > > > > lengths in ws2 because ws always allows refragmentation of > > > > frames. > > > > > > > > > > Agreed. > > > > > > > So it only creates more fragmentation / opportunities to insert > > > > control frames, so no problem. > > > > > > > > > Let me step back: when you say that your goal is to "provide a > > > > > transport > > > > > for JS WS API on h2", my fear is that this could lead to a > > > > > situation > > > > > where semantics that are part of WS/1 are removed from WS/2 for > > > > > no > > > > > reason other than "Javascript clients don't need it, so no one > > > > > else > > > > > does > > > > > either." I would like to avoid that. > > > > > > > > > > > > > What I meant by that is ws1 wire protocol can go out the window > > > > completely. The job is not wrap ws1 verbatim in h2 frames, keep > > > > ws1 negotiation headers, masking, etc. It can be radically > > > > recast to align with h2 while following the JS API, and fully > > > > exploit new possibilities like roundtrip elimination. > > > > > > > > I agree it should make some effort to not break non JS / browser > > > > uses. But it's no coincidence there are only a tiny number of > > > > corner cases about that -- ws1 was itself designed to implement a > > > > transport for the ws JS API. > > > > > > > > > > It sounds like we're on the same page, as long as the eventual > > > solution's authors understand those corner cases, and that the > > > functionality provided by WebSocket is (to a minor extent) a > > > superset of what's provided by the JS API. In particular, I agree > > > that we don't necessarily need to be bound by the current wire > > > format, or the same HTTP-buster security features, as WS/1. > > > > > > --Jacob > > > > > > > > > > >
- 6455 Websockets and the relationship to HTTP Patrick McManus
- Re: 6455 Websockets and the relationship to HTTP Mark Nottingham
- Re: 6455 Websockets and the relationship to HTTP Martin Thomson
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Kazuho Oku
- Re: 6455 Websockets and the relationship to HTTP Kazuho Oku
- Re: 6455 Websockets and the relationship to HTTP Mark Nottingham
- Re: 6455 Websockets and the relationship to HTTP Kazuho Oku
- Re: 6455 Websockets and the relationship to HTTP Patrick McManus
- Re: 6455 Websockets and the relationship to HTTP Amos Jeffries
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Patrick McManus
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Willy Tarreau
- Re: 6455 Websockets and the relationship to HTTP Loïc Hoguin
- Re: 6455 Websockets and the relationship to HTTP Cory Benfield
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Patrick McManus
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Van Catha
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Van Catha
- Re: 6455 Websockets and the relationship to HTTP Andy Green
- Re: 6455 Websockets and the relationship to HTTP Van Catha
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Van Catha
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Martin J. Dürst
- Re: 6455 Websockets and the relationship to HTTP Patrick McManus
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion
- Re: 6455 Websockets and the relationship to HTTP Wenbo Zhu
- Re: 6455 Websockets and the relationship to HTTP Mark Nottingham
- Re: 6455 Websockets and the relationship to HTTP Loïc Hoguin
- Re: 6455 Websockets and the relationship to HTTP Jacob Champion