P2P's architectures
In 'pure' P2P networks:
- Peers act as equals, merging the roles of clients and server
- There is no central server managing the network
- There is no central router
However intermediary servers or nodes may be needed to connect computers with each other or to research files within the network.
P2P networks can be classified in various categories according to their organizations:
Centralized P2P Networks
For example: Napster, Audiogalaxy or eDonkey2000.
Once you have downloaded and installed a P2P client, if you are connected to the Internet you can launch the utility and you are then logged into a central indexing server. This central server indexes all users who are currently online connected to the server. This server does not host any files for downloading.
The P2P client will contain an area where you can search for a specific file. The utility queries the index server to find other connected users with the file you are looking for. When a match is found the central server will tell you where to find the requested file.
You can then choose a result from the search query and your utility when then attempt to establish a connection with the computer hosting the file you have requested. If the connection is successful, you can begin downloading the file.
Decentralized P2P Networks
For example: Gnutella
With this approach, we could eliminate the need for expensive centralized servers. With a distributed index, each content broker in the network keeps an index of local files as well as an index of files stored on neighboring content brokers. When a content broker receives a query from a peer, it first checks to see if the query can be met locally. If it cannot, it uses the local index to decide which content broker to forward the request to. The index on each server is not static and changes as files move through the system.
If it is well designed, it provides the best performance and scalability of any solution. It also has a very high tolerance for signal point failure because a content broker contains only small indexes compared to a centralized server. Therefore, if one content broker goes down, the network will still function properly.
The biggest problem with this type of indexing systems is cache coherence of all the indexed data. If a file is changed locally by a peer, then the content broker would be unaware that it had been changed; later, if another peer were to request that particular file, the content broker would return an out-of-date copy of that file. The overhead in keeping everything up-to-date and efficiently distributed significantly hinders scalability.
Most security issues in P2P networks are due to file sharing. Users are looking for:
Anonymity
Some P2P protocols attempt to hide the identity of network users by sending all traffic through intermediate nodes.
Encryption
Some P2P networks encrypt the traffic flows between peers.

