cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: HTTP/2 Stream Priority and Dependency

From: Lucas Pardue <Lucas.Pardue_at_bbc.co.uk>
Date: Fri, 5 Jun 2015 12:43:49 +0000

Hi Daniel,

> (HTTP/2 Server push works pretty good now:
> http://daniel.haxx.se/blog/2015/06/03/server-push-to-curl/)
>
> I've moved further and started to think about how to set and control HTTP/2
> stream priority and dependencies.

Thanks for keeping up the good work on HTTP/2.

The suggestion looks good on first inspection. I had a questions without much time to think of answers sorry:

1) What about the "post-transfer" state? Should Section 6.3 of the spec says

"The PRIORITY frame can be sent for a stream in the "idle" or "closed" state. This allows for the reprioritization of a group of dependent streams by altering the priority of an unused or closed parent stream."

It seems a bit horrible to have to keep "old" easy handles laying around in order to support this possibility.

2) CURLOPT_STREAM_DEPENDS_ON validation could be tightened up to return error if attempting to depend on self. Maybe it already does, in which case it would be good to document.

"A stream cannot depend on itself. An endpoint MUST treat this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR."

3) How about dependency exclusivity? If someone inserts an exclusive dependency into an existing tree it will change the parent stream of the existing dependents. Figure 4 in section 5.3.1 shows an example. Should there be a way for the user to interrogate the dependency parent of a handle, or to inform them of changes via a callback?

4) With the server push API using the term "parent" things could get a bit confusing. It is more like "push parent" and "dependency parent" but that sounds a bit ugly.

Kind Regards
Lucas

-----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-----------------------------

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-05