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

Merge CONNECTION_CLOSE and APPLICATION_CLOSE #978

Closed
larseggert opened this issue Dec 1, 2017 · 9 comments
Closed

Merge CONNECTION_CLOSE and APPLICATION_CLOSE #978

larseggert opened this issue Dec 1, 2017 · 9 comments
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@larseggert
Copy link
Member

larseggert commented Dec 1, 2017

Since CONNECTION_CLOSE and APPLICATION_CLOSE have the same format, are already distinguishable by the different error code spaces, and have the same semantics, we could save a frame type number here.

@ianswett
Copy link
Contributor

ianswett commented Dec 1, 2017

I think it makes the text a bit easier to read to only have one close frame. When I first re-read the draft with them split out I was initially very confused.

@huitema
Copy link
Contributor

huitema commented Dec 1, 2017

Probably true. The split leads to interesting corner cases. Also, the application close reason codes are supposedly "defined by the application". But if that's really the case, maybe they should be conveyed by an application level message.

@MikeBishop
Copy link
Contributor

@larseggert, you say that they can be differentiated by the error code spaces, but I don't see that in the text. Transport error codes are a sixteen-bit space; application error codes are a different sixteen-bit space. In RST_STREAM, you know a priori that it's an application error code. In *_CLOSE, you know which is which only by the frame type. If you merged the frame types into one, you'd need a flag in the frame header, which is wire-identical to what we currently have: frame type 0b0000001A, where A is a flag indicating whether the error is transport-based (A=0) or application-based (A=1). If you think recasting it as one frame type with a flag is easier for implementers to understand, that seems purely editorial.

@huitema, if applications are responsible for communicating their own reasons for fatally closing the connection, then they have to define a way to semi-reliably communicate that reason after reaching an invalid state. That's something we've already gone to some trouble to support in the transport, and it seems an unfortunate thing for the application protocol to be required to reinvent each time, particularly protocols which don't have a dedicated control stream.

@larseggert
Copy link
Member Author

Oh. I had assumed they were sharing the same 16bit space (since that seems plenty large.)

@martinthomson
Copy link
Member

Managing separate ID spaces is easier (since N_applications might be large).

On @huitema's suggestion, if you think about that, it's hard. The mechanism we provide them is streams. And on first look at it, it seems possible to send a STREAM frame alongside a CONNECTION_CLOSE (that uses an APPLICATION_SPECIFIC_ERROR code). But it isn't that easy because streams could be blocked. On MAX_DATA, MAX_STREAM_DATA, or MAX_STREAM_ID. You would have to willingly violate flow control or stream limits to get the message through, and that increases the chances that the message would be discarded on receipt.

@huitema
Copy link
Contributor

huitema commented Dec 4, 2017

Well, we now have connection and application close in the code, and it would cost more to merge them than to leave them separate. So I vote to leave that one alone.

@janaiyengar
Copy link
Contributor

janaiyengar commented Dec 4, 2017 via email

@martinthomson martinthomson added -transport design An issue that affects the design of the protocol; resolution requires consensus. labels Dec 4, 2017
@mnot mnot added this to Connection End in QUIC Dec 13, 2017
@siyengar
Copy link

siyengar commented Jan 5, 2018

we went through the same process of splitting the error codes spaces as well, so I don't see a strong argument for merging them either

@larseggert
Copy link
Member Author

OK, consensus seems to be to leave things as they are - closing this

@mnot mnot removed this from Connection End in QUIC Mar 15, 2018
@mnot mnot added has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. and removed has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. labels Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

No branches or pull requests

8 participants