www.mamboteam.com
Globus Toolkit 4: Programming Java Services
Home arrow Errata arrow Updated FileBuy Instructions
Wednesday, 10 March 2010
 
 
Updated FileBuy instructions
Wednesday, 30 August 2006
Although the book already includes instructions on how to build and run the FileBuy application, they will only work out-of-the-box using the setup described in the book (running the entire application on a single machine). The instructions in this page will work in the more general case (running FileBuy with each service deployed on a different machine), and are updated for FileBuy 1.1.

MDS Setup

The MDS setup described in the book (setting up the Index Service, and registering the services in the Index Service) is still valid.

Seller Component

To build the service:

./globus-build-service.sh filebuy_buyer jarStubs

cp $EXAMPLES_DIR/ build/lib/org_globus_examples_services_filebuy_buyer_stubs.jar \
org/globus/examples/services/filebuy/transfer/lib/

./globus-build-service.sh filebuy_transfer

./globus-build-service.sh filebuy_seller

To deploy:

globus-deploy-gar $EXAMPLES_DIR/org_globus_examples_services_filebuy_transfer.gar
globus-deploy-gar $EXAMPLES_DIR/org_globus_examples_services_filebuy_seller.gar

AddFile client

To compile:

javac \
-classpath ./build/stubs/classes/:$CLASSPATH \
org/globus/examples/clients/filebuy/FilesForSale/AddFileClient.java

To run:

java \
-classpath ./build/stubs/classes/:$CLASSPATH \
org.globus.examples.clients.filebuy.FilesForSale.AddFileClient \
https://pc-seller:8443/wsrf/services/examples/filebuy/seller/FilesForSaleFactory \
file.txt \
/tmp/file.txt \
25

Broker Component

To build:

./globus-build-service.sh filebuy_seller jarStubs
cp $EXAMPLES_DIR/build/lib/org_globus_examples_services_filebuy_seller_stubs.jar \
org/globus/examples/services/filebuy/broker/lib/
./globus-build-service.sh filebuy_broker

To deploy:

globus-deploy-gar $EXAMPLES_DIR/org_globus_examples_services_filebuy_broker.gar 

FindFile Client

This client requires the FileBroker stubs. If the FileBuy source is available in the machine where FindFile will be run, we can simply do this:

./globus-build-service.sh filebuy_broker compileStubs

Otherwise, we need to create the JAR files for the stubs, and copy them to the machine which will be using FindFile (that machine will still need GT4 installed to provide all necessary client libraries). To create the JAR file:

./globus-build-service.sh filebuy_broker jarStubs

Then, copy file org_globus_examples_services_filebuy_broker_stubs.jar (in directory $EXAMPLES_DIR/build/lib) to the machine that will be running FindFile (make sure the file is is the client's CLASSPATH).

To compile the client:

javac \
-classpath ./build/stubs/classes/:$CLASSPATH \
org/globus/examples/clients/filebuy/FileBroker/FindFileClient.java

To run:

java \
-classpath ./build/stubs/classes/:$CLASSPATH \
org.globus.examples.clients.filebuy.FileBroker.FindFileClient \
https://pc-broker:8443/wsrf/services/examples/filebuy/broker/FileBroker \
file.txt \
100

Buyer Component

To build:

./globus-build-service.sh filebuy_broker jarStubs

cp $EXAMPLES_DIR/ build/lib/org_globus_examples_services_filebuy_broker_stubs.jar \
org/globus/examples/services/filebuy/buyer/lib/

./globus-build-service.sh filebuy_buyer


To deploy:

globus-deploy-gar $EXAMPLES_DIR/org_globus_examples_services_filebuy_buyer.gar 

FileBuy Client

To compile:

javac \
-classpath ./build/stubs/classes/:$CLASSPATH \
org/globus/examples/clients/filebuy/FileBuyer/FileBuyClient.java

To run:

java \
-classpath ./build/stubs/classes/:$CLASSPATH \
org.globus.examples.clients.filebuy.FileBuyer.FileBuyClient \
https://localhost:8443/wsrf/services/examples/filebuy/buyer/FileBuyer \
FileOrder-file.txt.epr
Last Updated ( Wednesday, 30 August 2006 )
 
 
Top! Top!