support@w4writers.com +44 7743 307695
Mar 14, 2024

Assignment Task

Goals

In this assignment, the goal is to get familiar with the RPC (Remote Procedure Call) /RMI (Remote Method Invocation) model for communication among distributed processes. RPC model is at the core of many distributed systems today. For this purpose, the aim in this assignment is to develop and deploy a distributed RPC/RMI service that provides client processes Turkish dictionary operations located at the remote server side.

Tasks

You are asked to design and implement operations of the dictionary service using RC/RMI model (either Java RMI or Sun RPC) for communication between the clients and the server. The clients can request dictionary operations concurrently from the single server. The server must handle incoming client connections and requests, and reply each client eventually. For each connection, server gets the requested operation (such as insert, search, log), and replies the output back to the client. If the client does not receive any response back, it waits for a predefined amount of time (controlled by a timer mechanism) and submits the same operation request again.

The following operations must be provided at the server side:

Insert Word

Client can add a new word to the dictionary at the server. If the submitted word already exists, then a warning message is returned to the client. The client must obey the dictionary format explained in Turkish Dictionary section.

Search Word

Client can query a word from the dictionary server. If the word does not exist then “Not Found” message is returned to client. If the word exists, its description must be provided to the client. (Example: DISTRIBUTE DAĞITMAK {V} where {V} stands for verb.)

Logs

Server must keep log information and when a client requests the logs, they are returned in line by line. The logs are structured as follows; client IP, requested operation (such as insert, search, and log) and the time of operation.

Statistics

Client can query the Turkish dictionary to get some statistics about the dictionary. The statistics command will show how many words in file and also groups the words based on word type.

Whenever a client would like to use the dictionary service, the following steps of interaction are performed.

  • The client should provide the word or word pair in a format that server can decode and perform the specified operation. The format of words is presented in given dictionary.txt file.
  • If the client provides a wrong format or the provided word does not exist, the server replies back with an explanation of error.
  • The server must keep the history file per client that is used for holding that client’s operation log.
  • RPC/RMI will be used in all communications (between clients and the server).
  • At the client side, a menu will displayed to get the operation and inputs from the user. For each submitted operation and parameters, necessary method at the server side is invoked and end result will be sent to and displayed by the client.
  • To run the RMI server on the first the RMI service must be executed. To execute the RMI service on the ubuntu, the command “rmiregistry &” is executed in command line. For widows, “start rmiregistry” must be executed in command line, then it starts running at the background.

Turkish Dictionary

With this assignment, you are provided a dictionary (dictionary.txt) where each entry contains English word(s), Turkish meaning and the word type. One example entry is:

ACADEMICIAN AKADEMİ ÜYESİ {N} where {N}

Stands for noun. There are other word types as well. The command line structure must obey the dictionary entry format.

Error Handling

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

  • Wrong input from the console for the parameters passed as the command line
  • Network communication (address not reachable, bad data
  • I/O (cannot find the dictionary file, error reading the file, etc
  • Other errors you might come up with

The service will be tested and validated against all these errors

Recent Post

Order this Assignment now

Total: GBP120

fables template