Reference no: EM132354129
Assignment Specification
A Simplified Remote Invocation Framework
Java RMI (Remote Method Invocation, reference Chapter 5 of the textbook and Week-3 lecture) enables the local invocation and remote invocation use the same syntax to implement a generic remote server like the Compute Engine example in Week-3 lecture slides. However, Java RMI needs 2 HTTP servers to transfer Java classes between a RMI client and a RMI server at runtime. In addition, Java RMI applications need a RMI Registry to register or look up the remote objects. In this assignment, you are to implement a remote invocation framework that is similar to Java RMI but lightweight (note: for this assignment, you don't use any Java RMI APIs).
Java object serialization, multi-threading model and client/server model are the fundamental Java components to build distributed applications. In this assignment, you are to use these components or models to develop a particular application - a simplified remote invocation framework. The Java object serialization, multithreading and client/server components have been introduced through weekly lectures, tutorials and lab projects of this unit; you should ensure that you have good understanding of these learning materials before you start this assignment. In this assignment, you will need to integrate what you have learnt to develop the framework. This assignment specification is as follows.
Part 1: Java TCP Networking, Multi-threading and Object Serialization Programming
The framework consists of a compute-server, a compute-client and a class repository, which are depicted in the following diagram. The framework is a generic computing architecture because the compute-client and compute-server just need to know the Task and CSMessage interface or class in advance to interact with each other via the framework.
To complete this assignment, you need to implement such a framework and integrate the Calculate Pi, Calculate Primes and Calculate the Greatest Common Divisor tasks into this framework. The algorithms of these tasks are given on the unit web site. Your compute-server must be multi-threaded and follow the ‘thread-per-connection' architecture (reference Week-4 contents).
The communication between the compute-server and the compute-client must use TCP protocol through the Java TCP API Socket and ServerSocket
To implement the framework, you need to implement the following Java classes:
1. A Java application to implement the compute-client; graphic user interface is required;
2. A Java application to implement the compute-server; and
3. A Java class to implement the request processing thread.
4. A number of Java classes to implement Calculate Pi, Calculate Primes and Calculate the Greatest Common Divisor tasks.
Note: to simulate compute-client and compute-server interaction, you don't have to run them on two physical machines. Instead, they can be run on two JVMs (Java Virtual Machines) on a single physical machine. As a result, the name of the server machine can be ‘localhost'.
Part 2: Program use and test instruction
After the implementation of the framework, prepare an end user' instruction about how to use your software.
Attachment:- A Simplified Remote Invocation Framework.rar