Question

In a peer-to-peer network, is every node connected to the network a client or do they act as both a server and a client? And how can you make the peer-to-peer network robust enough to support an unlimited number of nodes connected at one time?

Was it helpful?

Solution

Well, as it already states, its P2P. So, you could basically call them both client and server, it doesnt matter in this case (its doing the job of a server and client). When a peer in this kind of network needs to update something, it has to send the data once to EVERY peer it is connected. And meanwhile, this peer waits for any incoming data sent from the peers its connected to, and updates it accordingly. As for your second question - i wouldnt recommend using a P2P pattern for a unlimited amount of peers. for a higher number of peers, the network usage would grow even larger - because every single peer needs to be connected to every other peer and send data to all of them. not to mention that this could get the data desynchronised very easily. P2P is good for a smaller networks with a smaller number of peers. in that case, the raw sending speed will be higher than that of a server-client model, because there is no breakpoint in the connection(in a s-c model,this is the server). For a higher number of total Connections, i would stick to a Client-Server model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top