muaz-khan/WebRTC-Scalable-Broadcast

Only three connection are connecting.How to connect more then three users?

sdrraja opened this issue · 4 comments

Only three connection are connecting.How to connect more then three users?

Is a webinar suit with that?

It isn't an ultimate solution however it can help as following:

  1. Webinar is initiated by a media server (broadcaster is streaming to server)
  2. Root-level nodes pulls stream from media server
  3. Nested 5-6 child nodes can fetch from root-nodes (using peer-to-peer methods i.e. using this scalable-broadcast techniques)

E.g.

broadcaster started streaming to mediaServerXYZ

# these are top-level nodes that pulls directly from server
peer1 connected with mediaServerXYZ and receiving stream directly from the server.
peer2 connected with mediaServerXYZ and receiving stream directly from the server.
peer3 connected with mediaServerXYZ and receiving stream directly from the server.

# these are nested/child nodes that uses p2p techniques to get relaying stream
# these nodes never connects with media server 
#       (until special case is defined i.e. if any of the top node leaves)

# peer1 can serve 3 or 5 users
normalUser1 connected with peer1
normalUser2 connected with peer1
normalUser3 connected with peer1

# peer2 can serve 3 or 5 users
normalUser4 connected with peer2
normalUser5 connected with peer2
normalUser6 connected with peer2

# peer3 can serve 3 or 5 users

and so on

# note: normalUser* merely receives. Never relays.

i.e. 100 top-level nodes are fetching stream from the server, however they are further relaying to 300 or 500 nested/child nodes.

@muaz-khan thank you for a explanation. Today tried your code of this scalable broadcast in both, in chrom and firefox, it works great with tandem of audio plus video. But don't know how to test with many users.
Anyway it is a nice solution. Althou I don't quiet understand wether should a publisher to be speaking one to many subscribers or this is like a net, graph with dependents.
However by the mediaserver do you mean a licode and stuff solution or a node.js instance? Or this should be a tandem node.js plus licode mediaserver?