计算机网络系列(10)之应用场景Peer-to-peer systems

来源:互联网 发布:淘宝主图视频制作教程 编辑:程序博客网 时间:2024/06/06 02:47

1. Peer-to-peer systems
All participating parties are called peers. A peer downloads a file from one or more peers.

1.1. Centralized P2P systems
Each peer regularly sends an update message to a directory server to report its existence and available files.

1.2. Decentralized P2P systems
The decentralized system uses multiple directory servers. Each directory server supports some peers and they form a centralized subsystem.

1.3. Distributed P2P systems
The peers are organized in an unstructured manner.

2. Questions
Q1: Consider the following centralized peer-to-peer system.

这里写图片描述

Suppose peer A wants to download a file which can only be
provided by peer B. Draw a diagram to show the steps by which
peer A can find out the IP address of peer B.

Peer A –> Dictory server: Where is file X?
Dictory server –> Peer A: You can find find X from Peer B, whose IP address is 12.32.12.3.
Peer A –> Peer B: Peer A use the IP address 12.32.12.3 to connect to Peer B.

Q2: Consider the following decentralized peer-to-peer system.

这里写图片描述

Suppose a new peer A wants to download a file which can only be
provided by peer B. Draw a diagram to show the communication
steps by which peer A can find out the IP address of peer B.

The new peer A request to join the decentralized network from asking a bootstrapping node.

The bootstrapping node select and send IP address of directory server 1.

The new peer A join the distributed network by connecting to directory server 1.

The new peer A send a request to directory server 1 and ask for a file.

Directory server 1 find the file is not at local disk, then send a request to directory server 2.

Directory ask find that the file is at peer 2, then return the IP of peer 2 to directory server 1.

Directory server 1 return the IP of peer 2 to peer 1.

Peer 1 connection to peer 2.

Q3: Consider the following distributed peer-to-peer system.
Suppose peer A wants to download a file which can only be
provided by peer B. Draw a diagram to show the communication
steps by which peer A can find out the IP address of p

这里写图片描述

Suppose peer A wants to download a file which can only be
provided by peer B. Draw a diagram to show the communication
steps by which peer A can find out the IP address of peer B

The new peer A request to join the distributed network from asking a bootstrapping node.

The bootstrapping node returns the IP addresses of active peers to the new peer A.

The new peer A connect to active peers.

Peer A floods a query to its neighbors, each neighbor node floods the query to its neighbor nodes until finding peer B.

If peer B has the requested file from peer A, it directly response to Peer A.

Q4: How could BT support an extremely large number of peers all over the world?
BT applies the centralized design for each shared file. Each shared file is divided into pieces, where each piece has a default size of 256 kbytes. In each centralized system, a peer can download multiple pieces of the shared file from multiple peers at the same time.

Q5: Consider choking in BT.
case a. what are the objectives of choking?
Encourage peers to upload files.
Encourage high performance: upload faster and download faster.

case b. discuss one possible shortcoming of the Cohen’s choking
method.
If peer A does not upload to peer B, then peer B will not upload to peer A.

case c. suggest how you would overcome the above shortcoming.
Randomly select few peers to unchoke, even these few peers do not upload me anything.

Q6: Suppose you are the Technical Manager of an ISP. Now you find that some customers use BT to download movies and hence they generate heavy traffic. As a result, the other customers suffer from slower Internet access. Discuss how you would tackle this problem.
Use a QoS router which enables each users share equal bandwidth.

Q7: Suppose a user uses BT to download a movie. Discuss the risk of being identified for violating the copyright law.
If he downloads non-authorized products, he may be held accountable for the corresponding legal responsibility.

Q8: Consider Skype (Decentralized P2P applications):
case a: Skype maintains a very large number of time-varying users records. Why are these records time-varying?
(unique skype username, IP address) are recorded. However,
The same person may have several accounts.
The same person may have different IPs to access his skype accounts.

case b: Skype answers a very large number of users’ queries. Why?
Each user needs to queries the IP address of a specific skype user account.

case c: How could Skype use a small number of machines to
maintain so many time-varying records and answer so many
queries?
A login server is used to authenticate each newly online
user and assign this user to one of the supernodes.
To search an online Skype user (i.e., find out his current IP
address), it is inferred that controlled flooding is used
among the supernodes.

重点1:P2P的三类,centralized P2P, decentralized P2P以及distributed P2P。他们之间相应的dictory server, 需不需要bootstrapping node等具体运行时候的细节,过程。

重点2:BT的一个文件对应一个centralized P2P network,BT的choke algorithm这些核心的内容的解释理解:为什么?可不可以去掉?

重点3:skype的decentralized P2P network,skype username, IP之间的寻址。采用supernodes,然后仅限于supernodes之间flooding requests等。

原创粉丝点击