Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable-length fields #40

Closed
larseggert opened this issue Nov 28, 2016 · 5 comments
Closed

Variable-length fields #40

larseggert opened this issue Nov 28, 2016 · 5 comments
Assignees
Labels
-transport design has-consensus

Comments

@larseggert
Copy link
Member

@larseggert larseggert commented Nov 28, 2016

Packet numbers, stream offsets, various ACK information and many other fields can currently be encoded as variable length. Do we have some data on the benefits of this complexity? Would it be sufficient to use fewer increments, or could we even move to fixed length encoding for some or all of these fields?

@MikeBishop
Copy link
Contributor

@MikeBishop MikeBishop commented Nov 29, 2016

Anecdotally, Christian's implementation experience was that it wasn't that hard to implement and did save a noticeable amount of packet overhead. I presume the Google folks have similar experience and possibly numbers.

If we find that we can use a particular length most of the time, it might be reasonable to simplify to only that length and full-length, though. I agree that having so many options can be confusing.

@ianswett
Copy link
Contributor

@ianswett ianswett commented Nov 29, 2016

@martinthomson martinthomson added the design label Jan 10, 2017
@mnot mnot changed the title Benefit of variable-length fields? Variable-length fields Jan 20, 2017
@martinthomson martinthomson added the needs-discussion label Jan 20, 2017
@britram
Copy link
Contributor

@britram britram commented Jan 25, 2017

(from a side conversation with @ekr) one solution to this on the stream layer would be to use a variable-length integer encoding that embeds the length within the encoded value itself, i.e.:

00bbbbbb = 6 bit unsigned
01bbbbbb bbbbbbbb = 14 bit unsigned
10bbbbbb bbbbbbbb bbbbbbbb bbbbbbbb = 30 bit unsigned
11bbbbbb bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb = 62 bit unsigned

(The utility of being able to quickly calculate offsets without parsing an entire header for values in the packet header means, IMO, that it still makes sense to try and use fixed-length fields or, to the extent possible, fixed-structure headers as in #148)

@mnot
Copy link
Member

@mnot mnot commented Jan 26, 2017

As discussed in Tokyo, editors to go through their respective headers and come up with proposals to potentially limit variability.

@mnot mnot added editor-ready and removed needs-discussion labels Jan 26, 2017
@martinthomson
Copy link
Member

@martinthomson martinthomson commented Mar 10, 2017

With #361, let's call this done for now. Any residual issues can be brought up with new issues (I suspect that we're not entirely done with variable length encodings for packet numbers, for example).

@mnot mnot removed the editor-ready label Mar 15, 2017
@mnot mnot added the has-consensus label Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design has-consensus
Projects
None yet
Development

No branches or pull requests

7 participants