Wednesday, May 23, 2007

Understanding p2p

Recently, I had a small little discussion with a friend over what exactly defines the p2p technology. He thought that it uses the client's LAN when possible to speed up connections. (Specifically in this case, we were talking about a p2p extension for Firefox, AllPeers)
ME: However....AllPeers doesn't use the host computer 's local LAN to transfer files - it uses the Internet to connect to a remote AllPeers session (as far as I know). Therefore I could simply set up an AllPeers share on my computer with the Tournament demo in it. I'll do that, keep Firefox running, go to school, and then we can use your Firefox w/ AllPeers to connect to my home computer and download it that way.

Of course you could do the exact same thing with your personal home computer. It's just a matter of convenience and preference.

HIM: What is the point of p2p if it has to go through something else?

ME: You're right in saying that p2p doesn't "go through something else" - however, you're wrong in saying it would use the school's LAN to achieve this. You need to understand some basic p2p theory first to understand what it's actually going to end up doing. (By the way I recommend reading all of this - I worked hard on it.. lol)

The only two reasons to use p2p are that (1) it allows you to initiate a direct connection between client to client, thusly eliminating the need for a mediating central server and (2) it distributes the clients resources (bandwidth, etc) to each other equally.

This is in juxtaposition to the client-server model in which everyone downloads from one main server (similar concept to the Boyd drop boxes and shared drives in general). This main server gets considerably drained as more people access it, decreasing download speeds for the individual.

P2P solves this problem under optimal conditions and is in those cases faster that the client-server model. However, we need to define optimal conditions. They are, simply put, a relatively speedy Internet connection, high bandwidth, and (most importantly) a relatively sizable number of clients that are connected at the same time to the p2p network. The number of clients is so important because each one serves as a node to both distribute already existent resources (like bandwidth, storage space, and computing power) and to add their OWN bandwidth, storage space, and computing power resources.

Let’s create a scenario - Let’s say that there are only two people sharing resources on a p2p network. The speeds will undoubtedly be slower than a traditional client-server setup in this instance because the two computers are probably average home computers using their relatively small, restrictive, and slow RoadRunner internet bandwidth. They are sharing very little bandwidth and computing powers between themselves. (I know that from experience), in comparison to simpy connecting to a server that in all likelihood will probably have a T3 (or whatever the major Interent connection is) connection that is routing incredible amounts of bandwidth to it for the public to access and utilize.

Of course if the number of people in the theoretical p2p network I made up increases, then its overall power in comparison begins to completely own.

So the problem(s) at school are that when we use AllPeers, we are distributing the school's bandwidth to *each other*, essentially negating any speed benefits of a p2p network. We are still using the Internet to do this because AllPeers was designed for non-Intranet file sharing and it doesn't know how to interface with a nearby Local Area Network/Intranet. (put more simply, AllPeers has no idea that we are in a LAN config at school - for all it knows, the computer next to you in the CompSci lab is located in China.) Logically, why would AllPeers use the LAN to do sharing? That would defeat the purpose. If you already have a LAN, you essentially have one major part of a p2p network set up already between all the computers in the network. Think about shared network folders in Windows. Machine to machine file transfer. LAN. Partly p2p.

If AllPeers used the LAN, it'd be exactly the same as about a thousand other programs out there, including Microsoft's built in networking tools and capabilities themselves.

We can still do it your way but I guarantee you it will not be any faster that your traditional downloads and it definitely won't use the school's LAN. It's just a convenient way to set up a private temporary network that uses the Internet to gather people in a p2p pool of clients. But in our case, two people isn't going to make any download speeds very fast.




2 comments:

buy generic cialis online said...

Well worth to read this article, thanks for sharing this information. With this article you offered me got a chance to know about this, anyway i say Great Article! and waiting for you next article about this interesting subject.

Web Development Company said...

Lot of useful points are there. Its really keeps me updated.
Clone Script| Super Bowl 2012|