[Programming] Peer-to-peer Network (P2P) - P2P Network Model

xiaoxiao2021-03-06  40

1.1.1 P2P network model

1.1.1.1 Static Configuration Model

The static configuration model is a relatively static and simple peer positioning model. In this model, each peer is exactly known in the position of other peer points in its P2P network, and the shared resource content thereof.

Disadvantages: The network cannot cope with unpredictable random events and temporary changes, such as random access and exit networks.

Advantages: The entire network is very stable in front of external attacks.

1.1.1.2 Dynamic Configuration Model (Catalog)

In the catalog model, one or more servers with special purposes provide directory services for peers. To the directory service to register your own information (its name, address, resource, and metadata), and use the directory service to locate other peers by using the directory service based on the query in the directory server. Napster model is a typical network model using dynamic configuration model (directory)

Disadvantages: Unsafeness of the network (server failure, all the peers of the server), cost problem.

Advantages: Improved network manageability, making it easy to find and update shared resources.

1.1.1.3 Dynamic Configuration Model (Network)

It consists of many pairs, these peers are very similar. There is no dedicated directory server. The right point must use their network to locate other peers. There is no peer to know the structure of the entire network or constitute each peer of the network. I hope that when another peer position in the network, it issues a query request and passes to the neighbors. These neighbors try to meet this request. If these neighbors cannot fully meet this request, they will pass the request to their neighbors to push. GNUTELLA model is a typical network model using dynamic configuration model (network)

Disadvantages: It is easy to cause network congestion, and it is not suitable for large network applications.

Advantages: Greater flexibility during the query process.

1.1.1.4 Dynamic Configuration Model (Multicast)

In addition to nodes in the network do not have to help find, multicast models and network models are similar. This model uses the characteristics provided by the network to locate and confirm the peer and resources. Right to use IP multicast technology to regularly declare his existence, after detecting this message, extract the host name and port number, and use this information to establish normal TCP / IP connection.

Disadvantages: The routing multicast communication of many sub -nets is a very complex topic; the Internet is not friendly to multicast.

Advantages: Reducing network traffic does not collapse due to any peer of peers in the peer group.

1.1.1.5 Dynamic configuration model (hash)

No special server is required, all peer-to-the-levels in the network are servers and bear the functions of small servers. First assign a virtual address (VID) in each of the networks, and use a keyword (key) to indicate its available shared content. Take a hash function, this function can convert KEY to a hash value h (key). The definition of neighboring network nodes is adjacent to the hash value. When the information is released, the (key, vid) binary group is published to the node with similar addresses with the H (Key), where the VID indicates the storage location of the document. When the resource is positioned, the binary group (KEY, VID) can be quickly obtained from H (Key) to similar nodes to obtain the storage location of the document.

Disadvantages:

advantage:

转载请注明原文地址:https://www.9cbs.com/read-69322.html

New Post(0)