You are on page 1of 5

University of Bahrain Computer Networks I

College of Information Technology ITNE231


Department of Computer Engineering 20th October 2020
Dr. Ebrahim A. Rahman

ST_Name: ISA ABDULHADI MAHDI ID:20174011 SEC: 01

Case Study 1
Due date: 31st, of October 2020.
1) Suppose that you are managing a software application development project, and you have
developed a chat application (similar to WhatsApp) using the server-based architectural style.
[10 points]

a. What advantages are there from the engineering perspective, to use this server-based
style? You should briefly (in two sentences) describe 4 such advantages.

From an engineering perspective, the server style gives you several positive aspects, including the centralization of
data control by the dedicated server so that a program or unauthorized client cannot damage the system,
Otherwise, there is the advantage of scalability by increasing the capacity of servers separately without any
impacts.

Among the most important benefits is security, Servers have better control access and resources to ensure that
only authorized clients can access or manipulate data and server updates are effectively administered, Also, do
not forget the Backup & Restore feature All the data stored on the server as backup or regular use it can be access
at any time anywhere.

b. What advantages are there from the business perspective, to use this server-based
style? You should briefly (in two sentences) describe 4 such advantages.

From a business perspective, the server offers you better protection, server provides your business
with network security, this can be considered one of the best and most significant benefits of a server.
By creating distinguished group and individual accounts, individual right can be assigned to users based
on the nature and amount of data they can access on basis of their requirements, the server system Also
aids in proper virus management One of the greatest threats faced by your network is a possible virus
or spyware infection. Hence, an antivirus system is an absolute necessity these days.
The server provides your business with a centralized back up facility, server can be considered a
blessing in this aspect because it aids a lot in smoothing up your data backup process. You will be
able to back up all your data including your mails to a centralized storage on your server and reduce
all the hassles associated with data losses thereby, improving your workplace productivity at the same
time. Otherwise server gives your business a whole lot of reliability, the server, is an effective solution
to serious issue. Server hardware maintains redundant hardware to tackle the issues at moment’s
notice, the failure of one device doesn’t guarantee the failure of the entire server system.

c. What advantages would then be to switching over to P2P architectural style? Describe
3 such advantages to be primarily for the users, and 3 such advantages to be for the
system.

P2P networks are very resilient to the change in peers; if one peer leaves, there is minimal impact on the
overall network. If a large group of peers join the network at once, the network can handle the increased
load easily. Due to its decentralized nature, P2P networks can survive attacks fairly well since there is no
centralized server.

P2P networks have many advantages. For example, there is no central server to maintain and to pay for
(disregarding tracking servers), so this type of networks can be more economical. That also means there is
no need for a network operating system, thus lowering cost even further. Another advantage would be
there is no single point of failure, unless in the very unlikely case that the network is very small.

2) A file of F=106 bits is distributed to N peers. The server has an upload rate of 𝑈𝑠𝑝𝑒𝑒𝑑 =105 bps.
Each peer has a download rate of 𝐷𝑖 =105 bps and an upload rate of 𝑈𝑖 =50000 bps. For N=1
to 10, and for both client-server and P2P architectures, plot a single graph with minimum
distribution time on the y-axis and N on the x-axis. Show the calculation for N=1,
2, and 3. Use an excel sheet to show all the values. [15 points]

-------------------------------------------------------------------------------------------------------
For calculation minimum distribution time for client-server architecture distribution:

𝑁𝐹 𝐹
C-S = Max { 𝑈𝑠 ,𝐷𝑚𝑖𝑛}
for calculation minimum distribution time for P2P architecture distribution:

𝑁𝐹 𝐹 𝑁𝐹
P2P = Max { , , }
𝑈𝑠 𝐷𝑚𝑖𝑛 (𝑈𝑠+∑𝑛
𝑘=1 𝑈𝑖 )
n = Number of the peers
--------------------------------------------------------------------------------
Where FILE =106 (𝑏𝑖𝑡𝑠) = 1000000(𝑏𝑖𝑡𝑠)

Uspeed = 105 (𝑏𝑝𝑠) = 100000(𝑏𝑝𝑠)


10×106 106
C-S = MAX { , } = {100,10} = 100 Sec
105 105
106 106 10×106 50
P2P = MAX { 5 , 5 , 5 ∑10 } N=10 = {100,100, }
10 10 (10 + 𝑘=1 50000) 3
= 16.667 Sec

Now For N = 1
106 106 10×106 200
MAX {105 , 105 , (105+∑1 50000)} N=10 = {100,100, }
𝑘=1 3
=66.67 Sec

For N = 2
106 106 10×106
MAX {105 , 105 , (105+∑2 50000)} N=10 = {100,100,50}
𝑘=1
=50 Sec

For N = 3
106 106 10×106
MAX {105 , 105 , (105+∑3 50000)} N=10 = {100,100,40}
𝑘=1
=40 Sec
So that minimum distribution time for client-server is 100 Sec and for
P2P is 16.667 Sec and for N=1 is 66.67 Sec and N=2 is 50 Sec and N=3 is
40 Sec.

Chart
80
66.67
70

60
50
Time in Second

50
40
40 33.3
28.57
30 25
22.22 20 18.18 16.67
20

10

0
0 2 4 6 8 10 12
N of Peers

3) Investigate the BitTorrent architecture and answer the following: [10 points]
i. Describe the following entities:
a. Static metainfo file.
– Static ‘metainfo’ file to contain necessary information about the torrent file:
• Name of the file that you want to download.
• Size > size of the file.
• Checksum > to check data for errors
• IP address > (URL) of the Tracker
• Pieces <hash1, hash2, hash
• Piece length
b. Tracker
The tracker is a special server that keeps track of the connected computers. The tracker shares
their IP addresses with other BitTorrent clients in the swarm, allowing them to connect to each
other.

c. Seed.
Seeding means sharing a file(s) with other peers. After a torrent job finishes downloading, if you
leave the torrent job seeding, it uploads the file(s) to other peers so they can enjoy them too.

d. Leecher.
a leech is a BitTorrent user who downloads the files shared by the seeds and does not seed back
to other users.

ii. Add these entities together and explain how the BitTorrent works.

The first step in publishing a file using BitTorrent is to create a metainfo file from the file that you want to publish.
The metainfo file is called a “torrent”. The torrent file contains the filename, size, hashing information and the URL of
the “tracker”. The “torrent” is needed by anyone who wants to download the file the torrent is created from. The
torrent file can be distributed by e-mail, IRC, http etc. The torrent is created by using a free program. This functionality
is also commonly included in the BitTorrent clients. To download or “seed” a file, you need a BitTorrent client. The
BitTorrent client is a free application that administrates the download procedure. There are several different BitTorrent
clients available. They all support the standard BitTorrent protocol, but may differ and be incompatible with each
other regarding certain features. A BitTorrent download is started by opening the torrent file in the BitTorrent client.

You might also like