Reference no: EM131936637
Assignment
Overview
You need to design and implement a lightweight Web-Service-based P2P file-sharing application. This application consists of a Web service and a client program. Before you begin, you need to discuss which database management system your program is going to use.
Requirements
The "lightweight" functions must include the following:
1. The Web service resides at the JBoss application server.
• If you wish to use JBoss WS or an application other than the JBoss application, you need to get approval from your tutor.
2. The Web service has database connection ability.
• You need to discuss with your tutor which database management system your program is going to use.
• You need to provide your tutor with the relevant database files or SQL Database Definition Language to help your tutor establish the database to test your TME.
3. The user can run the client program at his/her computer (which may be different from the computer on which the JBoss application server is running).
• When your tutor tests the TME, s/he may use Eclipse's Web Services Explorer and one client to test the file-sharing function.
• When your tutor tests the TME, s/he may run two or more clients and test the file-sharing function among clients.
4. The user can choose which files s/he wants to share with other users.
• The client program then registers the files via the Web service.
• The user can remove the files that s/he no longer wants to share with others. If the user does this, the client program will update the sharing status for the file in the database via the Web service.
1. The user can search the file name that s/he wants to download from other users.
• The client program then searches the database by consuming the Web service.
• If the client program finds that anyone is sharing the file, the client program shows the file name to the user without revealing who owns the file.
• If the client program finds that no one is sharing the file, the client program shows "no match result" to the user.
2. If someone is sharing the file that the user wants to download, the user can click on the file name and download it to his/her computer. When the user starts the download,
• the client program first retrieves the information about who owns the file by consuming the Web service.
• the client program (i.e., client-A) then builds a socket connection with the other client program (i.e., client-B), which means the client program is a socket server application as well as a socket client application.
• client-A then tells client-B which file it wants to have.
• client-B sends the file to client-A via a socket.