Grinda API

Grinda is a Tuple Space implementation for the Globus Toolkit 4 (GT4).

See:
          Description

Packages
grinda.client This package contains all the classes needed by a client to communicate with the TupleSpace service
grinda.client.dataserver This package contains a simple implementation of a server for the STP protocol
grinda.client.stp This package contains the client-side implementation of the Simple Transmission Protocol (STP).
grinda.common This package contains classes shared by the client as well as the service
grinda.impl This package contains the implementation of the service
grinda.impl.brokers Package containing the classes that implements the distribution strategies for tuples.
grinda.impl.tuplespace Package containing classes related to the implementation of the tuple space.
grinda.test Some tests...
grinda.test.vanloan  

 

Grinda is a Tuple Space implementation for the Globus Toolkit 4 (GT4). It allows applications to coordinate their tasks using a shared Tuple Space. It can be use to coordinate distributed computations like MPI but with less efforts and without the need of knowing slave identities and network topology. Other Tuple Space implementations are for example Linda, JavaSpaces, TSpaces and Lime.

Architecture

Grinda is composed by two modules:

Clients use the service to store and retrieve tuples. The services are connected each other and can communicate to distribute or search tuples. For the moment there are only two different distribution strategies for Tuples available:

Other strategies can be implemented and plugged in the services using a specific API.

Installation

The client-side module doesn't need any installation. It is contained in a JAR file but it needs the GT4 libraries.

The server-side has to be deployed on the Globus Toolkit. It is completly implemented in Java and needs only the WSRF Core libraries. See the GT4 documentation in order to know how to install this framework.

After having installed the GT4 to deploy the Grinda service simply type:

ant deploy -Dgar.name=<grinda.gar path>

The grinda service uses the files <gt4 path>/etc/grinda.properties and ~/.grinda.properties (if present) for its configuration. See the installed configuration file for the required format.

Programming with Grinda

In order to use the Grinda client-side module you need the following steps:

An application example is the following:

import grinda.client.*; //imports the client-side classes

public class HalloWorld {
public static void main(String[] args) {
try {
TupleSpaceFactory tsf=new TupleSpaceFactory();
TupleSpace ts=tsf.getTupleSpace("space1");
ts.write(new Tuple("Hallo World!!"),null);

Tuple tmpl=new Tuple(String.class);
Tuple r=ts.take(tmpl,null);
System.out.println(r.getFieldValue(0)); //writes Hello World!!
System.exit(0); //needed to stop some client-side threads
} catch (Exception ex) {
ex.printStackTrace();
System.exit(-1);
}
}



Copyright © 2006 Sirio Capizzi. All Rights Reserved.