Trying to understand WebRTC Signaling Channels

611 Views Asked by At

Help me understand how the signaling works in WebRTC. Specifically, if I have a given channel, say using Amazon Kinesis or a similar product, how would a peer know which peer to call? Do I need a dedicated channel per set of all peers that need to connect?

Say we have 5 peers and we like to have the following connection topo: i.e.

Peer1<->Peer2
Peer2<->Peer3
Peer4<->Peer5

When peer1 creates offer and sends them to signal channel1, how would Peer2 know this offer is only intended for them? How would Peer4 know not to consume that offer?

Do we need one channel per set of peers that need to connect? In this case, probably two channels? one that handles 2<->1 2<->3 and one for 4<->5?

1

There are 1 best solutions below

5
On

KVS is designed right now to connect peers 1:N, so you have one master and it connects too many viewers. By design Peer2 and Peer3 can not see each other.

         | -> Peer2
         | 
Peer1 -->|
         |
         | -> Peer3

I am not sure, but it sounds like you are looking for a mesh topology, where every peer can see each other? This is what you usually want for conference rooms, or an n:n setup.

Peer1 -> Peer2
Peer1 -> Peer3
Peer2 -> Peer3

This is not available today, but if this is something we are exploring adding.