Recent Changes - Search:

Distributed Computing

This website demonstrates using wikis as teaching and learning tool.

The course instructor is also happy to share the teaching materials here with those who find it readable.

Distributed Computing with Java RMI

Introduction

Java RMI provides a simple and direct model for distributed computing with Java objects. The objective of this question is to allow you to practise programming RMI for distributed computing applications. Our main concern is on the programming aspect of distributing computing, not on the distributed computing problems themselves. Therefore, we select a fairly simple problem, rather than a good but complex one that can fully reveal the real power of distributing computing.
In previous coursework, we applied Java sockets and streams to implement distributed computing for the computation of pi (π). In this question, we will use Java RMI to do the same problem again.

Your Tasks

  • Write a remote interface named RMIComputeEngine that specifies a method named getAndRunIt. This method is able to accept any object that implements the Softbot interface and return the same type of object to the caller. Recall that the Softbot interface specifies only one method: void execute(). [3 marks]
  • Implement a remote object of RMIComputeEngine. [8 marks]
Write a class named RMIComputeEngineImpl that implements the interface RMIComputeEngine. In writing this class, remember to do the following:
  1. Declare that this class will implement the remote interface RMIComputeEngine.
  2. Define the constructor.
  3. Provide an implementation of the getAndRunIt method.
  4. Write a static main method that handles the security manager, the remote object, and the RMI remote object registry.
  • Create a RMI client program for the computation of pi using the Machin’s formula. [7 marks]
Write a class named RMIClient_ComputePi to test the implementation and the deployment of RMIComputeEngine. Just write a static main method that computes pi using the Machin’s formula. Invoke two RMIComputeEngine objects for the computation of inverse arc tangent. Please refer to Question One for the computation of pi using the Machin’s formula. The main method also allows a user to specify the host that runs the RMIComputeEngine objects.
Edit - History - Print - Recent Changes - Search
Page last modified on August 27, 2007, at 11:03 AM