2.6 Peer-to-Peer Applications Flashcards

1
Q

Name two different applications that are particularly well-suited for P2P designs.

A
  • file distribution, where the application distributes a file from a single source to a large number of peers. File distribution is a nice place to start our investigation of P2P, as it clearly exposes the self-scalability of P2P architectures. As a specific example for file distribution, we’ll describe the popular BitTorrent system.
  • The second P2P application we’ll examine is a database distributed over a large community of peers. For this application, we’ll explore the concept of a Distributed Hash Table (DHT).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Distribution time for the client-server arch.

A
  • The server must transmit one copy of the file to each of the N peers. Thus the server must transmit NF bits. Since the server’s upload rate is u s , the time to distribute the file must be at least NF/u_s .
  • Let d min denote the download rate of the peer with the lowest download rate, that is, d_min = min{d_1 ,d_p ,…,d_N }. The peer with the lowest download rate cannot obtain all F bits of the file in less than F/d min seconds. Thus the minimum distribution time is at least F/d_min .

For N large enough, the client-server distribution time is given by NF/u s . Thus, the distribution time increases linearly with the number of peers N.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Distribution time for the P2P arch.

A
  • At the beginning of the distribution, only the server has the file. To get this file into the community of peers, the server must send each bit of the file at least once into its access link. Thus, the minimum distribution time is at least F/u_s . (Unlike the client-server scheme, a bit sent once by the server may not have to be sent by the server again, as the peers may redistribute the bit among themselves.)
  • As with the client-server architecture, the peer with the lowest download rate cannot obtain all F bits of the file in less than F/d_min seconds. Thus the minimum distribution time is at least F/d_min .
  • Finally, observe that the total upload capacity of the system as a whole is equal to the upload rate of the server plus the upload rates of each of the individual peers, that is, u_total = u_s + u_1 + … + u_N . The system must deliver (upload) F bits to each of the N peers, thus delivering a total of NF bits. This cannot be done at a rate faster than u_total . Thus, the minimum distribution time is also at least NF/(u_s + u_1 + … + u_N ).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In p2p, which chunks shoulda user request first from its neighbors?

A

uses a technique called rarest first. The idea is to determine, from among the chunks she does not have, the chunks that are the rarest among her neighbors (that is, the chunks that have the fewest repeated copies among her neighbors) and then request those rarest chunks first. In this manner, the rarest chunks get more quickly redistributed, aiming to (roughly) equalize the numbers of copies of each chunk in the torrent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Tit for tat.

A

BitTorrent peers use tit-for-tat strategy to optimize their download speed.[10] More specifically, most BitTorrent peers use a variant of Tit for two Tats which is called regular unchoking in BitTorrent terminology. BitTorrent peers have a limited number of upload slots to allocate to other peers. Consequently, when a peer’s upload bandwidth is saturated, it will use a tit-for-tat strategy. Cooperation is achieved when upload bandwidth is exchanged for download bandwidth. Therefore, when a peer is not uploading in return to our own peer uploading, the BitTorrent program will choke the connection with the uncooperative peer and allocate this upload slot to a hopefully more cooperating peer. Regular unchoking correlates to always cooperating on the first move in prisoner’s dilemma. Periodically, a peer will allocate an upload slot to a randomly chosen uncooperative peer (unchoke). This is called optimistic unchoking. This behavior allows searching for more cooperating peers and gives a second chance to previously non-cooperating peers. The optimal threshold values of this strategy are still the subject of research.

src: wikipedia

How well did you know this?
1
Not at all
2
3
4
5
Perfectly