Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
[an error occurred while processing this directive]

4005-730 Distributed Systems
Grid Computing System Version 6

Prof. Alan Kaminsky
Rochester Institute of Technology -- Department of Computer Science
Adapted by Prof. Warren R. Carithers, 2011/01/31

Overview
The Grid Computing System
Software Requirements
Example Command Lines


Overview

Write a Java program for a simulated grid computing system. The program will include distributed objects for the various entities in the grid computing system, as well as a user client. The distributed objects will reside in multiple processes running on different host computers, and communicating with each other using Java remote method invocation (RMI).

Like Version 5, Version 6 assumes that processes can fail. Unlike Versions 1, 2, and 5, Version 6 assumes there can be more than one client running at a time.

Version 6 adds the following features to Version 5:

The system is not designed to tolerate failure of the Registry Server.


The Grid Computing System

The Grid Computing System (GCS) is the same as Version 1.


Software Requirements

    Function Interface
     
  1. The requirements for the Function interface in Version 6 are the same as Version 1.
     
    Compute Server Object
     
  2. The requirements for the compute server object in Version 6 are the same as Version 5, except as stated below.
     
  3. The compute server object must participate in at most one calculation session at a time.
     
    Client Program
     
  4. The requirements for the compute client main program in Version 6 are the same as Version 5, except as stated below.
     
  5. If a compute server object needed for the calculation session is not available, the client program must wait until the compute server object becomes available.
     
    System Monitor Program
     
  6. The requirements for the system monitor program in Version 6 are the same as Version 5.
     


Server Source Code


Client Source Code


Example Command Lines

To perform the example calculation session depicted in the above timeline under "The Grid Computing System," run the following commands, each in a separate process on the same machine.

  1. Run the Registry Server (script: runregistry).

    $ runregistry

    #!/bin/bash
    java \
    -classpath /home/fac/ark/public_html/cscl/lib \
    Start edu.rit.ds.registry.RegistryServer

  2. Run the Grid Computing System monitor program (script: runmonitor). This can be done before or after starting the compute server objects.

    $ runmonitor

    #!/bin/bash
    java \
    -classpath /home/fac/wrc/www/courses/common/ds/gcs/gcs06:/home/fac/ark/public_html/cscl/lib \
    Monitor localhost 9901

  3. Set up a security policy for the Compute Server (policy file: policy).

    grant codebase "file:/home/fac/wrc/www/courses/common/ds/gcs/gcs06/"
        {
        permission java.security.AllPermission;
        };
    grant codebase "file:/home/fac/ark/public_html/cscl/lib/"
        {
        permission java.security.AllPermission;
        };

  4. Run several instances of the Compute Server, specifying the security policy (script: runcomputeserver).

    $ runcomputeserver A
    $ runcomputeserver B
    $ runcomputeserver C

    #!/bin/bash
    java \
    -classpath /home/fac/wrc/www/courses/common/ds/gcs/gcs06:/home/fac/ark/public_html/cscl/lib \
    -Djava.security.policy=policy \
    Start ComputeServer localhost 9901 $1

  5. Set up a security policy for the Compute Client (policy file: client/policy).

    grant codebase "file:/home/fac/wrc/www/courses/common/ds/gcs/gcs06/client/"
        {
        permission java.security.AllPermission;
        };
    grant codebase "file:/home/fac/ark/public_html/cscl/lib/"
        {
        permission java.security.AllPermission;
        };

  6. Set up a web server so that class files in the client's class path can be downloaded from a URL. This is called the codebase URL.
     
  7. Run the Compute Client that doesn't prevent deadlock, specifying the security policy and the client's codebase URL (script: client/runclient). Specify session name, function class names, and compute server names on the command line. Type arguments upon which to calculate the function. Hit CTRL-D (end-of-file) when done.

    $ runclient ARK SqrFunction A LogFunction B SineFunction C
    0.5
    1.0
    CTRL-D

    #!/bin/bash
    java \
    -classpath /home/fac/wrc/www/courses/common/ds/gcs/gcs06/client:/home/fac/wrc/www/courses/common/ds/gcs/gcs06:/home/fac/ark/public_html/cscl/lib \
    -Djava.security.policy=policy \
    -Djava.rmi.server.codebase=http://www.cs.rit.edu/~wrc/courses/common/ds/gcs/gcs06/client/ \
    ComputeClient localhost 9901 $*
    

  8. Run the Compute Client that prevents deadlock, specifying the security policy and the client's codebase URL (script: client/runclient2). Specify session name, function class names, and compute server names on the command line. Type arguments upon which to calculate the function. Hit CTRL-D (end-of-file) when done.

    $ runclient2 ARK SqrFunction A LogFunction B SineFunction C
    0.5
    1.0
    CTRL-D

    #!/bin/bash
    java \
    -classpath /home/fac/wrc/www/courses/common/ds/gcs/gcs06/client:/home/fac/wrc/www/courses/common/ds/gcs/gcs06:/home/fac/ark/public_html/cscl/lib \
    -Djava.security.policy=policy \
    -Djava.rmi.server.codebase=http://www.cs.rit.edu/~wrc/courses/common/ds/gcs/gcs06/client/ \
    ComputeClient2 localhost 9901 $*
    

Compute Server A prints the following on the console (the floating point numbers may print with additional digits of precision):

Compute Server A -- available
Compute Server A -- reserved -- session: ARK
Compute Server A -- function: sqr
Compute Server A -- successor: B
Compute Server A -- f(0.5)
Compute Server A -- sqr(-0.735) = 0.540
Compute Server A -- f(1.0)
Compute Server A -- sqr(-0.173) = 0.030
Compute Server A -- available

Compute Server B prints the following on the console (the floating point numbers may print with additional digits of precision):

Compute Server B -- available
Compute Server B -- reserved -- session: ARK
Compute Server B -- function: log
Compute Server B -- successor: C
Compute Server B -- f(0.5)
Compute Server B -- log(0.479) = -0.735
Compute Server B -- f(1.0)
Compute Server B -- log(0.841) = -0.173
Compute Server B -- available

Compute Server C prints the following on the console (the floating point numbers may print with additional digits of precision):

Compute Server C -- available
Compute Server C -- reserved -- session: ARK
Compute Server C -- function: sin
Compute Server C -- f(0.5)
Compute Server C -- sin (0.5) = 0.479
Compute Server C -- f(1.0)
Compute Server C -- sin (1.0) = 0.841
Compute Server C -- available

The compute client program prints the following on the console (the floating point numbers may print with additional digits of precision):

f(0.5) = 0.540
f(1.0) = 0.030

[an error occurred while processing this directive]
Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
Copyright © 2007 Alan Kaminsky. All rights reserved. Last updated 09-Dec-2007. Please send comments to ark­@­cs.rit.edu. Adaptations last updated 2011/01/31 by Warren R. Carithers.