Peer to Peer
- Definition
- A pool of servers, distributing content. Each document may be located in one or servers on the network.
This pattern is mainly used to for media sharing: video, games, books. Each media item is located on one or more servers, and servers can be added and removed at will.
How does it work?
There are two aspects to be considered. The first is: how do the nodes know that the others exist?
A new node is added when a person adds the address of this node to the address table of some other node already in the network.
The nodes themselves forward the addresses to the nodes with which they are directly linked.
The other aspect is resource discovery: how does one node know where to find a resource?
The simple solution is to send a request to all peers and wait for the response.
The advanced solution is the use of some sort of a data structure that tells each node where to find a resource.
Examples
- USENET
- Filesharing services like Napster, Kazaa, and many others
Where does it come from?
Though the concept was much older, the architecture became popular with the advent of Napster (in 1999), the filesharing service that got into trouble because it was used for sharing illegal music and video copies.
When should you use it?
Problems
Common implementation techniques
- Distributed hashtable for resource detection