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

feat: streaming blob reads over RPC #1477

Merged
merged 5 commits into from
Sep 13, 2023
Merged

feat: streaming blob reads over RPC #1477

merged 5 commits into from
Sep 13, 2023

Conversation

Frando
Copy link
Member

@Frando Frando commented Sep 13, 2023

Description

This makes getting blobs over RPC streaming. Before we'd alloc the full blob in-memory, which of course is a no-go.

Notes & open questions

Client API methods will be renamed in the upcoming API refactor.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

Copy link
Contributor

@rklaehn rklaehn left a comment

Choose a reason for hiding this comment

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

Looks quite reasonable...

fn bytes_get(
self,
req: BytesGetRequest,
) -> impl Stream<Item = RpcResult<BytesGetResponse>> + Send + 'static {
Copy link
Contributor

Choose a reason for hiding this comment

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

This works fine and should not be an issue in this case.

But if quic-rpc would optionally give you a sender instead of requiring a signature that returns a stream the additional channel could be avoided.

@Frando Frando added this pull request to the merge queue Sep 13, 2023
Merged via the queue into main with commit 6397d46 Sep 13, 2023
15 checks passed
@dignifiedquire dignifiedquire deleted the rpc-stream-blobs branch November 1, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants