-
Notifications
You must be signed in to change notification settings - Fork 12
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
API change - solving state & unidirectional streams #69
Comments
tl;dr
I'm happy to make a PR on what there's consensus on changing. I didn't want to spend the time prototyping a PR with all of this, because it incorporates a lot of changes into one. Looking forward to hearing thoughts. |
@shampson Early on, when uni-directional streams were first proposed, we roughed out something similar to what you describe. The trickiest part was relating the receive and send streams to each other. Some questions:
To make this work, you could do something like this:
If done this way, creating a 'send' stream would return a bidi strream with |
@shampson @pthatcherg Since this is a pretty big change, my suggestion would be to create a Google doc with the proposal so we can collaborate on it prior to Wednesday's call. |
Started a Google doc: https://docs.google.com/document/d/1kPOJxYsoOKmFJlztN7LbKaitiswRFRbgzswefOxCfuE/edit |
Thanks for making the doc @aboba! |
Can't we close this now? |
Okay bear with me, this is long...
The spec has lot of issues dependent on how we want to treat the state of a QUIC stream:
We also want a clear API for unidirectional streams, and currently we're going to have to go through things with a fine toothed comb to make sure there aren't any bugs in the spec (certain methods/events are only applicable to specific directions).
Steve and I white boarded what a revision of the API could look like that solves the unidrectional and stream state issues:
API:
Send stream:
Receive stream:
Bidirectional stream:
createStream/onstream would need to be updated appropriately, but that doesn't need a code example.
I spent more time looking at the quic-transport spec, and I don't see any problems supporting this.
But what about state?
At the minimum the opening/closing states should not be necessary. All we are concerned with from an API perspective is when we can read/write. If we limit the stream creation to after the transport is connected there's no need for an initial "new" state. I explained in 54 why a stream can begin in a 'Ready' or Recv' state.
Send stream state mapping
Receive stream state mapping
Other issues
The text was updated successfully, but these errors were encountered: