{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

EE450 Socket Programming Project Fall 2013

Ie clients should send a message which includes

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0000 The directory_server expects to hear messages from all 3 file_servers before it receives any messages from the clients. In order to make sure this sequence of events is enforced, we never run the client code before the file_server code. However just to be sure, the directory_server should keep track of the file_servers that contact it before it can respond to any messages from the clients. The easiest way to avoid such a race condition is to run the directory_server first, then the file_servers and after the communication between the file_servers and the directory server is over, run the client code. Please do it this way and note that your project will be tested in the same way. The directory.txt must now have 3 lines (3 columns on each line separated by one space) in the same order the file_servers contacted the directory_server. If your code is tested several times, we may see that the file_servers are registered in a different order every time and so every time this info is recorded in the directory.txt in a different order. At the end of the phase, the messages should be displayed on the Screen as per the table provided. Figure1: Phase 1, Registration of file_servers with directory_server Phase: 2 In this phase, Clients establish a UDP connection with the Directory server using the static ports as mentioned in the table “below”. After establishing the connection Client1 should request for “doc1” and Client2 should request for “doc2” to the Directory server. i.e Clients should send a message which includes Client# followed by file requested. For example: Client1 should send “Client1 doc1”(without qoutes). Client2 should send “Client2 doc2”(without qoutes). On receipt of these messages the Directory server will go through the resource.txt to find file servers which has the requested file. If the requested file is present...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online