apple / swift-nio-http2

HTTP/2 support for SwiftNIO
https://swiftpackageindex.com/apple/swift-nio-http2/main/documentation/niohttp2
Apache License 2.0
465 stars 82 forks source link

Lift requirement to create streams in order #214

Closed Lukasa closed 4 years ago

Lukasa commented 4 years ago

In swift-nio-http2 today we have an unspoken hard requirement, which is that if you call createStreamChannel multiple times you must send the first write on each of those channels in the order you created them. This is because createStreamChannel allocates a stream ID immediately for each of those channels, but that allocation isn't meaningful until we try to write to the network. If you write out of order, the later streams will use the higher stream ID allocated to them, and will implicitly retire the lower IDs used by the earlier channels. When those earlier channels try to send, the core state machine will reject them for violating stream ID ordering.

After discussing with @glbrntt we think this is made up of several changes:

sweetbot commented 4 years ago

Just to understand the ETA: with #222 being merged, when could we see a new version of swift-grpc and close this issue https://github.com/grpc/grpc-swift/issues/912?

glbrntt commented 4 years ago

@sweetbot there are still outstanding tasks to resolve this issue before we can tag a release of SwiftNIO HTTP/2. gRPC will then need to pick up the new version and any new changes that come with it. My hope is that we can tag a gRPC release by the end of the week.