$25
Using a client-server architecture, design and implement a multi-threaded server that allows concurrent clients to search the meaning(s) of a word, add a new word, and remove an existing word.
This assignment has been designed to demonstrate the use of two fundamental technologies that have been discussed during the lectures:
Hence, the assignment must make an EXPLICIT use of the two above. By explicit, we mean that in your application, sockets and threads must be the lowest level of abstraction for network communication and concurrency.
The application will be tested and validated against all these errors.
The client should implement a function that is used to query the dictionary with the following minimum (additional input/output parameters can be used as required) input and output:
Input: Word to search
Output: Meaning(s) of the word
Error: The client should clearly indicate if the word was not found or if an error occurred. In case of an error, a suitable description of the error should be given to the user.
Add a new word and one or more of its meanings to the dictionary. For the word to be added successfully it should not exist already in the dictionary. Also, attempting to add a word without an associated meaning should result in an error. A new word added by one client should be visible to all other clients of the dictionary server. The minimum input and output parameters are as follows:
Input: Word to add, meaning(s)
Output: Status of the operation (e.g., success, duplicate)
Error: The user should be informed if any errors occurred while performing the operation.
Remove a word and all of its associated meanings from the dictionary. A word deleted by one client should not be visible to any of the clients of the dictionary server. If the word does not exist in the dictionary then no action should be taken. The minimum input and output parameters are as follows:
Input: Word to remove
Output: Status of the operation (e.g., success, not found)
Error: The user should be informed if any errors occurred while performing the operation.
Update associated meanings of a word from the dictionary. If multiple meanings exist, all of them should be replaced by new meaning(s) provided by user. Update made by one client should be visible to any of the clients of the dictionary server. If the word does not exist in the dictionary, then no action should be taken. The minimum input and output parameters are as follows:
Input: Word to update, meaning(s)
Output: Status of the operation (e.g., success, not found)
Error: The user should be informed if any errors occurred while performing the operation.
A Graphical User Interface (GUI) is required for this project. You are free to design it and to use any existing tools and libraries for this purpose.
These are guidelines only, you are allowed and encouraged to come up with your own design and interfaces.
> java –jar DictionaryServer.jar <port> <dictionary-file>
Where <port> is the port number where the server will listen for incoming client connections and <dictionary-file> is the path to the file containing the initial dictionary data.
> java –jar DictionaryClient.jar <server-address> <server-port>
The assignment should be implemented in Java. Utilization of technologies such as RMI and JMS are not allowed.
You should write a report describing your system and discussing your design choices. Your report should include:
Please mind that the report is a WRITTEN document, do not put only graphs. A report without any descriptive text addressing the problem, architecture, protocols, and the analysis of the work done will not be considered valid.
The length of the report is not fixed. A good report is auto-consistent and contains all the required information for understanding and evaluating the work done. Given the level of complexity of the assignment, a report in the range of 4 to 6 pages is reasonable. Please mind that the length of the report is simply a guideline to help you in avoiding writing an extremely long or incomplete report.
It is important to put your details (name, surname, student id) in:
This will help to avoid any mistakes in locating the assignment and its components on both sides.
You need to submit the following via LMS:
Submissions will be due on: Monday 19 of April (5 pm).
The marking process will be structured by first evaluating whether the assignment (application + report) is compliant with the specification given. This implies the following:
All of the above elements will earn you a maximum of 10 (out of 15) marks. The rest of the marks are assigned to two elements:
NOTE 1 (EXTREMELY IMPORTANT): The excellence and the creativity marks (5 marks) cannot compensate any lack in the first part (the one that scores up to 10 marks). Please concentrate your efforts in getting the first 10 marks done and then proceed with the rest.
Note 2: Don’t document anything you haven’t implemented in the report. This is misconduct and will result in severe penalties.
You are required to provide a demonstration of the working application and will have the opportunity to discuss with the tutors the design and implementation choices made during the demo.
You are free to develop your system where you are more comfortable (at home, on one pc, on your laptop, in the labs...) but keep in mind that the assignment is meant to be a distributed system that works on at least two different machines in order to separate the client from the server.
We will announce the demo date, time, and venue closer to the due date. Each tutor will hold 2-3 demo sessions and you will be required to showcase your system in one of the sessions held by the tutor of the workshop in which you are enrolled.
If you need any clarification on the assignment, kindly ask questions during the tutorials or in the LMS forum, so that all students benefit from it.