-
Notifications
You must be signed in to change notification settings - Fork 5
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
[protocol v2] RFC PROTOCOL V2 #111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jackyzha0
reviewed
May 9, 2024
lhchavez
reviewed
May 9, 2024
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
commented
May 10, 2024
masad-frost
changed the title
RFC PROTOCOL V2 (with errors and one way close)
RFC PROTOCOL V2 (with errors and server initiated closes)
May 10, 2024
@jackyzha0 @lhchavez I updated the document and the PR description. We now allow half-closes, mostly convinced by the fact that uploads are kinda wonky without 2 way close, adding another control message or flag for that didn't feel right. |
masad-frost
commented
May 11, 2024
PROTOCOL.md
Outdated
|
||
`Control` is a payload that is wrapped with `TransportMessage`. | ||
|
||
??? TODO Faris: there's no differentiation between a `Control` in the protocol and an `Input` message with the the same schema. Yikes. Should probably fix this in this protocol bump. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
masad-frost
changed the title
RFC PROTOCOL V2 (with errors and server initiated closes)
[protocol v2] RFC PROTOCOL V2 (with errors and server initiated closes)
May 11, 2024
This was referenced May 11, 2024
Closed
masad-frost
changed the title
[protocol v2] RFC PROTOCOL V2 (with errors and server initiated closes)
[protocol v2] RFC PROTOCOL V2
May 16, 2024
masad-frost
added a commit
that referenced
this pull request
May 18, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
This was referenced May 19, 2024
masad-frost
added a commit
that referenced
this pull request
May 21, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
May 21, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
May 29, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
May 31, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Jun 6, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Jun 11, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Jun 13, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Jun 20, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Jun 24, 2024
* Update PROTOCOL.md * Update PROTOCOL.md Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com> * Update PROTOCOL.md * half-close semantics * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * fmt * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Update PROTOCOL.md * Include reader-writer semantics --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
masad-frost
added a commit
that referenced
this pull request
Aug 16, 2024
All the changes are documented in `Protocol.md` but here's a summary: - Handle invalid client requests by sending a close with an error back - This was the main motivation for the change. While we could sort-of implement this error response without the other changes, things are setup in such a way where it is very hard to implement correctly without deeper changes in how we handle closing. - Add more robust closing mechanics - Half-close states - Close signals from read end of the pipes - Abort full-closure (for errors and cancellation) - Switch from `Pushable` and `AsyncIterator` APIs to a `ReadStream` and `WriteStream` - All procedures have `init` and some have `input` While the changes are not strictly backwards compatible, hence the major protocol bump, the system can still operate across versions to some extent. See PRs linked below for more information on the above # TODOs - [x] Define protocol and update doc #111 - [x] Design stream abstractions #118 - [x] Redsigned in #249 - [x] Implement stream abstractions - [x] ReadStream #130 - [x] WriteStream #132 - [x] All streams have init, some have input. - [x] Protocol change documented in #153 - [x] Implementation change #159 - [x] Use stream abstractions & implement protocol closing semantics - [x] Protocol: Implement close requests from readers #165 - [x] Protocol: Implement half-close - [x] Client #162 - [x] Server #163 - [x] Simple s/Pushable/Stream replacement - [x] Client #136 - [x] Server #137 - [x] Make `Input` iterator on the server use `Result` so we can signal stream closes, client disconnects, and aborts #172 - [x] Add Abort mechanism - [x] Docs update #175 - [x] Implement abort - [x] Client #193 - [x] Server #200 - [x] Add `INVALID_REQUEST` to schema #107 - [x] Handle/send back `INVALID_REQUEST` errors with an abort bit #203 - [x] Handle/send back `INTERNAL_RIVER_ERROR` with an abort bit #203 - [x] Send abort bit with `UNCAUGHT_ERROR` #201 - [x] Abort tombstones #204 - [ ] Try to find uncovered areas to test - [ ] `undefined` value for `init`, `input`, & `output`. - [ ] Update docs - [ ] Changelog --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Currently half-closes initiated by the server are not documented and sort of undefined behavior in the implementation. This is critical to adding
INVALID_REQUEST
errors.What changed
Error
type more explicitlyResult
type more explicitlyControl
type more explicitlyThe changes should be somewhat backwards compatible, existing servers should be able to serve new clients with the exception of server initiated closes/protocol errors, I don't anticipate us needing to do a crazy migration to handle these changes.
Versioning