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

QPACK and naive H3 implementation #136

Merged
merged 125 commits into from
Feb 8, 2019
Merged

QPACK and naive H3 implementation #136

merged 125 commits into from
Feb 8, 2019

Conversation

stammw
Copy link
Contributor

@stammw stammw commented Dec 23, 2018

Continuing the work of @evolix1, from #20, which is blocking #130.

Features:

  • Encoder
  • Reference tracking
  • Track DynamicTable::fields mutation, update DynamicTable::*_map when constructing DynamicTableEncoder instead of rebuilding HashMaps
  • [-] N bit handling
  • [-] Encode / decode concurreny (needs to have concurrent shared mutable state...)
  • Configuration (may need H/3 impl to start)

Optimization:

@stammw stammw force-pushed the wip-qpack branch 2 times, most recently from c00f5ff to db2d23a Compare December 24, 2018 12:55
@codecov
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

Merging #136 into master will increase coverage by 6.65%.
The diff coverage is 95.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   60.03%   66.68%   +6.65%     
==========================================
  Files          21       32      +11     
  Lines        5274     6495    +1221     
==========================================
+ Hits         3166     4331    +1165     
- Misses       2108     2164      +56
Impacted Files Coverage Δ
quinn-h3/src/qpack/table/static_.rs 100% <100%> (ø)
quinn-h3/src/qpack/string/bitwin.rs 100% <100%> (ø)
quinn-h3/src/qpack/table/field.rs 100% <100%> (ø)
quinn-h3/src/qpack/primitive/iocontext.rs 86.2% <86.2%> (ø)
quinn-h3/src/qpack/primitive/dump.rs 90.16% <90.16%> (ø)
quinn-h3/src/qpack/decoder.rs 93.05% <93.05%> (ø)
quinn-h3/src/qpack/vas.rs 94.59% <94.59%> (ø)
quinn-h3/src/qpack/primitive/parser.rs 94.91% <94.91%> (ø)
quinn-h3/src/qpack/table/dynamic.rs 96.61% <96.61%> (ø)
quinn-h3/src/qpack/string/decode.rs 97.76% <97.76%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4862a9...db2d23a. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

Merging #136 into master will increase coverage by 2.83%.
The diff coverage is 83.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   74.82%   77.66%   +2.83%     
==========================================
  Files          24       41      +17     
  Lines        6150     9197    +3047     
==========================================
+ Hits         4602     7143    +2541     
- Misses       1548     2054     +506
Impacted Files Coverage Δ
quinn-proto/src/lib.rs 50% <ø> (ø) ⬆️
quinn-h3/src/qpack/mod.rs 0% <0%> (ø)
interop/src/qif.rs 0% <0%> (ø)
quinn-h3/src/qpack/prefix_int.rs 100% <100%> (ø)
quinn-h3/src/qpack/prefix_string/bitwin.rs 100% <100%> (ø)
quinn-h3/src/qpack/static_.rs 100% <100%> (ø)
quinn-h3/src/qpack/field.rs 63.33% <63.33%> (ø)
quinn-h3/src/qpack/stream.rs 84.07% <84.07%> (ø)
quinn-h3/src/frame.rs 85.57% <85.57%> (ø)
quinn-h3/src/qpack/decoder.rs 89.47% <89.47%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47bc288...42adb95. Read the comment docs.

@stammw stammw force-pushed the wip-qpack branch 6 times, most recently from cf0e752 to bc18037 Compare January 4, 2019 21:03
@stammw stammw force-pushed the wip-qpack branch 7 times, most recently from c9871fe to 92bbc6d Compare January 11, 2019 20:38
@stammw stammw force-pushed the wip-qpack branch 3 times, most recently from 874246b to 00d5c95 Compare January 21, 2019 23:37
@stammw stammw changed the title [WIP] QPACK implementation QPACK implementation Jan 24, 2019
@stammw
Copy link
Contributor Author

stammw commented Jan 25, 2019

I think we are near the point where it would be nice to plan merging this.

It has been tested against lightspeed's endpoint and there hasn't been necessary modification in the qpack code. I just had to use what's in #130 to achieve this. For the moment, encoder stream hasn't proved to be totally functional, but I'll soon get it tested.

It's now big enough for me to worry about the review, and willing to work with smaller iterations (surely is a beginner thing).

@stammw stammw changed the title QPACK implementation QPACK and naive H3 implementation Jan 25, 2019
quinn-h3/src/qpack/block.rs Outdated Show resolved Hide resolved
quinn-h3/src/qpack/block.rs Outdated Show resolved Hide resolved
quinn-h3/src/qpack/decoder.rs Show resolved Hide resolved
quinn-h3/src/qpack/vas.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few usages of allow(dead_code) in here, why are they needed? Did you investigate reusing parts of HPACK from the h2 implementation?

quinn-h3/Cargo.toml Outdated Show resolved Hide resolved
@stammw
Copy link
Contributor Author

stammw commented Jan 26, 2019

@djc I did not think of that. I'm not sure the common code surface would be that big. Maybe for the primitive types like prefix_string.

@djc
Copy link
Collaborator

djc commented Jan 27, 2019

I think that's what I was looking at, but I understand if there's not enough overlap. 👍

@stammw
Copy link
Contributor Author

stammw commented Feb 5, 2019

I think we're ready to merge !

The interop tool has been updated with only a very simple H3 scenario (with no encoder stream, nor receiving anything from server other than the response).

Trying to implement a full-featured client, I started to think it was too much code to write in form of a quick implementation. So it would be better to continue writing a solid code into another PR.

Copy link
Collaborator

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So looking at the interop tool additions mainly for now, this looks pretty good. @Ralith, do you want to review this more before it gets merged?

interop/src/main.rs Outdated Show resolved Hide resolved
@Ralith
Copy link
Collaborator

Ralith commented Feb 7, 2019

I'll try to have a look at the futuresy bits tomorrow per @stammw's request, at least.

interop/src/main.rs Outdated Show resolved Hide resolved
interop/src/main.rs Outdated Show resolved Hide resolved
interop/src/main.rs Show resolved Hide resolved
interop/src/main.rs Outdated Show resolved Hide resolved
interop/src/main.rs Outdated Show resolved Hide resolved
interop/src/main.rs Outdated Show resolved Hide resolved
quinn-proto/src/lib.rs Outdated Show resolved Hide resolved
@djc djc merged commit 9c1128a into quinn-rs:master Feb 8, 2019
@djc
Copy link
Collaborator

djc commented Feb 8, 2019

🎉

@stammw stammw mentioned this pull request Feb 9, 2019
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants