{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

EE450 Socket Programming Project Fall 2013

Messages table 2 directory server on screen messages

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: in multiple File servers then Directory server will lookup the topology.txt to determine the file server closest to the client. Directory server will now lookup the directory.txt to find the TCP port number associated with the file server and sends client back a message which includes “File_server# TCP_port_number”(without quotes). For example if the closest file server was found to be file server2 and if file server2 had a TCP port number 7000 then directory server will send the following message to the client: “File_Server2 7000”(without quotes). This marks the end of Phase 2. Figure 2: Resource Identification by the Clients Phase: 3 In this phase Clients should establish a TCP connection with the File servers using TCP port number it got from the Directory server in Phase2. After the connection is established the client sends a message which includes Client# followed by name of the file requested. For example: Client1 should send “Client1 doc1”(without quotes). Client2 should send “Client2 doc2”(without quotes). Now the File server will send string “doc#”( without quotes) in response to the client’s request. Here “doc#” can either be doc1 or doc2 depending on the file requested by the client. Figure3: file sharing Table 1. Static and Dynamic assignments for TCP and UDP ports. Process Dynamic Ports Static Ports Directory server 1 UDP, 21000+xxx (last three digits of your ID) (phase 1 ) 1 UDP, 31000+xxx (last three digits of your ID) (phase 2) File_server1 1 UDP, 22000 + xxx (last digits of your ID) (phase 1) 1 TCP, 41000+xxx (last digits of your ID) (phase 3) File_server2 1 UDP, 23000 + xxx (last digits of your ID) (phase 1) 1 TCP, 42000+xxx (last digits of your ID) (phase 3) File_server3 1 UDP, 24000 + xxx (last digits of your ID) (phase 1) 1 TCP, 43000+xxx (last digits of your ID) (phase...
View Full Document

{[ snackBarMessage ]}