Re: [hybi] permessage-priority extension draft

Adam Rice <ricea@google.com> Thu, 23 January 2014 08:32 UTC

Return-Path: <ricea@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C19591A0236 for <hybi@ietfa.amsl.com>; Thu, 23 Jan 2014 00:32:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.913
X-Spam-Level:
X-Spam-Status: No, score=-1.913 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.535, SPF_PASS=-0.001] autolearn=ham
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 DTCvMPzllgyv for <hybi@ietfa.amsl.com>; Thu, 23 Jan 2014 00:32:33 -0800 (PST)
Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) by ietfa.amsl.com (Postfix) with ESMTP id 9B4B91A0230 for <hybi@ietf.org>; Thu, 23 Jan 2014 00:32:33 -0800 (PST)
Received: by mail-oa0-f44.google.com with SMTP id g12so1800917oah.3 for <hybi@ietf.org>; Thu, 23 Jan 2014 00:32:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AOYOlhVFCm2ekWpau5sThd5T+Xz5qpJp7lDj+SJPwaI=; b=WM7oQKFdc75uZo7P6iEw/u0wwAZoK6qe7F/OsYMFTiXzv+Boysva0JvErBSQ8Z93tj DYw3qHJQHW1YRo5Otrruyhtl7P8PTpH+WxgO7eUz/B5jwurccqDn08RkCz+D8qakXkPY yb3rBN0oshqt3gw88vPQtx7j615ou27Mb1lRp7enMRGips37sf8WlAzTDm1YeujQS7uf K8PZyJ8/W5BKMPZZHU+XogSN/sRFfULu0uLrFe0vfIZyBysMx7cv67ZWqglxjxAeUOvX mBmP7l0tcYKz8SBiLXzO2MqialqMNURx1UzeDxvrcXOmwBIArVAaooiyuH46CZZ45P1/ QOVA==
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:date :message-id:subject:from:to:cc:content-type; bh=AOYOlhVFCm2ekWpau5sThd5T+Xz5qpJp7lDj+SJPwaI=; b=cuHd7EkQcxh1FUA80EA7AjI1vd32pSd12PcfDhxoXz1mVRQIGiTRUDh1MzKf0uIIVb 3C0e+GKph9mhwUhWMRVkTRwGz/gUDw4jm+neaE7910Hb2mMgKIXZh0dekjCZ1h/66Ulh wfB63sPWJPGWgF3wntV6+elxEVMcdMUjm9S7gTOc+GPJBJBzJsGQ482ht+S4hsR9+SAf +UO3bxXBnwTJxPwClQdg6au5y5nLHMz2j0p8gn8NN7xUCc9+b1oTYLWYUXQk61iUYfe4 nM4W14f9jcVABRjhZ4pmfzGpxq1xQhIZSGB3swk8DTbOXyFnnt40xYhZ45cVoLKWnqR1 GMLA==
X-Gm-Message-State: ALoCoQnqfRRHT8C6EZkoq6+RnXG+LKHduHqZ/rApLQeVXipzWWo9ET7g3U5rliFJCutweve9FJ4C3lP8UvkTmQcZuCNQKuoM/QCQz+VX6ZlwjFwe4LlLOPcpUok2pMiF2Qg5iBtIacxXxhoBvkzdzQD0xle7DXLQ2XtvCW7U5iBulyRPQkx2tkRwlkI7FEyBuZkgHBaTrc35
MIME-Version: 1.0
X-Received: by 10.182.40.201 with SMTP id z9mr5547937obk.45.1390465952568; Thu, 23 Jan 2014 00:32:32 -0800 (PST)
Received: by 10.182.118.41 with HTTP; Thu, 23 Jan 2014 00:32:32 -0800 (PST)
In-Reply-To: <634914A010D0B943A035D226786325D4446BF9987B@EXVMBX020-12.exch020.serverdata.net>
References: <634914A010D0B943A035D226786325D4446BF991A9@EXVMBX020-12.exch020.serverdata.net> <634914A010D0B943A035D226786325D4446BF9987B@EXVMBX020-12.exch020.serverdata.net>
Date: Thu, 23 Jan 2014 17:32:32 +0900
Message-ID: <CAHixhFr6wPQQRFrV72eXp9cUA=m1Qvxd2ZhYpqPXFa9pRhnZcQ@mail.gmail.com>
From: Adam Rice <ricea@google.com>
To: Tobias Oberstein <tobias.oberstein@tavendo.de>
Content-Type: multipart/alternative; boundary="001a11c33b022cf00204f09f158e"
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] permessage-priority extension draft
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Thu, 23 Jan 2014 08:32:36 -0000

This part contains a contradiction:

Intermediaries unaware of the permessage-priority extension

      1. MUST NOT change the message fragmentation (further fragment or
      coalesce non-control frames)

      2. MUST preserve strict frame order while processing and
      forwarding non-control frames

      3. MUST ignore WebSocket base protocol rules as they apply to
      continuation frames and the FIN bit

   or

      1. MUST remove the "permessage-priority" element from the client's
      "Sec-WebSocket-Extensions" header in the opening handshake


If the intermediary is unaware of the extension, then there is no way for
it to follow the rules in extension specification.

I think we can extrapolate a more general "all or nothing" rule from this.
A WebSocket intermediary must either treat all data as opaque and pass it
through unchanged, or completely implement the specification and all
extensions in use.

It follows that a WebSocket intermediary that understands the protocol must
strip any unrecognised extensions from the client handshake.

Thinking about compatibility with permessage-deflate, I came to the
conclusion that RFC6455 is too optimistic about extension compatibility.
The default expectation should be that extensions are incompatible, and the
WebSocket Extension Name Registery should have a list of "Known Compatible
Extensions" rather than "Known Incompatible Extensions".

As an implementer, my personal preference would be to not implement
permessage-priority. It requires changes in almost every layer of the
stack, adding complexity and overhead. I see my job as to get bytes from
the Javascript send() call into the kernel send buffer as efficiently as
reasonably possible; ideally I would like to avoid any additional queuing
altogether, never mind re-ordering of queued messages.

Thanks,
Adam Rice


On 18 January 2014 08:10, Tobias Oberstein <tobias.oberstein@tavendo.de>wrote:

> There is a collection of open issues here:
> https://github.com/oberstet/permessage-priority/issues
>
> One of those is how to make permessage-priority compatible with
> permessage-deflate.
>
> I guess it can be done by maintaining a separate compression context per
> priority class.
> This allows intermediaries to prioritize and reorder frames without
> problems. However,
> it multiplies memory requirements.
>
> Was there any discussion/plan about how permessage-deflate would have
> worked with MUX
> when compression was applied to the physical WebSocket connection?
>
> I mean, when compression was applied to the logical MUXed WS connections,
> there
> would have been a separate compression context for each (logical) WS
> connection also,
> and intermediaries can reMUX without recompressing.
>
> But when applied to the physical WS?
>
> /Tobias
>
> > -----Ursprüngliche Nachricht-----
> > Von: hybi [mailto:hybi-bounces@ietf.org] Im Auftrag von Tobias Oberstein
> > Gesendet: Donnerstag, 16. Januar 2014 17:39
> > An: hybi@ietf.org
> > Betreff: [hybi] permessage-priority extension draft
> >
> > Alright, I have written up a draft for a "permessage-priority" WebSocket
> > extension:
> >
> >
> https://github.com/oberstet/permessage-priority/blob/master/draft-oberstein-
> > hybi-permessage-priority.txt
> >
> > In writing this, I came to the conclusion that "message prioritization"
> on a
> > single WebSocket connection in fact is orthogonal to multiplexing
> multiple
> > (logical) WebSocket connections over a single physical one (be it via
> WS-MUX
> > or a variant of WS/SPDY).
> >
> > So this proposal should not be seen as a competitive proposal to WS-MUX
> or
> > WS/SPDY, but as ... something different;)
> >
> > The motivation and use case is outlined in the introduction.
> >
> > I'd appreciate any feedback, suggestions, corrections or even PRs (the
> draft is
> > on GitHub in a dedicated repo).
> >
> > If the draft doesn't conform to RFC requirements or formatting rules,
> please
> > forgive - this is my first RFC.
> >
> > Cheers,
> > /Tobias
> >
> > PS: For one thing I don't know, how do I submit this draft with the IETF
> so it can
> > follow the proper way?
> >
> > _______________________________________________
> > hybi mailing list
> > hybi@ietf.org
> > https://www.ietf.org/mailman/listinfo/hybi
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>