This PR is part of the migration of MembraneLive to Jellyfish.
To better understand my motivation behind this PR:
There were two modules responsible for keeping track of a webinar state: MembraneLive.Event and MebraneLiveWeb.EventChannel.
MembraneLive.Event - responsible for spawning RTC Engine, connecting peers, and adding HLS Endpoint. It keeps track of peers, hls and webrtc-related stuff.
EventChannel - using Phoenix.Presence stores all information about all the users connected to the server.
Logic connected to maintaining webinars is partly in EventChannel which doesn't have its own state (only Presence which keeps the state of each user). The other part is inside Event which doesn't have the full state of the event because it's only responsible for the stream, not the whole event.
That's why I renamed Event to Room because it's only responsible for a stream, not the whole Event.
I also created a new module named RoomController which is responsible for controlling live times of events.
This way all the logic is in one place which is way better and easier to maintain.
Maybe in the future, It would be better to create one module responsible for both streaming and controlling event but I don't think it should be a concern of this PR.
This PR will also make it easier to rewrite Room to Jellyfish.
This PR is part of the migration of
MembraneLive
toJellyfish
.To better understand my motivation behind this PR: There were two modules responsible for keeping track of a webinar state:
MembraneLive.Event
andMebraneLiveWeb.EventChannel
.Phoenix.Presence
stores all information about all the users connected to the server.Logic connected to maintaining webinars is partly in
EventChannel
which doesn't have its own state (onlyPresence
which keeps the state of each user). The other part is insideEvent
which doesn't have the full state of the event because it's only responsible for the stream, not the whole event.That's why I renamed
Event
toRoom
because it's only responsible for a stream, not the whole Event. I also created a new module namedRoomController
which is responsible for controlling live times of events. This way all the logic is in one place which is way better and easier to maintain.Maybe in the future, It would be better to create one module responsible for both streaming and controlling event but I don't think it should be a concern of this PR.
This PR will also make it easier to rewrite
Room
to Jellyfish.