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

Improve submitter client ext #39

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Improve submitter client ext #39

wants to merge 13 commits into from

Conversation

aneojgurhem
Copy link
Contributor

@aneojgurhem aneojgurhem commented Sep 16, 2022

/// <exception cref="Exception">a result reply chunk is not data, rending it impossible to reconstitute the data</exception>
/// <exception cref="ArgumentOutOfRangeException">result reply type is unknown</exception>
[PublicAPI]
public static Task<Stream> GetResultAsStreamAsync(this gRPC.V1.Submitter.Submitter.SubmitterClient client,
Copy link
Contributor

Choose a reason for hiding this comment

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

@aneojgurhem With the stream correctly implemented, it is not necessary for this function to be async. Do we remove the async?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can keep it for now

@wkirschenmann
Copy link

wkirschenmann commented Sep 19, 2022 via email

{
internal class ReadOnlyByteArrayPayload : ReadOnlyByteMemoryPayload
{
public ReadOnlyByteArrayPayload(byte[] bytes)

Choose a reason for hiding this comment

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

Why not just add a second constructor to the parent class?

/// <summary>
/// IO.Stream that is read from an IAsyncEnumerable
/// </summary>
public class AsyncEnumerableStream : Stream, IAsyncDisposable

Choose a reason for hiding this comment

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

Lots of hypothesis on how it will be consumed.
Many of them will likely appear to be wrong.
This should be in another PR with lots of test and with microbenchmarks corresponding to different consumption use cases. These benchmarks should include both asynchronous and synchronous scenarios. In real application, the later are more likely as legacy deserializers are synchronous. None of the existing libs are using Memory or Span to get the data from the Stream.

@CLAassistant
Copy link

CLAassistant commented Jun 23, 2023

CLA assistant check
All committers have signed the CLA.

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.

Improve submitter client ext in api
4 participants