Subject: Re: [quicwg/base-drafts] PUSH_PROMISE ordering guarantee (#557)

From: Kazuho Oku <[email-masked]>
Date: Thu, 08 Jun 2017 10:09:16 -0700

@martinthomson 
> Returning to a model where data and headers share a stream would fix this.

To me it seems that sending PUSH_PROMISE as part of the parent stream is problematic regardless of whether or not headers and body are sent as separate streams.

Consider the case where a server is sending multiple responses that all refer to a single resource. This could happen for example when a client requests two HTML files to be shown in different iframes, and when the two HTML files refer to the same CSS file.

In such case, you would need to refer to the pushed stream from both the responses. However, current design only allows you to create a dependency to a pushed response from _one_ response. Therefore, we have a race condition if the client receives the responses of the two pulled streams in a different order than the server sends.

To this end, I think that we should send PUSH_PROMISE using a different stream (possibly the stream that will convey the response headers), and within the parent stream only _refer_ to that stream, instead of trying to convey the request headers of the pushed stream in the parent stream.

I understand that I am proposing to create dependency between streams. But I might argue that doing so (rather than trying to send PUSH_PROMISE in the parent stream) would benefit us in the long run, under the assumption that such dependency is expected to show up in application protocols other than HTTP as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/557#issuecomment-307167240

---

From: Mike Bishop <[email-masked]>
Date: Thu, 08 Jun 2017 10:37:43 -0700

Interesting idea – or the request headers on their own steam, with unidirectional….  ??  Note, though, that this still doesn’t solve ordering of the promise and the reference.  It actually makes it worse, since while you know a push is coming, you don’t know what, and you still need to order that reference with respect to the body fragments.

Sent from my Windows 10 phone

From: Kazuho Oku<mailto:[email-masked]>
Sent: Thursday, June 8, 2017 7:09 PM
To: quicwg/base-drafts<mailto:[email-masked]>
Cc: Mike Bishop<mailto:[email-masked]>; Mention<mailto:[email-masked]>
Subject: Re: [quicwg/base-drafts] PUSH_PROMISE ordering guarantee (#557)

@martinthomson<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmartinthomson&data=02%7C01%7CMichael.Bishop%40microsoft.com%7C741ce3edd32b44556c8e08d4ae9118f5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636325385593951289&sdata=dvNGuieOUvByc7NRDjTXhrbAgEWvNS6IXZ5iy1Cz5OQ%3D&reserved=0>

In such case, you would need to refer to the pushed stream from both the responses. However, current design only allows you to create a dependency to a pushed response from one response. Therefore, we have a race condition if the client receives the responses of the two pulled streams in a different order than the server sends.

To this end, I think that we should send PUSH_PROMISE using a different stream (possibly the stream that will convey the response headers), and within the parent stream only refer to that stream, instead of trying to convey the request headers of the pushed stream in the parent stream.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fquicwg%2Fbase-drafts%2Fissues%2F557%23issuecomment-307167240&data=02%7C01%7CMichael.Bishop%40microsoft.com%7C741ce3edd32b44556c8e08d4ae9118f5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636325385593951289&sdata=0Oj7PimbNpPkLBNyPH%2BkmJ%2FFupC3UuYAPhpEn6%2F2c%2Fw%3D&reserved=0>, or mute the thread<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEE2hWhcm78budIyP44fl_9f4ZcuOsquks5sCCq7gaJpZM4Nl8yw&data=02%7C01%7CMichael.Bishop%40microsoft.com%7C741ce3edd32b44556c8e08d4ae9118f5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636325385593951289&sdata=uagbYjVXjL2YISiuiiUtlfeaH2IrhosHu1xJlmxC6Yw%3D&reserved=0>.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/557#issuecomment-307174668

---

From: Kazuho Oku <[email-masked]>
Date: Thu, 08 Jun 2017 11:53:39 -0700

> Note, though, that this still doesn’t solve ordering of the promise and the reference. It actually makes it worse, since while you know a push is coming, you don’t know what, and you still need to order that reference with respect to the body fragments.

Thank you for the response. That is a good point.

I would argue that if we decide to covey the request headers of a pushed response outside the parent stream, we should 1) unify headers and body into single stream, and 2) create a HTTP frame (that is sent as part of the unified stream) that defines a dependency (i.e.tell the client to wait for the headers of a different stream). If we go this route, I think that it would not be "worse" at least.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/557#issuecomment-307194817