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

Proposal: Control and data streams #138

Closed
kixelated opened this issue Apr 19, 2023 · 8 comments · Fixed by #280
Closed

Proposal: Control and data streams #138

kixelated opened this issue Apr 19, 2023 · 8 comments · Fixed by #280
Assignees
Labels
Control Streams Related to control streams and general control message handling Needs PR

Comments

@kixelated
Copy link
Collaborator

kixelated commented Apr 19, 2023

Current

The client creates a bidirectional stream and sends the SETUP message. The server replies with its own SETUP message on the same stream. Afterwards, both endpoints can create any number of unidirectional streams containing any non-SETUP messages.

Problems

Proposed

  • The client creates a single bidirectional control stream. The control stream MUST start with a SETUP message, followed by any number of control messages (ex. SUBSCRIBE).
  • The sender creates unidirectional data streams. The data streams MUST only contain OBJECT messages.

Pros:

Cons:

  • Head-of-line blocking between control messages, which sometimes may not be desired.
@afrind
Copy link
Collaborator

afrind commented Apr 19, 2023

The sender creates unidirectional data streams

While I was reading the requirements draft, I found some use cases mentioning bidirectionality. Is it expected/supported that there can be data flowing in both directions (eg: a p2p call)?

@kixelated
Copy link
Collaborator Author

The sender creates unidirectional data streams

While I was reading the requirements draft, I found some use cases mentioning bidirectionality. Is it expected/supported that there can be data flowing in both directions (eg: a p2p call)?

Yeah, my intent is that there's a "sender" and a "receiver" per track. The ROLE param in the SETUP message indicates if an endpoint (client/server) intends to send tracks, receive tracks, or both.

In the bidirectional case, both endpoints would say ROLE=BOTH. Then they could independently PUBLISH or SUBSCRIBE to tracks.

Alternatively, we could say that tracks may be bidirectional... but I don't think that makes any sense.

@wilaw
Copy link
Contributor

wilaw commented Apr 21, 2023

We can simply say that data objects MUST NOT be sent over control streams, and remove any reference to whether data streams should be unidirectional or bidirectional. It doesn't matter and we can leave it to the end-points discretion.

@suhasHere
Copy link
Collaborator

suhasHere commented Apr 21, 2023

The proposal above aligns pretty well with the idea in #96 , more specifically this section

I like the separation of control stream and data streams, the latter being unidirectional streams.

@fluffy
Copy link
Contributor

fluffy commented Apr 22, 2023

I like the proposal for this.

I view the HOL blocking of control messages a feature not a bug. More specifically, I think that some of our messages need to be delivered in order. Specifically if a client is trying to stop and high res video subscription and start a low res subscription, it would be good to ensure that the subscribe to the low res track does not happen until after the end the end subscription to the high res track has happened. Sending the un-subscribe then subscribe on one quic stream allows these to be sent and same time to server ( we don't need a round trip between them ) but still be delivered in order.

I think it needs to be clear that multiple control messages can be outstanding at once. For example can send multiple subscribes before getting the response to the first subscribe.

@suhasHere
Copy link
Collaborator

The proposal above aligns pretty well with the idea in #96 , more specifically this section

I like the separation of control stream and data streams, the latter being unidirectional streams.

I would like to write up a PR based on the above ( basically resurrecting #96) that pertains to the control channels.

@VMatrix1900
Copy link

I like the idea of seperation of control stream and data stream.

@afrind afrind added the Control Streams Related to control streams and general control message handling label Oct 3, 2023
@ianswett
Copy link
Collaborator

ianswett commented Oct 5, 2023

WG is ok with a single stream, with no critical use cases for multiple.

A single stream makes it easier to change bitrates 'atomically'.

People don't want Object messages allowed on the same stream as control messages.

People noted that this means the only bidi stream is used for the control stream in practice, and all unidirectional streams are used for objects, but people don't want to bake that into the spec.

@ianswett ianswett self-assigned this Oct 9, 2023
This was referenced Oct 9, 2023
ianswett added a commit that referenced this issue Oct 16, 2023
ianswett added a commit that referenced this issue Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Control Streams Related to control streams and general control message handling Needs PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants