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

Allow for streaming properties in DataStreamBidirectional API #206

Open
corbin-phipps opened this issue Mar 4, 2024 · 0 comments
Open
Assignees

Comments

@corbin-phipps
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The DataStreamBidirectional API does not currently support a way for the client to request streaming properties from the server like it does in DataStreamDownload because there is no "request". The API/data types should be modified in order to support this behavior.

Describe the solution you'd like
A few options to consider:

  1. Add a field to DataStreamUploadData for the client to request download properties from the server, and the server should only read this in DataStreamBidirectional and on the first received message.
  2. Similar to 1, create a new data type (such as DataStreamBidirectionalUploadData) that does the same as 1, but allows for DataStreamUploadData to remain untouched and only used in the DataStreamUpload API.
  3. Add a new RPC to create a stream, allowing for client and server to negotiate streaming properties before starting the actual streaming RPCs. Would look something like the following:
enum DataStreamDirection
{
    Upload,
    Download,
    Both,
};
enum DataStreamCreateStatusCode 
{
    Unknown = 0,
    Succeeded = 1,
    Failed = 2,
    // Others as needed
};
message DataStreamCreateRequest
{
    DataStreamDirection Direction = 1;
    DataStreamProperties PropertiesUpload = 2; // present when Direction == Upload and Both
    DataStreamProperties PropertiesDownload = 2; // present when Direction == Download and Both
};
message DataStreamCreateResult
{
    DataStreamCreateStatusCode Status = 0;
    string StreamId = 1; // Valid/present only when  Status == Succeeded
};
message DataStreamDownloadRequest
{
    string StreamId = 0;
};
rpc DataStreamCreate (DataStreamCreateRequest request, DataStreamCreateResult result);
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

No branches or pull requests

1 participant