HTTP/2 Priorities Proposal

I believe it would be simpler (both conceptually and in practice) to
slightly modify the priority structure.

Currently we have group-ids with weights and (possibly-exclusive) stream
dependencies. The default is for the a stream to create a new group with an
id equal to its stream identifier and some default priority.

Conceptually this is the same as saying that the priority is a
non-exclusive stream dependency of 0, but this dependency is special in
that it is weighted.

When depending on an existing stream, the stream has an implicit weight of
1 / total # of dependent streams (rounded appropriately to integers).

This conceptually creates a "weighted groups of dependency trees" but it
seems that this can equivalently be thought of as a single "weighted tree"
with implicit or explicit weights.

I am suggesting that it would be easier both conceptually and in
implementation to replace the idea of groups entirely with weighted
dependencies. Implementations already have to handle weights at some point
to deal with groups. Thus determining priority is the traversal of a single
weighted tree.

The on-the-wire implementation then only requires a single flag for
signaling priority information, with the frame layout always containing a
weight and a stream dependency (possibly 0) with an "exclusive" bit.

The defaulted priority information is then a dependency of 0 with the
default weight (16). This is identical to a new group with the group-id ==
stream-id.


I believe this proposal has the benefit in that the wire format is
simplified, the overall complexity of the implementation is reduced, and
all priority information is proxy-able. The drawback is that in the
existing implementation, you can add a stream to a named group and share
it's weight is automatically divided equally amongst the roots of the trees
in the group. In this implementation, doing so would require sending
priority frames to re-weight the root streams.


Thoughts?

Received on Tuesday, 8 April 2014 23:23:41 UTC