Simulate compute-client and compute-server interaction

Assignment Help JAVA Programming
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

Reference no: EM132354129

Questions Cloud

Convert a fahrenheit temperature to celsius : Convert a Fahrenheit temperature to Celsius, or vice versa. The program should use two custom functions, f_to_c and c_to_f, to perform the conversions.
Identify the alternate tools available to management : How any potential borrower requesting the same type of credit may manage exposure to interest rate risk? Identify the alternate tools available to management?
Construct a function with the following signature : That is, given two tuples, each containing a pair of floats representing the latitude and longitude of a point on Earth, calculate their Cartesian distance.
Patton uses the term prepon­derance of evidence : Patton uses the term "prepon­derance of evidence" to describe "best fit" between the data a researcher gathers and the patterns and conclusions he or she draws
Simulate compute-client and compute-server interaction : 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
Applying the rights and responsibility lens : Find an example of the rights/responsibility lens being applied. What distinctions were made between rights and equality of opportunity for everyone?
What are the major issues of globalization : What are the major issues of Globalization and why are they important in looking at International Business today?
Create a function that takes filename as a parameter : Create a function that takes fileName as a parameter. The file is a CSV file where the first column is the test number and the second column is the test score.
Appropriate standard for validation of qualitative research : In your opinion, is this an appropriate standard for the validation of qualitative research? Why or why not?

Reviews

len2354129

8/8/2019 2:06:34 AM

Part 2: Program use and test instruction 9 1. Whether the program installation is clearly described 2 2. Whether the code repository in the server is clearly described 1 3. Whether the test instruction covers all 3 compute- tasks 3 4. Whether the test instruction covers ‘not uploading task’ exception handling. 1 5. Whether the necessary screenshots have been provided and helpful for the test instruction. 2 Sub Total for Assignment 1 30

len2354129

8/8/2019 2:06:29 AM

6. Whether the ‘not uploading task’ exception can be handled by using the CSMessage 2 7. Whether the client program functions correctly 2 8. Whether TCP protocol is correctly used for the client and server communication 2 9. Whether the sever is multi-threaded by using the ‘thread-per-connection’ model 2

len2354129

8/8/2019 2:06:23 AM

3. Whether the 3 compute-tasks have been implemented as Java serializable objects 3 4. Whether the 3 compute-tasks can be successfully transferred between the client and server 3 5. Whether the 3 compute-tasks can be successfully executed by the server and can return correct results to the client 3

len2354129

8/8/2019 2:06:18 AM

The Marking Criteria Marking Criteria Available Marks Part 1: Java TCP Networking, Multi-threading and Object Serialization Programming 21 1. Whether the project can be compiled by JDK or NetBeans IDE and executed by JRE 2 2. Whether the given Task interface is properly used as the unique communication contract between the client and server 2

len2354129

8/8/2019 2:06:12 AM

Submission You need to provide the following files in your submission. 1. Files of Java source code of the compute-client, the compute-server and the processing thread and the compute-tasks. The in-line comments on the data structure and program structure in the programs are required. These source code files must be able to be compiled by the standard JDK (Java Development Kit) or NetBeans IDE from Oracle. Note: an easy way to provide the source code and executables is to submit them in a NetBeans project. 3. A Microsoft Word document to address the issues as specified in Part 2 above. All the required files must be compressed into a zip file for submission. You must submit your assignment via the unit web site. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted.

Write a Review

JAVA Programming Questions & Answers

  Create a simple java program that connects to database

create a simple Java program that connects to this database using JDBC. Your program should then query this database's "student" table.

  When would a gui (graphical user interface) be a poor choice

Discuss the following questions with your classmates: When would a GUI (graphical user interface) be a poor choice for reading data into a program? Why? Please give specific reasons for your answer.

  Calculate monthly commissions for n salespersons

Understanding of arrays - arrayLists, objects, classes, sorting and searching. Develop a java application program for such a scenario that a local department store manager wants to use it for calculating monthly commissions for N salespersons.

  Add event handling to the button find out the value the

make a windows program in java that has a labeled text field for the price of a meal. there are different discounts for

  Implement program that prompts for number of students

A group of students have been told to get into teams of a specific size for their class work. Design and implement a program that prompts for the number of students in the group and the size of the teams to be formed, and display how many teams ca..

  Paging efficiency at run time

Why or why not? Is there anything that could be done to improve paging efficiency at run time?

  What is the characteristic behavior of a stack

What is the characteristic behavior of a stack? What is the characteristic behavior of a queue? What are the advantages of the java.util.Stack implementation of a stack?

  Name all the modifiers in java

Before the OOP was catching on, the methodology to solve a problem usually is to break down the task into subtasks.

  Calculate the sum of natural number between start and end

Please write the function int sum (int start, int end) to calculate the sum of natural number between start and end (included)

  What must a subclass do to modify a private superclass

When a class extends an abstract class, it must provide definition of all the methods that are declared in the abstract class. Otherwise, it gives a compile time error.

  Draw a picture with an appearance

You must use the given Rectangle and Oval classes to draw a picture with an appearance as close as possible.

  Demonstrate for each of two applications they are vulnerable

Demonstrate for each of the two applications they are vulnerable to this attack. You need to show explicitly the attack you use and demonstrate the impact of th

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd