1. Homepage
  2. Programming
  3. COMP90015: Distributed Systems - Assignment 1 Multi-threaded Dictionary Server

COMP90015: Distributed Systems - Assignment 1 Multi-threaded Dictionary Server

Engage in a Conversation
UnimelbCOMP90015Distributed SystemsMulti-threaded Dictionary ServerJava

COMP90015: Distributed Systems – Assignment 1 CourseNana.COM

Multi-threaded Dictionary Server (15 marks) Problem Description CourseNana.COM

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. CourseNana.COM

This assignment has been designed to demonstrate the use of two fundamental technologies that have been discussed during the lectures: CourseNana.COM

Sockets Threads CourseNana.COM

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. CourseNana.COM

Architecture CourseNana.COM

  • The system will follow a client-server architecture in which multiple clients can connect to a (single) multi-threaded server and perform operations concurrently. CourseNana.COM

  • The multi-threaded server may implement a thread-per-request, thread-per-connection, or worker pool architecture. This is a design decision for you to make. CourseNana.COM

    Interaction CourseNana.COM

    • All communication will take place via sockets. These sockets can be either TCP or UDP, however, keep in mind that all communication between clients and server is required to be reliable. CourseNana.COM

    • You are responsible for designing your own message exchange protocol. Some data formats that you may use include XML, JSON, Java Object Serialization, or you may choose to design your own. CourseNana.COM

      Failure Model CourseNana.COM

  • All communication between components has to be reliable. If you are using TCP, then the reliability guarantees offered by the protocol are sufficient. If you decide to use UDP, then you have to implement an infrastructure that offers reliable communication over UDP. For those of you with previous experience using TCP, using UDP may be a rewarding challenge. CourseNana.COM

  • It is expected that, on both the server and the client side, errors (by means of exception handling) are properly managed. The errors include the following: CourseNana.COM

  • Input from the console for what concerns the parameters passed as command line. CourseNana.COM

  • Network communication (address not reachable, bad data...). CourseNana.COM

  • I/O to and from disk (cannot find the dictionary file, error reading the file, etc...). CourseNana.COM

  • Other errors you might come up with. CourseNana.COM

    The application will be tested and validated against all these errors. CourseNana.COM

    Functional Requirements CourseNana.COM

  • Query the meaning(s) of a given word
    The client should implement a function that is used to query the dictionary with the following CourseNana.COM

    minimum (additional input/output parameters can be used as required) input and output: CourseNana.COM

    Input: Word to search CourseNana.COM

    Output: Meaning(s) of the word CourseNana.COM

    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. CourseNana.COM

  • Add a new word CourseNana.COM

    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: CourseNana.COM

    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.
    CourseNana.COM

  • Remove an existing word CourseNana.COM

    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: CourseNana.COM

    Input: Word to remove
    Output: Status of the operation (e.g., success, not found)
    CourseNana.COM

Error: The user should be informed if any errors occurred while performing the operation. CourseNana.COM

Update meaning of an existing word CourseNana.COM

Update associated meanings of a word from the dictionary. If multiple meanings already exist, you need to add this new one to it (of course, if the same meaning already exists, then no need to add). 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: CourseNana.COM

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.
CourseNana.COM

User Interface CourseNana.COM

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. CourseNana.COM

Implementation Guidelines CourseNana.COM

These are guidelines only, you are allowed and encouraged to come up with your own design and interfaces. CourseNana.COM

  • When the server is launched, it loads the dictionary data from a file containing the initial list of words and their meanings. These data is maintained in memory in a structure that enables an efficient word search. When words are added or removed, the data structure is updated to reflect the changes. CourseNana.COM

    A sample command to start the server is: CourseNana.COM

    > java jar DictionaryServer.jar <port> <dictionary-file>
    Where <port> is the port number where the server will listen for incoming client connections CourseNana.COM

    and <dictionary-file> is the path to the file containing the initial dictionary data. CourseNana.COM

  • When the client is launched, it creates a TCP socket bound to the server address and port number. This socket remains open for the duration of the client-server interaction. All messages are sent/received through this socket. CourseNana.COM

    A sample command to start the client is: CourseNana.COM

    > java jar DictionaryClient.jar <server-address> <server-port> CourseNana.COM

Implementation Language CourseNana.COM

The assignment should be implemented in Java. Utilization of technologies such as RMI and JMS are not allowed. CourseNana.COM

Report CourseNana.COM

You should write a report describing your system and discussing your design choices. Your report should include: CourseNana.COM

  • The problem context in which the assignment has been given. CourseNana.COM

  • A brief description of the components of the system. CourseNana.COM

  • An overall class design and an interaction diagram. CourseNana.COM

  • A critical analysis of the work done followed by the conclusions. CourseNana.COM

    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. CourseNana.COM

    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. CourseNana.COM

    It is important to put your details (name, surname, student id) in: CourseNana.COM

  • The head page of the report. CourseNana.COM

  • As a header in each of the files of the software project.
    This will help to avoid any mistakes in locating the assignment and its components on both sides.
    CourseNana.COM

    Submission CourseNana.COM

    Your report in PDF format only.
    CourseNana.COM

  1. Two executable jar files (DictionaryClient.jar and DictionaryServer.jar) that will be used to run CourseNana.COM

    your system on the day of the demo. CourseNana.COM

  2. Your source files in a .ZIP or .TAR archive only. CourseNana.COM

(These above items should be submitted each one individually NOT as one zip file containing all). CourseNana.COM

Submissions will be due on: April 8, 2024; Monday (5 pm). CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Unimelb代写,COMP90015代写,Distributed Systems代写,Multi-threaded Dictionary Server代写,Java代写,Unimelb代编,COMP90015代编,Distributed Systems代编,Multi-threaded Dictionary Server代编,Java代编,Unimelb代考,COMP90015代考,Distributed Systems代考,Multi-threaded Dictionary Server代考,Java代考,Unimelbhelp,COMP90015help,Distributed Systemshelp,Multi-threaded Dictionary Serverhelp,Javahelp,Unimelb作业代写,COMP90015作业代写,Distributed Systems作业代写,Multi-threaded Dictionary Server作业代写,Java作业代写,Unimelb编程代写,COMP90015编程代写,Distributed Systems编程代写,Multi-threaded Dictionary Server编程代写,Java编程代写,Unimelbprogramming help,COMP90015programming help,Distributed Systemsprogramming help,Multi-threaded Dictionary Serverprogramming help,Javaprogramming help,Unimelbassignment help,COMP90015assignment help,Distributed Systemsassignment help,Multi-threaded Dictionary Serverassignment help,Javaassignment help,Unimelbsolution,COMP90015solution,Distributed Systemssolution,Multi-threaded Dictionary Serversolution,Javasolution,