1. Homepage
  2. Programming
  3. [2022] COMPSCI 711: Parallel and Distributed Computing - Assignment 1: Web Cache

[2022] COMPSCI 711: Parallel and Distributed Computing - Assignment 1: Web Cache

Engage in a Conversation
The University of AucklandCOMPSCI711Parallel and Distributed Computing

COMPSCI 711 Assignment A1

Due date: 23:00 11th April CourseNana.COM

  CourseNana.COM

The purpose of this assignment is to understand the techniques used by the CDN in reducing the amount of data transmission and practice developing distributed applications. CourseNana.COM

  CourseNana.COM

The system consists of three components as shown in the figure below. CourseNana.COM

  CourseNana.COM

The server provides a service that allows users to browse and download files. The cache caches the data previously downloaded by the client. It should be assumed that the three components reside at different locations. The client program interacts with the server through the cache. That is, when the client wants to browse the list of files available on the server or to download a file from the server, the client’s requests are sent to the cache first and the cache forwards the requests to the server. Similarly, the server also sends the replies to the clients through the cache. CourseNana.COM

  CourseNana.COM

Your implementation must be based on C# and use .NET 6 Core framework (available on lab machines). CourseNana.COM

• _If you use your own machine for the assignment, you should install .NET 6 SDK (available at https://dotnet.microsoft.com/en-us/download/dotnet/6.0). CourseNana.COM

• _Visual Studio is an IDE for C#. The community edition is free and can be downloaded at https://visualstudio.microsoft.com/downloads/ . CourseNana.COM

  CourseNana.COM

There are two options for this assignment. They differ in their difficulty. Option 1 is relatively easy. The maximum mark for option 1 is 9 while the maximum mark for option 2 is 15. You should only do and submit ONE of the options. CourseNana.COM

  CourseNana.COM

Option 1 (9 marks) CourseNana.COM

Programming (6.5 marks) CourseNana.COM

In this part, you are required to implement the client program, the cache and the server. The requirements for the three programs are as below: CourseNana.COM

  CourseNana.COM

• _The client program should provide a GUI interface that (a) allows the user to display the list of files that are available on the server, (b) allows the user to select a file from the list of available files to download, and (c) allows the user to display the contents of the downloaded file. In this option, you can assume the files to be downloaded are text files. CourseNana.COM

• _The cache should cache the files previously downloaded by the client. o If the user requests for a file that has the same name as a previously downloaded file, the cached copy of the file should be returned to the user. CourseNana.COM

o The cache should keep a log to record of the activities of the cache. For each user’s file downloading request, the log should indicate whether the request is satisfied by a cached file, or the requested file needs to be downloaded from the server. For example, when a user’s request is received, the following log entry might be created: CourseNana.COM

  CourseNana.COM

user request: file xyz at 10:27:00 2022-03-01 CourseNana.COM

response: cached file xyz CourseNana.COM

or CourseNana.COM

user request: file xyz at 10:27:00 2022-03-01 CourseNana.COM

response: file xyz downloaded from the server CourseNana.COM

o The cache should provide a GUI interface that allows the user to view the contents of the cache’s log and the list of files that are cached on the server. CourseNana.COM

o The interface should provide a function (e.g., a clear button) that allows the files in the cache to be cleared (i.e., deleted). CourseNana.COM

o It should be assumed that the cache has sufficient space to hold all the downloaded files. That is, you do not need to consider cache replacement policy. CourseNana.COM

• The server program should provide (a) an operation that allows the user to download a file with a given name, and (b) an operation that lists the names of the files available on the server. CourseNana.COM

  CourseNana.COM

Report (2.5 marks) CourseNana.COM

Write a report about your implementation. Your report should include the following. CourseNana.COM

  CourseNana.COM

(a) Which option you have implemented. CourseNana.COM

(b) Clearly indicate whether you have tested your programs on a lab machine. CourseNana.COM

(c) Instructions on how to run your programs. CourseNana.COM

(d) Consider the techniques that you need to use if you have chosen to implement option 2. CourseNana.COM

  CourseNana.COM

Compare and contrast the techniques used in option 1 and 2 in terms of the response time perceived by the user, the amount of network bandwidth that can be saved, and the amount of computation being carried out by the cache and the origin server. CourseNana.COM

  CourseNana.COM

Save your report as a PDF file. Name it as report.pdf. CourseNana.COM

  CourseNana.COM

Option 2 (15 marks) CourseNana.COM

Programming (12 marks) CourseNana.COM

In this part, you are required to implement the client program, the cache and the server. The cache and the server should allow fragments of the files to be cached. In your implementation, the fragmentation of the files should be carried out automatically. That is, the users do not need to rewrite the files for caching purpose. The files to be downloaded are image files. CourseNana.COM

• _The client program should provide a GUI interface that (a) allows the user to display the list of files that are available on the server, (b) allows the user to select a file from the list of available files to download, and (c) allows the user to display the contents of the downloaded file (i.e., display the downloaded image). CourseNana.COM

  CourseNana.COM

The requirements for the cache are as below: CourseNana.COM

o When a user requests for a file, if there are some cached data that can be used to construct the requested file, the cached data should be used, and only the data that do not exist on the cache should be downloaded from the server. CourseNana.COM

o The cache should keep a log to record of the activities of the cache. For each user’s file downloading request, the log should indicate the percentage of the file that is constructed using the data cached on the server. The percentage is defined as “the size of the cached data used to construct the file / the size of the file” where the size is measured in bytes. For example, when a user’s request is received, the following log entry might be created: CourseNana.COM

  CourseNana.COM

user request: file xyz at 10:27:00 2022-03-01 CourseNana.COM

response: 82% of file xyz was constructed with the cached data CourseNana.COM

o The cache should provide a GUI interface that allows the user to view the contents of the cache’s log, the list of cached data fragments and the contents of the selected data fragment cached on the cache server. The contents of the data should be displayed as a sequence of bytes in hexadecimal numbers. Each byte consists of two hexadecimal digits. For example, the contents of a data segment might be “1F02…” where “…” denotes more hexadecimal digits. Your program must display the exact contents. That is, you cannot display “…” as output. CourseNana.COM

o The size of each data fragment should be around 2KB. Otherwise, your programs might not work properly for the test cases used by the marker. CourseNana.COM

o The interface should provide a function (e.g., a clear button) that allows the files in the cache to be cleared (i.e., deleted). CourseNana.COM

o It should be assumed that the cache has sufficient space. CourseNana.COM

  CourseNana.COM

The server program should provide the following: CourseNana.COM

• An operation that allows the user to download a file with a given name. CourseNana.COM

• An operation that lists the names of the files available on the server. CourseNana.COM

• Operations that are necessary to allow the cache to download fragments of the files. CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
The University of Auckland代写,代写,COMPSCI711代写,Parallel and Distributed Computing代写,The University of Auckland代编,代编,COMPSCI711代编,Parallel and Distributed Computing代编,The University of Auckland代考,代考,COMPSCI711代考,Parallel and Distributed Computing代考,The University of Aucklandhelp,help,COMPSCI711help,Parallel and Distributed Computinghelp,The University of Auckland作业代写,作业代写,COMPSCI711作业代写,Parallel and Distributed Computing作业代写,The University of Auckland编程代写,编程代写,COMPSCI711编程代写,Parallel and Distributed Computing编程代写,The University of Aucklandprogramming help,programming help,COMPSCI711programming help,Parallel and Distributed Computingprogramming help,The University of Aucklandassignment help,assignment help,COMPSCI711assignment help,Parallel and Distributed Computingassignment help,The University of Aucklandsolution,solution,COMPSCI711solution,Parallel and Distributed Computingsolution,