You are asked to add the following capabilities to the file sharing system developed in the
previous programming assignment:
Ability to discover files stored in other filer servers.
Ability to download files stored in other file servers.
Your current implementation should allow a client to connect to a given file server and
download/upload files. You need to extend that functionality to allow the file server to search
other file servers when it does not have the file requested for download locally. The following
example describes how your system should behave:
Client A connects to file server B and requests to download file X
If file server B has the file X locally, it services the request
Otherwise, server B initiates a file discovery process as follows
B broadcasts a discovery request for file X to all of the other file servers in the system
Other file servers receive the request, search their local repository, and respond as to
whether they have that file or not
File server B receives the responses and sends them back to the client
The client displays the possibilities to the user, who initiates the download from one of
the remote servers that has the file
You may only use Java RMI for developing the additional new capabilities. However, the
functionality to upload/download files from the server developed using Java sockets in
programming assignment #1 could be reused. No other use of third party software is allowed,
unless explicitly permitted by the instructor.
Your implementation should allow for creation of arbitrary number of servers and clients.
The implementation should allow for the TA to specify the address of the RMI registry servers.
One effective approach is to allow the user to pass the RMI registry server address as a
parameter when running the Jar file. Hardcoding it would not work, because the TA is likely to
use a different IP/Port number for testing your system.
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.