Re: Design: Adding ASSOCIATED_ONLY

Jeff Pinner <jpinner@twitter.com> Wed, 19 June 2013 19:57 UTC

Return-Path: <ietf-http-wg-request@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 340B111E80C5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 19 Jun 2013 12:57:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.323
X-Spam-Level:
X-Spam-Status: No, score=-9.323 tagged_above=-999 required=5 tests=[AWL=-0.587, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8, SARE_LWSHORTT=1.24]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IzD8b9DShQG9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 19 Jun 2013 12:57:19 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 6558911E80DF for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 19 Jun 2013 12:57:19 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UpOUe-0000T4-S7 for ietf-http-wg-dist@listhub.w3.org; Wed, 19 Jun 2013 19:56:36 +0000
Resent-Date: Wed, 19 Jun 2013 19:56:36 +0000
Resent-Message-Id: <E1UpOUe-0000T4-S7@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1UpOUR-0000PY-MQ for ietf-http-wg@listhub.w3.org; Wed, 19 Jun 2013 19:56:23 +0000
Received: from mail-lb0-f172.google.com ([209.85.217.172]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1UpOUQ-0007qp-4U for ietf-http-wg@w3.org; Wed, 19 Jun 2013 19:56:23 +0000
Received: by mail-lb0-f172.google.com with SMTP id v20so5183642lbc.31 for <ietf-http-wg@w3.org>; Wed, 19 Jun 2013 12:55:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=twitter.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qkij9Au+rWtbk6YXpcnErMhZftnQR5wd8D2PDWnvurk=; b=rGU2SlGTt6c3B/VK4Mz/mVDJUs84wyyXEa8RNCmwQeu7wYhMErTJU0jZoDlKz6ILR5 q/DeV/9nPMntRO93kRUCc5MrUGDIpdFd56GnKZYv1VygbJj22J4j14+UQ1ZmpFHBW9wN vVN867Foazia1C6NxfDEGRTRbEGjWnfsTWp3Y=
X-Google-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:x-gm-message-state; bh=qkij9Au+rWtbk6YXpcnErMhZftnQR5wd8D2PDWnvurk=; b=cO/WW/cCL6MQ6oO/aPBmZQ8w2+ahqJsboeapLoPdJkRsSAMcUJNFU6hp70GBSnITDy L1W2z4cT1+7RHHC523jYggoYfVPkoUl1sbnwOHAvJjlhjsmOmsMu3SSwPTZ3jkgPD9m5 859890qXvlajeKQ0+Y5ug6fyfdrnwMmuM1KLt8Q9mISZyUbvXvF+Er7mAowuvtHyYnIn HRPYv9yTzxHvrGTW2BoT4LvLAhoSwNzU1darmnty9CtXeP36UNBUtgJkiSgu/9JpC7H6 oprvCDDOI8aAWryPQSJWreSzs+aphC4I4sPcSnAl7s6QVKMfFMCSpdma5Nft2YcBDy3Y pdww==
MIME-Version: 1.0
X-Received: by 10.112.16.74 with SMTP id e10mr3977434lbd.46.1371671755538; Wed, 19 Jun 2013 12:55:55 -0700 (PDT)
Received: by 10.114.25.36 with HTTP; Wed, 19 Jun 2013 12:55:55 -0700 (PDT)
In-Reply-To: <CABP7RbdR6XXP4oS5sK1HBkrz04NBJ7KV0wdymmfSYmWRnJVHGQ@mail.gmail.com>
References: <CABP7Rbe29dHp3LZuWEMKJdVEkuHW2jOUK0sSyBuh6PFnq=9Z1A@mail.gmail.com> <CABkgnnUKnborWAtuxwEvWx7wR=JYdOTvWHbpPd6NJ5kXK0Sw9A@mail.gmail.com> <CABaLYCuhs5zmMHD9D7qNEhhUpvzWf1THHOjS5-vTu6soMUqALA@mail.gmail.com> <CABP7RbfreVJv=RZga+Y6iHxsOhmdheyjcvZ3dTNgW3drg4j2iw@mail.gmail.com> <CA+pLO_hAH4MhFUZTnO9wXP89gLzRgikH7rR60NQOeJ2C5zVDnw@mail.gmail.com> <CAA4WUYgTw05Y+A6MEe2dyTSTZ5-6C6-Wuwx5ohVe8EsZuKxHtg@mail.gmail.com> <CABaLYCvw2eZ3Ub09VnK-J=FCCBOq0QPJ+kkxmK2neSJTTgHyWw@mail.gmail.com> <CABP7RbdR6XXP4oS5sK1HBkrz04NBJ7KV0wdymmfSYmWRnJVHGQ@mail.gmail.com>
Date: Wed, 19 Jun 2013 12:55:55 -0700
Message-ID: <CA+pLO_iLFzHG=NMQB0A65CMWgDMLmLo8ze=eu_VjkyV=e6v4dg@mail.gmail.com>
From: Jeff Pinner <jpinner@twitter.com>
To: James M Snell <jasnell@gmail.com>
Cc: Mike Belshe <mike@belshe.com>, "William Chan (陈智昌)" <willchan@chromium.org>, Martin Thomson <martin.thomson@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a11c3fdb6bcd08604df8737f4"
X-Gm-Message-State: ALoCoQki2MpGw51wRCZ1sW3c/4Wi0vCe+a2GJblpazqen/NXuqQowNt7Sl4xlwm9U6B2jbWLUr4J
Received-SPF: pass client-ip=209.85.217.172; envelope-from=jpinner@twitter.com; helo=mail-lb0-f172.google.com
X-W3C-Hub-Spam-Status: No, score=-3.6
X-W3C-Hub-Spam-Report: AWL=-2.830, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UpOUQ-0007qp-4U 5b0404ae739c6e14145511deda56c756
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Design: Adding ASSOCIATED_ONLY
Archived-At: <http://www.w3.org/mid/CA+pLO_iLFzHG=NMQB0A65CMWgDMLmLo8ze=eu_VjkyV=e6v4dg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18305
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>

Thanks for finding that in the SPDY spec! You're right, I totally missed
reading that line.

I'm happy to wait on adding the flag but I would like to drop the
requirement that a server close all associated resources.

In the SPDY spec the life-cycles of the pushed resources were much more
tightly coupled with the original stream because there was no PUSH_PROMISE
so all streams had to be created while the original stream was still open.

With PUSH_PROMISE, the opening of the new streams can occur well after the
original stream closes so this behavior no longer makes and sense.




On Wed, Jun 19, 2013 at 12:50 PM, James M Snell <jasnell@gmail.com> wrote:

> In the short term (for the implementer's draft) I'm perfectly fine
> deferring this particular item, I just wanted to make sure the issue
> was documented and available for discussion. The pull request has been
> submitted and can easily sit there for a bit while we figure the other
> items out :-) ...
>
> On Wed, Jun 19, 2013 at 12:46 PM, Mike Belshe <mike@belshe.com> wrote:
> >
> >
> >
> > On Wed, Jun 19, 2013 at 12:41 PM, William Chan (陈智昌) <
> willchan@chromium.org>
> > wrote:
> >>
> >> It's vague in the SPDY 3 spec but is definitely there, just not in the
> >> RST_STREAM section. See
> >>
> http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3#TOC-3.3.2-Client-implementation
> :
> >>
> >> "To cancel all server push streams related to a request, the client may
> >> issue a stream error (Section 2.4.2) with error code CANCEL on the
> >> associated-stream-id. By cancelling that stream, the server MUST
> immediately
> >> stop sending frames for any streams with in-association-to for the
> original
> >> stream."
> >>
> >> Patrick's right and no implementation of server push has read that
> >> section. I raised this point at least twice at the interim meeting.
> >> Roberto's counterpoint (from the meeting) is that adding a flag for this
> >> makes it explicit, so it won't be as easily forgotten.
> >
> >
> > And so it seems that even people that wrote that spec have forgotten! :-)
> >
> > But, given what we know now, I still think that sending RST_STREAM for
> each
> > stream is sufficient and simplest.
> >
> > Mike
> >
> >
> >>
> >>
> >> I'm personally lukewarm on this and would rather be explicit and send
> all
> >> the RST_STREAMs. But I don't have a strong opinion here.
> >>
> >>
> >>
> >> On Wed, Jun 19, 2013 at 11:43 AM, Jeff Pinner <jpinner@twitter.com>
> wrote:
> >>>
> >>> I'm going to put the PRIORITY discussion aside for a second and only
> >>> comment on RST_STREAMs.
> >>>
> >>> I believe Patrick is correct -- I don't think anyone who implemented
> SPDY
> >>> implemented RST_STREAM as closing all associated streams. But IIRC
> that's
> >>> because that isn't how it is specified in the SPDY/3 spec. SPDY/3
> Section
> >>> 3.3 mentions Push and RST_STREAM but only talks about issuing a RST on
> the
> >>> pushed Stream-ID.
> >>>
> >>> I think the requirement was added for HTTP/2 and isn't desirable. This
> >>> was the reason we considered adding the ASSOCIATED flag in the first
> place.
> >>> We wanted to clarify this issue and provide a mechanism while dropping
> the
> >>> new requirement.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Wed, Jun 19, 2013 at 11:26 AM, James M Snell <jasnell@gmail.com>
> >>> wrote:
> >>>>
> >>>> Not very contrived use case: Switching away from one browser tab with
> >>>> N-active push streams. Without this, we would need to send PRIORITY
> >>>> frames for each individual pushed stream, which is bad.
> >>>>
> >>>> At the interim, as part of the updated lifecycle discussions, we all
> >>>> seemed to agree that the lifecycle of push streams was independent of
> >>>> the originating stream, given that, if I close a browser tab with
> >>>> N-active push streams, I would have to send a separate RST_STREAM for
> >>>> every push stream in addition to the originating stream. This
> >>>> eliminates that need.
> >>>>
> >>>> You're right that this would be unnecessary if push was disabled, but
> >>>> we are building push into the base protocol so we have to be able to
> >>>> efficiently handle the case where push is not disabled. There's no way
> >>>> around that.
> >>>>
> >>>> While I am quite sympathetic to the "let's not add stuff we really
> >>>> don't need" point of view, ASSOCIATED_ONLY makes a lot of sense in my
> >>>> opinion, and would make it easier and more efficient to implement the
> >>>> "independent stream lifecycle" notion.
> >>>>
> >>>> On Wed, Jun 19, 2013 at 11:13 AM, Mike Belshe <mike@belshe.com>
> wrote:
> >>>> > Is there a specific use case that needs this?
> >>>> >
> >>>> > I suspect there are two camps of browsers:
> >>>> >    - those that disable push
> >>>> >    - those that don't disable push
> >>>> >
> >>>> > If you disabled push, then these aren't needed.
> >>>> >
> >>>> > If you didn't disable push, do you really need to be able to deal
> with
> >>>> > batch
> >>>> > operations on associated streams?  (I know we can contrive a
> use-case
> >>>> > on the
> >>>> > fly right now - that is always possible.  But if we don't *really*
> >>>> > need it,
> >>>> > its just more stuff in the protocol I'd rather omit until we really
> >>>> > know
> >>>> > that it is needed.)
> >>>> >
> >>>> > Thanks,
> >>>> > Mike
> >>>> >
> >>>> >
> >>>> >
> >>>> > On Wed, Jun 19, 2013 at 11:07 AM, Martin Thomson
> >>>> > <martin.thomson@gmail.com>
> >>>> > wrote:
> >>>> >>
> >>>> >> On 19 June 2013 10:56, James M Snell <jasnell@gmail.com> wrote:
> >>>> >> > https://github.com/http2/http2-spec/pull/144
> >>>> >> >
> >>>> >> > This was a technical change brought up and discussed as part of
> the
> >>>> >> > "layering taskforce" breakout but was never discussed in the
> larger
> >>>> >> > interim discussions.
> >>>> >> >
> >>>> >> > Essentially, this PR would add an "ASSOCIATED_ONLY" flag to
> >>>> >> > PRIORITY
> >>>> >> > and RST_STREAM frames that would allow terminating and
> >>>> >> > reprioritizing
> >>>> >> > promised streams as a group.
> >>>> >> >
> >>>> >> > Sending PRIORITY(ASSOCIATED_ONLY) would ONLY set the priority for
> >>>> >> > associated streams, not the referenced stream.
> >>>> >> >
> >>>> >> > Sending RST_STREAM(ASSOCIATED_ONLY) would terminate ONLY the
> >>>> >> > associated streams, not the referenced stream.
> >>>> >> >
> >>>> >> > Without this, we would have to send PRIORITY and RST_STREAM for
> >>>> >> > each
> >>>> >> > individual associated stream, which is obviously quite
> inefficient.
> >>>> >>
> >>>> >> What James omits is:
> >>>> >>
> >>>> >> RST_STREAM is currently specified to terminate all associated
> streams
> >>>> >> in addition to the parent stream.  This would remove this coupling,
> >>>> >> which is considered by some to be problematic.
> >>>> >>
> >>>> >> It's not possible to reprioritise associated streams as a group.
>  We
> >>>> >> did agree that associated streams would inherit a priority that is
> >>>> >> lower (by one) than the parent stream.  As it stands, changing all
> of
> >>>> >> them requires first discovering the stream ID that will be used,
> then
> >>>> >> sending individual PRIORITY frames for each.
> >>>> >>
> >>>> >> There's not a lot of experience with this area of the
> specification.
> >>>> >>
> >>>> >
> >>>>
> >>>
> >>
> >
>