Allow Standalone nodes to operate in an orchestrated environment#138
Allow Standalone nodes to operate in an orchestrated environment#138
Conversation
|
Slight error on watching |
|
Seems to be fully functional now, but would appreciate feedback on a better way of handling the switch between interacting with the EdgeNodeServiceConnection (if using a relayed stream) vs XServiceConnection (if streaming directly to the Standalone node). |
| // If we're an Edge node and this is a first viewer for a given channel, | ||
| // request that this channel be relayed to us. | ||
| if ((configuration->GetNodeKind() == NodeKind::Edge) && (pendingViewers == 0)) | ||
| if (orchestrationEnabled && (pendingViewers == 0)) |
There was a problem hiding this comment.
Thinking through a potential ambiguity in this codepath -
Consider a scenario where a standalone FTL instance receives a watch request for a channel that has not started streaming yet. The standalone FTL server will subscribe to the channel via orchestrator.
Afterwards, the streamer actually begins streaming, but connects to the same standalone FTL server.
I suspect the orchestrator will fulfill the standalone FTL server's subscription and notify the server to relay the stream to itself.
Since only one stream can exist per channel, the standalone server will probably terminate the stream (or maybe worse, haven't really traced it through all the way).
We'll probably need special behavior to either
1.) Enlighten the orchestrator so it can handle when a standalone server tries to publish a stream on the same channel that it previously has subscribed to
2.) Enlighten the standalone FTL server so it can handle "transitioning" between a pending orchestrator relay and a "direct" stream
Thoughts?
|
Getting back to this now, if I remember correctly there's a single remaining bug:
Will need to think on this tomorrow. |
Essentially what this allows for is a node to act within an orchestrator network as both an ingest & edge. Serving up video directly from itself, and proxying it from other nodes as required. Working on one server as a proof of concept, but would appreciate a logic review!
Currently a test server is available at:
do-nyc3-combo1.kjfk.live.glimesh.tv. You can easily stream to it and watch on Glimesh.tv and test edge functionality by using https://glimesh.github.io/janus-ftl-player/ and your favorite channel_id.Checklist
combo1stream fromedge1while configured asstandalonecombo1stream fromcombo1while configured asstandaloneingest1stream fromcombo1while configured asstandalone