In this programming assignment, you will implement a decentralized peer-to-peer network architec- ture (P2P), including the basic implementation of the BitTorrent protocol (BTP). General P2P architec- tures can be classified into centralized and decentralized, In P2P centralized architectures, new peers send a request to the Traker (normally done via HTTP) requesting a list containing all the IP addresses of the peers that are already connected to the P2P network sharing the same file. The tracker then, replies with a response containing such list. In P2P decentralized architecture, each peer is also a Traker, and it can share only limited resources because it only sees the partial network. On the other hand, P2P decen- tralized networks avoid single point of failure since they do not depend of centralized trackers. Examples of P2P applications that are/were implementing centralizing architectures are Nasper, the Berkeley Open Network Infrastructure (BOINC) and some versions of BitTorrent. Other versions of BitTorrent implement decentralized architectures as well. 1. General terminology in a P2P BitTorrent protocol (BTP):

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter13: Internet And Distributed Application Services
Section: Chapter Questions
Problem 15VE
icon
Related questions
Question


In this programming assignment, you will implement a decentralized peer-to-peer network architec-
ture (P2P), including the basic implementation of the BitTorrent protocol (BTP). General P2P architec-
tures can be classified into centralized and decentralized, In P2P centralized architectures, new peers send
a request to the Traker (normally done via HTTP) requesting a list containing all the IP addresses of
the peers that are already connected to the P2P network sharing the same file. The tracker then, replies
with a response containing such list. In P2P decentralized architecture, each peer is also a Traker, and it
can share only limited resources because it only sees the partial network. On the other hand, P2P decen-
tralized networks avoid single point of failure since they do not depend of centralized trackers. Examples
of P2P applications that are/were implementing centralizing architectures are Nasper, the Berkeley Open
Network Infrastructure (BOINC) and some versions of BitTorrent. Other versions of BitTorrent implement
decentralized architectures as well.
1. General terminology in a P2P BitTorrent protocol (BTP):
(a) Peer
Peers are those who are uploading and downloading data at the same time from other peers.
Note that they do not posses the whole resource that is being shared, only some pieces of it.
Peers become seeders for a specific file when they downloaded all the pieces from that file.
(b) Swarm
A swarm is a network of peers, leeches and seeders sharing the same file. The more seeders
a swarm has, there will be faster downloads rates among peers. In other words, there will be
better chances of getting the file faster at high download speed.
(c) Traker
Trackers in a semi-decentralized network a tracker is a server which only function is to send the
ip addresses of all the peers in the swarm. In a decentralized network, all the peers are also
trackers.
(d) Metainfo File
The metainfo file is also called as a torrent file and has a .torrent extension. This file mainly
contains encoded information regarding the URL of the tracker, name of the file, and hashes of
the pieces of the file for verifying downloaded pieces of the file.
1(e) Torrent
A torrent file is a file that contains meta-info (not the actual data) of the file that is being shared
on the swarm by all peers connected to it. It normally has extension .torrent and contain useful
info about the trackers, and the pieces of the file being shared in the network such as length,
SHA1 hashes of all the pieces
(f) Piece
A file shared in P2P is divided in pieces by the seeder. All the pieces from a torrent have the
same size with the only exception of the last piece which may have the leftover bytes. The
length of a piece is normally 16KIB, however this is defined by the implementer. For example,
a piece could also have a length of 32KIB, Info about the file,the length of its pieces, and the
hashes of the pieces are found in the Metainfo file (the file with extension .torrent)
(g) Blocks
Pieces from a torrent may became huge in size, we need to divide them into blocks. Blocks are
the basic structure transmitted in the swarm byte by byte. For example if a piece size is 16KIB,
blocks in that piece will be 2KIB. So, the piece will be split into 8 blocks. The final piece of a
f

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning