README for Pastry Module of HyperCast

June 2006


The Pastry module contains source code that allows the Pastry distributed hash table protocol to run in HyperCast.  The source code consists of FreePastry code from Rice University and wrapper code that provides the interfaces expected HyperCast. The Pastry module is distributed separately from HyperCast, since it contains source code from a third party (Rice University).

1. Open Source License

HyperCast is being made available under the terms version 2.1  of the GNU Lesser General Public License ("LGPL").
FreePastry files contained in the Pastry module are  disseminated with a BSD like  open source license. For details see http://freepastry.org/.

2. Download and Installation

The sources of the Pastry module (i.e., the directory tree that contains this directory and all its subdirectories) must be placed into an existing source code installation of HyperCast. The HyperCast source code installation has the following structure:
.
./src/hypercast
./lib/
./bin/
The Pastry module must be placed in the directory  ./src/hypercast/Pastry. 

2.1. Downloading sources from CVS

When downloading from the CVS repository, the Pastry module can be checked out to ./src/hypercast/Pastry.

2.2. Extracting sources from ZIP archive

ZIP archives with the sources of the Pastry module  are usually  distributed in a file  with  the name 

      Pastry-Sources-xxx-yyyymmdd.zip

where xxx is a tag that identifies who created  the archive and yyyymmdd is the date when the archive was created. Extract the Pastry module into the source tree of HyperCast sources into  the directory  ./src/hypercast/Pastry.

NOTE: If a package declaration error occurs during compilation, the source code of the Pastry node loader (Pastry.java) may need to be moved from the directory ./src/hypercast/Pastry to the directory ./src/hypercast/nodeloaders

3. Compiling

The Pastry source files are compiled by the Makefile of the HyperCast module (as long as the module is copied to the location listed above). The Pastry class files will be included into hypercast.jar.

The following commands

make Pastry

Tests if /src/hypercast/Pastry directory is available (note that Pastry files are in a separate module) and compiles source files.

make, make complete
Creates configuration defaults, compiles all sources, creates lib/hypercast.jar. When the Pastry module is place in ./src/hypercast/Pastry, the command  also compiles Pastry sources and includes the files in the hypercast.jar file.

4. Pastry module and Eclipse

The Pastry file module can be placed in the project where the HyperCast module is kept. The files must be placed in directory src/hypercast
It is also possible to keep the files of the Pastry module in a separate project (from the project with HyperCast sources). Here, the Pastry directory has to be copied to into the src/hypercast directory.

5. Other

Version number: The Pastry directory contains a "Version" program  which works similar to the Version of hypercast. Assuming that the classpath is set correctly, the Pastry Version is displayed with: 
    >java hypercast.Pastry.Version

Makefile: The module contains a Makefile that can be used to create ZIP archives of the Pastry module with sources.