[Solved] CS6378 Project 2

$25

File Name: CS6378_Project_2.zip
File Size: 150.72 KB

SKU: [Solved] CS6378 Project 2 Category: Tag:
5/5 - (1 vote)
  1. Source code must be in the C/C++/Java programming language.
  2. The program must run on UTD lab machines (dc01, dc02, , dc45).
  3. You will need to know thread and/or socket programming and its APIs for the language you choose. It can beassumed that each process (server/client) is running on a single machine (dcXY). Please get familiar with basic UNIX commands to run your program on dcXY.

1 Description

  1. There are three servers in the system, numbered from zero to two.
  2. There are five clients in the system, numbered from zero to four.
  3. Assume that each file is replicated on all the servers, and all replicas of a file are consistent in the beginning. Tohost files, create separate directory for each server.
  4. A client can perform a READ or WRITE operation on the files.
    • For READ operation, one of the servers is chosen randomly by the client to read from it.
    • For WRITE operation, the request should be sent to all of servers and all of the replicas of the target fileshould be updated in order to keep them consistent.
  5. READ/WRITE on a file can be performed by only one client at a time. However, different clients are allowedto concurrently perform a READ/WRITE on different files.
  6. In order to ensure the mentioned conditions, you must implement Ricart-Agrawala algorithm for distributed mutual exclusion, with the optimization proposed by Roucairol and Carvalho, so that no READ/WRITE violation could occur. The operations on files can be seen as critical section
  7. The supported operations by servers are as follows:
    • ENQUIRY: A request from a client for information about the list of hosted files.
    • READ: A request to read last line from a given file.
    • WRITE: A request to append a string to a given file.

The servers must reply to the clients with appropriate messages after receiving each request.

  1. Assume that the set of file does not change during the programs execution. Also, assume that no server failureoccurs during the execution of the program. 9. The client must be able to do the following:
    • Gather information about the hosted files bu querying the servers and keep the metadata for future.
    • Append a string hclient id,timestampi to a file fi during WRITE operation. Timestamp is the value of the clients, local clock when the WRITE request is generated. This must be done to all replicas of fi.
    • Read last line of a file fi during READ.
  2. Write an application that periodically generates READ/WRITE requests for a randomly chosen file from the setof files stored by the servers.
  3. Display appropriate log messages to the console or to a file.

Keep in mind to close all open sockets when your program exits/terminates.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS6378 Project 2
$25