unsetbit / p

Peer-to-peer networking with browsers
http://unsetbit.com/p
Other
411 stars 27 forks source link

Many peers #11

Closed Tomas-M closed 9 years ago

Tomas-M commented 9 years ago

Hello, few simple questions, if I may, no issue.

What happens if many peers (say 5000) are using 'p'? Every peer is going to be connected to every other? When a new peer joins the network, all 5000 other peers receive the new peer's ID?

Is 'p' practically usable with say 50 000 peers?

Thank you

unsetbit commented 9 years ago

Hmmm, good question. I don't actually have an answer for you. I don't recall anything specific in the spec which limits the number of peer connections, but I imagine each browser has a sanity limit. So, whatever the case, the limiting factor wouldn't be p, but the underlying technology. P uses memory which increases linearly with the number of connections, and even at 50k peers (if the browser/computer could sustain it) it would be a trivial amount of memory.

onramps implementation tries to connect everyone to everyone else, so unless peers themselves are actually filtering who they want to establish connections to, by default, when using onramp as the primary signalling channel (as in the examples), you're going to end up with a full-mesh network with each node connected to every other node.