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

161 views Asked by At

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.

2

There are 2 answers

2
gbjbaanb On BEST ANSWER

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.

3
Eriks Klotins On

I did not read the paper, tl;dr.

However, the general idea behind P2P networks is to remove load from one centralized server and distribute it among peer nodes.

It works roughly the following way:

a. There is a server keeping track of all the peer nodes

b. There is content divided into chunks

b. The peer nodes who know which chunks they have and can serve to others and which chunks are missing and required from others.

  1. A new node registers with the server and requests a list of other peer nodes.

  2. The new node (A) talks to peer nodes to find out who has the missing chunks and downloads the chunks.

  3. Once another new node (B) joins the network, node A can serve some of the content to it.

Depending on the application, there could be some optimizations built in. For instance, in a BitTorrent network, all the content chunks are always required. When serving real-time content, chunks may expire fast and can be removed from the network.

Edit: To answer your specific question - the server is required for nodes to discover each other.