Proposal: PubSub Architecture for relay #96
yuki-uchida
announced in
Announcements
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is my assumption.
sequenceDiagram
participant Producer(Client)
participant Consumer(Server)
participant Producer(Server)
participant Consumer(Client)
Producer(Client) ->> Consumer(Server): CLIENT_SETUP
activate Consumer(Server)
Consumer(Server) ->> Producer(Client): SERVER_SETUP
Consumer(Client) ->> Producer(Server): CLIENT_SETUP
activate Producer(Server)
Producer(Server) ->> Consumer(Client): SERVER_SETUP
Producer(Client) ->> Consumer(Server): ANNOUNCE
Consumer(Server) ->> Producer(Client): ANNOUNCE_OK
Consumer(Server) -->> Producer(Server): Forward<br/> TrackNamespace
Note over Producer(Client), Consumer(Client) : ANNOUNCE for Consumer (Client)
alt Consumer(Client) needs ANNOUNCE of a specific TrackNamespace
Consumer(Client) ->> Producer(Server): SUBSCRIBE_NAMESPACE
Producer(Server) ->> Consumer(Client): SUBSCRIBE_NAMESPACE_OK
alt exists the TrackNamespace matches to the Prefix
Producer(Server) ->> Consumer(Client): ANNOUNCE
Consumer(Client) ->> Producer(Server): ANNOUNCE_OK
end
alt updates the TrackNamespace matches to the Prefix
Producer(Server) ->> Consumer(Client): ANNOUNCE
Consumer(Client) ->> Producer(Server): ANNOUNCE_OK
end
end
Note over Producer(Client), Consumer(Client) : Branched by timing of SUBSCRIBE
alt already server subscribed
Consumer(Server) ->> Producer(Client): SUBSCRIBE
Producer(Client) ->> Consumer(Server): SUBSCRIBE_OK
Consumer(Server) -->> Producer(Server): Forward TrackName
Consumer(Client) ->> Producer(Server): SUBSCRIBE
Producer(Server) ->> Consumer(Client): SUBSCRIBE_OK
else not already server subscribed
Consumer(Client) ->> Producer(Server): SUBSCRIBE
Producer(Server) -->> Consumer(Server): Request Subscribe
Consumer(Server) ->> Producer(Client): SUBSCRIBE
Producer(Client) ->> Consumer(Server): SUBSCRIBE_OK
Consumer(Server) -->> Producer(Server): Response Subscribe completed
Producer(Server) ->> Consumer(Client): SUBSCRIBE_OK
end
Note over Producer(Client), Consumer(Client) : Data Stream Phase
loop
Producer(Client) ->> Consumer(Server): OBJECT
Consumer(Server) -->> Producer(Server): Cache and Forward
Producer(Server) ->> Consumer(Client): OBJECT
end
Note over Producer(Client), Consumer(Client) : End Phase
alt if needed
Producer(Client) ->> Consumer(Server): UNANNOUNCE
Consumer(Server) -->> Producer(Server): Request Stop New Subscription
Consumer(Server) ->> Producer(Client): ANNOUNCE_CANCEL
end
alt by SUBSCRIBE_DONE
Producer(Client) ->> Consumer(Server): SUBSCRIBE_DONE
Consumer(Server) -->> Producer(Server): Request Stop Subscription
Producer(Server) ->> Consumer(Client): SUBSCRIBE_DONE
else by UNSUBSCRIBE
Consumer(Client) ->> Producer(Server): UNSUBSCRIBE
Producer(Server) -->> Consumer(Server): Notify
Note over Consumer(Server), Producer(Client): if needed
Consumer(Server) ->> Producer(Client): UNSUBSCRIBE
end
deactivate Consumer(Server)
deactivate Producer(Server)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Discussion
current sequence is here.
But, now we can't cascade moq-wasm server, So we need to re-architecture for cascading.
I propose new architecture for cascading relay.
Beta Was this translation helpful? Give feedback.
All reactions