Use your favorite language, and write a small program to simulate the minimum distribution time forboth Client-server and P2P architectures. The submission will include 3 parts. No attachment.1....

1 answer below »
Please refer to the screenshot attached. Any language is fine. It just to stimulate and the code and graph must be attached. Thank you!


Use your favorite language, and write a small program to simulate the minimum distribution time for both Client-server and P2P architectures. The submission will include 3 parts. No attachment. 1. Part 1: Visual graph plotting both C-S and P2P architecture minimum file distribution time over a given number of computers. Axes should be labeled with their description and unit of measurement when applicable. Include your full name at the end of the description of the axes in the plot. E.g. Number of Clients (N) - Huong Le (5pt) 2. Part 2: Explain your approach and brief me on what you did in your code (2pt) 3. Part 3: The actual code in your favorite language (This will showcase to me your coding and your code style). If there is more than one file, bold the file name. (3pt) Parameters: X-axis: Number of Client 1,2,4,8,16,32,64,128,256 Y-axis: Minimum distribution time (in seconds) Submit two evidence graphs: Graph 1: Y-axis as-is Graph 2: Y-axis in log2 scale) File size F = 2000 Bytes Upload rate Server us = 10 #Bytes/sec Upload rate for each client uc = 1 #Bytes/sec Download Rate for each client dc = 2 #Bytes/sec
Answered Same DayOct 18, 2022

Answer To: Use your favorite language, and write a small program to simulate the minimum distribution time...

Baljit answered on Oct 19 2022
66 Votes
PART-1
I am using python matplotlib.pyplot module for plot.
Code:-
import matplotlib.pyplot as p
lt
# in bytes
F = 2000 #File size In bytes
us = 10 #uploading speed of server in bytes/sec
dmin = 2 #downloading speed of client in bytes/sec
u=1 #uploading speed of client in bytes/sec
N = [1, 2, 4, 8, 16, 32, 64, 128, 256] #list of number of clients
#For calculation of minimum distribution time for client server architecture
cs = [max(n*F/us, F/dmin) for n in N]
#For calculation of minimum distribution time for P2P architecture
p2p = [max(F/us, F/dmin, n*F/(us + n*u)) for n in...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here