Re: Questions on Server Push

Shigeki Ohtsu <ohtsu@iij.ad.jp> Tue, 04 June 2013 01:32 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 2665521F99B1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 3 Jun 2013 18:32:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.199
X-Spam-Level:
X-Spam-Status: No, score=-10.199 tagged_above=-999 required=5 tests=[AWL=-0.200, BAYES_00=-2.599, J_CHICKENPOX_48=0.6, RCVD_IN_DNSWL_HI=-8]
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 S9FL2JwXMAF5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 3 Jun 2013 18:31:57 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id C646121F8607 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 3 Jun 2013 17:05:24 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UjeiP-0004VL-CS for ietf-http-wg-dist@listhub.w3.org; Tue, 04 Jun 2013 00:03:05 +0000
Resent-Date: Tue, 04 Jun 2013 00:03:05 +0000
Resent-Message-Id: <E1UjeiP-0004VL-CS@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <ohtsu@iij.ad.jp>) id 1UjeiC-0004UR-NV for ietf-http-wg@listhub.w3.org; Tue, 04 Jun 2013 00:02:52 +0000
Received: from mo30.iij.ad.jp ([202.232.30.71] helo=omgo.iij.ad.jp) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <ohtsu@iij.ad.jp>) id 1Ujei7-0002Uv-6V for ietf-http-wg@w3.org; Tue, 04 Jun 2013 00:02:52 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iij.ad.jp; h=Message-ID: Date:From:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type: Content-Transfer-Encoding; i=ohtsu@iij.ad.jp; s=omgo1; t=1370304141; x= 1371513741; bh=hQdbKRddCnoiAPCKRvKzyWt2lXVXPIQb7SMMqg7we/Y=; b=A2WTeBBXFL8iMl1l IVElOdAUeHqdZhaGIoh1I+NmTdUEpuj9nX64s0oIn0o0auXtmeo5O+0dWwbs+77nI9g2kHklIW0h6 722xOrWudHV1UYtANLT3GljrbN02EapcMtziwHVwc9Ud8mTQGHiijPVHDGncddw0ztgIMI/0XYQ+M g=;
Received: by omgo.iij.ad.jp (mo30) id r5402Lo3012515; Tue, 4 Jun 2013 09:02:21 +0900
Message-ID: <51AD2E8B.4050102@iij.ad.jp>
Date: Tue, 04 Jun 2013 09:02:19 +0900
From: Shigeki Ohtsu <ohtsu@iij.ad.jp>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Martin Thomson <martin.thomson@gmail.com>
CC: HTTP Working Group <ietf-http-wg@w3.org>
References: <51A87484.4090501@iij.ad.jp> <CABkgnnWPuTp41vYDCbbs+PdDOFc7hCVmNzLJq8CsmHe4Jc-8dQ@mail.gmail.com>
In-Reply-To: <CABkgnnWPuTp41vYDCbbs+PdDOFc7hCVmNzLJq8CsmHe4Jc-8dQ@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=202.232.30.71; envelope-from=ohtsu@iij.ad.jp; helo=omgo.iij.ad.jp
X-W3C-Hub-Spam-Status: No, score=-3.8
X-W3C-Hub-Spam-Report: AWL=-3.194, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.511, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Ujei7-0002Uv-6V 1f24b94607a05c3560cdc5a193a7aee2
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Questions on Server Push
Archived-At: <http://www.w3.org/mid/51AD2E8B.4050102@iij.ad.jp>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18159
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 your answer. Please let me clarify it.

(2013/06/04 1:05), Martin Thomson wrote:
> On 31 May 2013 02:59, Shigeki Ohtsu <ohtsu@iij.ad.jp> wrote:
>> In the above B case, FINAL flag cannot be set in HEADERS+PRIORITY so
>>   we need to know it at first to distinguish the case A.
>
> This isn't quite right.  Only the stream from the server to the client
> (the response stream) needs to be open in order to send PUSH_PROMISE.

In 4.3.1 Server implementation, it says that
"A server cannot send a PUSH_PROMISE on a new stream or a half-closed stream."

If the following is permitted

  1. Client -> HEADERS+PRIORITY with FINAL (Get Request) -> Server (stream 1)
(stream1 is half-closed)
  2. Client <- PUSH_PROMISE <- Server (stream 1)
  3. Client <- HEADER(Promised Response) <- Server (stream 2)
  4. Client <- DATA(Promised Response) with FINAL <- Server (stream 2)
  5. Client <- HEADER(Response) <- Server (stream 1)
  6. Client <- DATA with FINAL(Response) <-Server (stream 1)
(stream1 is full-closed)

then  PUSH_PROMISE on step2 seemed to be sent from server on the
half-closed stream 1. Do we need to change the spec so as to permit
to send PUSH_PROMISE on a half-closed stream?

> Also, the ordering isn't strictly this way.  Steps 3,4 and 5,6 can be
> interleaved in any order.  The only constraint is that step 6 (the one
> containing the FINAL for stream 1) comes after step 2.

This was the another question that came into my mind, but I wrote the example
  to follow the current SPDY case. It was solved, thanks.

We would be glad if you add some notes about this after
"After sending a PUSH_PROMISE, the server commences transmission of a pushed resource."
in 4.3.1.

It might be also related to the description to be written about the stream lifecycles
as noted on http://http2.github.io/http2-spec/#rfc.comment.5

>> Q3: In above case, no stream was created before step 5 so that
>> PUSH_PROMISE was sent on a new stream. This is forbidden in the spec.
>
> This is a case that we haven't completely resolved yet.  My
> expectation is that we will define something like: the pre-Upgrade
> request implicitly opens stream 1.   See
> https://github.com/http2/http2-spec/issues/52

Thanks, I missed to find the issue.
It would be nice to have the first implicit client-initiated stream
  which has a default priority. The sequence would be

1. Client -> Get Request(HTTP/1.1) with Upgrade -> Server
(open implicit stream 1 with a default priority)
2. Client <- 101 Switch Protocol Response <- Server
3. Client <- Connection Header + SETTINGS <- Server
4. Client -> Connection Header + SETTINGS -> Server
5. Client <- PUSH_PROMISE <- Server (implicit stream 1)
6. Client <- HEADER(Promised Response) <- Server (stream 2)
7. Client <- DATA(Promised Response) with FINAL <- Server (stream 2)
8. Client <- HEADER(Response) <- Server (implicit stream 1)
9. Client <- DATA with FINAL(Response) <-Server (implicit stream 1)

Regards,