serverwebrtccommunicationp2ppeer

Is it possible to establish peer-to-peer communication between two remote clients without centralized server?


I had read the following paper but not able to undserstand how p2p communication established without server?

https://cse.engineering.nyu.edu/~ross/papers/ppliveWorkshop.pdf

Also not able to understand why WebRTC is p2p communication when it requires TURN server as an intermediate server.

I want to get correct concept regarding my question and want an explanation if possible.


Solution

  • TURN servers are there to solve the "1 way NAT" problem. If you have a client behind a NAT, then nobody can connect to it - the client must make a connection first. So if you have 2 clients trying to connect to each other, but neither can accept direct connections from the other, you're stuck. Unless you use an intermediary. ie a TURN server.

    Most P2P can connect without a server, but you have to find some way to tell a client about the other one in order to know who to connect to. You could, theoretically, send this detail in an email. But using a peer server to facilitate this discovery is easy and convenient. After the connection is made, then all further traffic is sent directly between the peers.