Skip to content

Allow for streaming properties in DataStreamBidirectional API #206

@corbin-phipps

Description

@corbin-phipps

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);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions