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

[protocolv2] Remove the concept of close requests #248

Closed
wants to merge 1 commit into from

Conversation

masad-frost
Copy link
Member

@masad-frost masad-frost commented Jul 30, 2024

Why

Came up as part of the giga review for #127.

It's just one more concept that's unneeded. Instead of close requests, streams can listen to the closes on the other pipe and decided if they want to close then. Alternatively (for upload and stream procs), service implementers can implement a user-space close-request mechanisms. The only thing that this leaves open is in subscriptions clients have no way of signaling disinterest in the data, in which case they should just abort the stream.

FWIW this is how gRPC works.

What changed

Remove close request, swap with aborts in tests where relevant.

@masad-frost masad-frost requested a review from a team as a code owner July 30, 2024 19:44
@masad-frost masad-frost requested review from Monkatraz and removed request for a team July 30, 2024 19:44
Copy link
Contributor

@Monkatraz Monkatraz left a comment

Choose a reason for hiding this comment

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

lgtm, seems easier to think about this way

@jackyzha0
Copy link
Member

i guess if the subscription needs to be cancellable like that, should be ok to structure it as a stream anyways

@masad-frost
Copy link
Member Author

closing in favor of #249

masad-frost added a commit that referenced this pull request Aug 1, 2024
## Why

Follow up on #249 to actually use the new interfaces. Removed extra
refactor done in #249 that merges the interfaces as that proved to be a
challenging API (un-yak-shave 🙅 🐃)

## What changed

- Removed close requests (mostly cherry-picked from #248)
- Otherwise a simple swapping out of the interfaces

## Versioning

- [ ] Breaking protocol change
- [ ] Breaking ts/js API change

<!-- Kind reminder to add tests and updated documentation if needed -->
@jackyzha0 jackyzha0 deleted the fm-no-close-request branch August 19, 2024 22:46
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

3 participants