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

Implement announce using Subscriber interface #17

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

afrind
Copy link
Contributor

@afrind afrind commented Jan 18, 2025

Summary: By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 18, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

afrind added a commit to afrind/moxygen that referenced this pull request Jan 18, 2025
Summary:
Pull Request resolved: facebookexperimental#17

By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

afrind added a commit to afrind/moxygen that referenced this pull request Jan 18, 2025
Summary:
Pull Request resolved: facebookexperimental#17

By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

afrind added a commit to afrind/moxygen that referenced this pull request Jan 19, 2025
Summary:
Pull Request resolved: facebookexperimental#17

By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012
Summary:
This is the beginning of rewriting the control interfaces of MoQSession.  The goal is to have the interface match the key verbs of the protocol.  Currently:

Publisher:

  trackStatus
  subscribe
  fetch
  subscribeAnnounces

Subscriber:

  announce

Both:

  `goaway

With the exception of goaway, which has no response, each of these APIs is a coroutine.  The return value is a "Handle" to the corresponding state that supports the operations allowed (eg: SubscribeHandle = subscribeUpdate, unsubscribe).

The API is designed to be symmetric, such that MoQSession will implement these APIs for the caller, and will be given a callback to handle these APIs when they arrive via the network.

Reviewed By: sharmafb

Differential Revision: D67865127
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

afrind added a commit to afrind/moxygen that referenced this pull request Jan 22, 2025
Summary:
Pull Request resolved: facebookexperimental#17

By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012
afrind and others added 9 commits January 22, 2025 16:04
…SubscribeAnnounces

Summary: This changes the return type of `subscribe`, `fetch` and `subscribeAnnounces` to match the Publisher interface, and moves trackStatus and subscribeAnnounces handling from the ControlVisitor to a Publisher callback.

Reviewed By: sharmafb

Differential Revision: D67865163
Summary: These should work through the SubscriptionHandle rather than directly on the session.

Reviewed By: sharmafb

Differential Revision: D68170454
Summary:
I don't know why I never knew you could forward declare an inner class in a .h file and then fully define it in a .cpp file, but it's my new favorite trick to keep interfaces small while retaining the implicit friend behavior.

No functional changes.

Reviewed By: DanielFay22

Differential Revision: D67996498
Summary:
Remove subscribe from the ControlVisitor and implement the logic on the receive side to invoke publisherCallback_->subscribe after receiving SUBSCRIBE on the wire.  The result from the publisher's callback determines whether SUBSCRIBE_OK or SUBSCRIBE_ERROR is written.

Note a minor edge case is that it is now possible for the publisher to invoke `subscribeDone` before returning from the handler.  This probably should go out after OK (though not MUST?), so cache it and resend if this happens.

Class Relationships:

`MoQSession` is-a Publisher

`MoQSession::SubscribeTrackReceiveState` is-a `Publisher::SubscriptionHandle` (subscriber invokes subscribeUpdate/unsubscribe)
`MoQSession::TrackPublisherImpl` has-a `Publisher::SubscriptionHandle` (supplied by the publisher/application, the session will invoke subscribeUpdate/unsubscribe after receiving these messages on the wire).

Reviewed By: sharmafb

Differential Revision: D67996507
Summary:
Pull Request resolved: facebookexperimental#16

This one is the most straightforward

Reviewed By: sharmafb

Differential Revision: D68139006
Differential Revision: D68139010
Summary:
Pull Request resolved: facebookexperimental#17

By removing the last use of the control message queue, delete all control loops and control visitors

Differential Revision: D68139012
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68139012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants