I've added a PUSH_PROMISE frame. It does need significant cleanup of the prose, but the basics should be there. The essential change here is that a server push starts with a PUSH_PROMISE, which always inherits headers from the request, and then overrides only those parts which are different by sending those overrides (and only those overrides). The PUSH_PROMISE frame allocates stream-ids for the push streams according to the regular (monotonically increasing) rules, however it doesn't count towards the MAX_STREAM limit. When the push streams are actually created (by sending a SYN_REPLY), then the stream-ids are in actual use and DO count against the MAX_STREAM limit.
On Aug 9, 2012 6:43 PM, "Ilya Grigorik" <igri...@gmail.com> wrote:
>
>
>
> On Thu, Aug 9, 2012 at 11:46 AM, Roberto Peon <fe...@google.com> wrote:
>>
>> I've added a PUSH_PROMISE frame. It does need significant cleanup of the prose, but the basics should be there. The essential change here is that a server push starts with a PUSH_PROMISE, which always inherits headers from the request, and then overrides only those parts which are different by sending those overrides (and only those overrides). The PUSH_PROMISE frame allocates stream-ids for the push streams according to the regular (monotonically increasing) rules, however it doesn't count towards the MAX_STREAM limit. When the push streams are actually created (by sending a SYN_REPLY), then the stream-ids are in actual use and DO count against the MAX_STREAM limit.
>
>
> If the client wants to decline a promise for a specific asset (for whatever reason), I assume RST_STREAM is the appropriate mechanism?
Correct.
> Or a whole lot of RST_STREAMS if we need to decline multiple assets? Does it make sense to have a bulk RST_STREAM? Heh.. :)
It may... we've thought about in the past, but never had a strong need for it. This may be the proverbial straw for this particular camel's back though.
-=R
>
> ig
>
Push in v3 sends a syn_stream with the required request headers. Ay some later time it will send a headers frame which sends the remaining request headers. After all request headers are sent, it sends a SYN_REPLY with the response headers.
The v4 behavior is similar, but uses PUSH_PROMISE instead of SYN_STREAM. This allows us to remove 4 bytes from all SYN_STREAM frames, and it hopefully makes it clear that the PUSH frame doesn't count against the same concurrency limit that the SYN frame does. Anyway, that is the intent.
>
> In v4 I understand that the server has to send a PUSH_PROMISE, and
> then a SYN_REPLY ? Given the strong adversion of this group to
> additional round trips, I find this change really strange.
You don't wait for a syn reply-- the server sends both. You want to have these be separated (while under control of the server) so the sending of the main resource isn't delayed.
>
> I can't see benefits either: in v3 canceling a push was made by
> resetting the stream; same will be in v4; there is a non-clear concept
> of "when the server is ready to push the resource, then it sends a
> SYN_REPLY", which smells too much of implementation details slipped
> into the specification.
> The user agent can always detect what request triggered the push,
> because the pushed SYN_STREAM has the associated stream id.
>
> All in all, I can't find any reason for this change, but it's evident
> that I am missing something.
>
> Can you please expand on the use cases that caused this change, and
> report the data that measured that sending 2 control frames instead of
> 1 for pushed resources is actually better ?
See above :)
-=R
Hi,
Is not this an implementation detail ?
On Fri, Aug 10, 2012 at 6:03 PM, Roberto Peon <fe...@google.com> wrote:
> Push in v3 sends a syn_stream with the required request headers. Ay some
> later time it will send a headers frame which sends the remaining request
> headers.
Jetty does not send HEADERS frames, for example: we just send the
pushed SYN_FRAME.
The SYN_REPLY for the original request may be sent before the pushed
> After all request headers are sent, it sends a SYN_REPLY with the
> response headers.
SYN_STREAMs, or concurrently, or after.
I don't see the v3 specification mandate that it must be after the
pushed SYN_STREAMs.
To just limit concurrency on SYN_FRAMEs, won't be enough to say that
> The v4 behavior is similar, but uses PUSH_PROMISE instead of SYN_STREAM.
> This allows us to remove 4 bytes from all SYN_STREAM frames, and it
> hopefully makes it clear that the PUSH frame doesn't count against the same
> concurrency limit that the SYN frame does. Anyway, that is the intent.
if they are unidirectional then they do not sum up ?
I still miss the reasons for this change ?
Hi,
Ok so I misunderstood your first email, sorry.
On Fri, Aug 10, 2012 at 7:37 PM, Roberto Peon <fe...@google.com> wrote:
> The reasons.
> 1) make common operations (i.e. SYN_STREAM) more efficient.
> 2) differentiate SYN_STREAM and PUSH more easily (i.e. at the opcode level,
> where it belongs). I feel that this would increase the chance that a new
> implementation would deal properly with the concurrency limits, especially
> in the case where it does not adhere perfectly to the spec.
> 3) if we discover PUSH is non-essential, all we must do is deprecate that
> frame-- there will be no waste elsewhere in the protocol
You are proposing to add a new frame PUSH_PROMISE instead of using
SYN_STREAM when doing pushes. This will remove the need for having an
associated stream id in the non-pushed SYN_STREAMS.
If I now understand correctly, I am all for that :)
Nope, to be honest... I could only find the XML (no HTML format ?),
> Did you check out the other changes, btw?
and I think it would be immensely helpful to have a section that
explains the changes between v3 and v4 instead of relying on diff
tools.
If it's already there and I missed it in the XML brackets, I apologize
in advance :)
> Did you check out the other changes, btw?Nope, to be honest... I could only find the XML (no HTML format ?),
and I think it would be immensely helpful to have a section that
explains the changes between v3 and v4 instead of relying on diff
tools.
If it's already there and I missed it in the XML brackets, I apologize
in advance :)
The headers section hasn't changed much because I'm still actively playing with it. The most up-to-date stuff for the headers is found in the headers_sample.py file.headers_sample.py now parses .har files, which makes it easy to see how compression would look on real transactions.
Comments, please!-=R