Java CoG Kit Examples Guide

Gregor von Laszewski

Software Version: 4_1_3
Url: http://www.cogkit.org/release/4_1_3/manual/examples.pdf
Url: http://www.cogkit.org/release/4_1_3/manual/examples/examples.html
Last update: September 3, 2005

Contents

1 About this Document
 1.1 Viewing
 1.2 Format
2 Registration
3 Introduction
4 Task Management Examples
5 Workflow Examples
6 Data Management Examples
7 Abstractions Examples
 7.1 Job Submission
 7.2 File transfer
 7.3 Authentication
8 jglobus Examples
 8.1 Job Submission
 8.2 File transfer
 8.3 Authentication
 8.4 Information Query with LDAP
9 Matlab Examples
 9.1 Job Submission
 9.2 File transfer
 9.3 Authentication
 9.4 Workflow
10 SSH Examples
 10.1 Job Submission
 10.2 File transfer
 10.3 Authentication
 10.4 Workflow
11 Interoperability Examples
 11.1 Workflow
12 Format
13 Java CoG Kit Abstractions
 13.1 LocalFileResourceTest
 13.2 WebDAVFileResourceTest
 13.3 GridFTPFileResourceTest.java
 13.4 FileResourceTest
 13.5 FileOperationTest
 13.6 FTPFileResourceTest
 13.7 JobSubmission
 13.8 FileResourceExample
 13.9 HeiarchicalQueue
 13.10 DynamicScheduling
 13.11 HierarchicalSet
 13.12 HierarchicalDAG
 13.13 HierarchicalDAGVisualizer
 13.14 FileTransfer
 13.15 Task2XML
 13.16 TaskGraph2XML
 13.17 XML2Task
 13.18 XML2TaskGraph
14 Gridface
 14.1 desktop.xml
 14.2 ex-all.gsh
 14.3 goWorld.gsh
15 Graph Editor
 15.1 graph1.xml
 15.2 graph2.xml
 15.3 graph3.xml
 15.4 graph4hierarchy.xml
 15.5 large-graph.xml
Appendix
A Availability of the Document
B Bugs
C Administrative Contact

 

1 About this Document

This document includes a list of examples that we provide as part of the Java CoG Kit. The examples are not comprehensive, but show many of the features of the Java CoG Kit.If you have a good example that you like to have added here, please let us know.

1.1 Viewing

The best way to read this document is to use the PDF version and read it with Adobe Acrobat Reader. Please make sure you configure Adobe Acrobat Reader appropriately so you can follow hyperlinks. This is the case if you follow the default installation. Acrobat Reader is available at http://www.adobe.com/products/acrobat/readermain.html. Because the hyperlinks are not available in the printed form of this manual and we support saving our environment we strongly discourage printing this document.

We recommend that you save this manual locally on your machine and use Acrobat Reader. This has the advantage that you do not lose your anchor points while switching back and forth between different hyperlinks. An HTML version of this manual is planed, but not available yet.

1.2 Format

We have augmented the document with some comments at places where we found issues. Our intend is to address these issues in a future release. The comments are marked by the icon  to do  and the name of the person that will work on the removal of the issue.

2 Registration

Please be a team player and support us indirectly by registering with us or reporting your use of the Java CoG Kit. Although this software is free, we still need to justify to our funders the usefulness of the projects. If you want to help us with our efforts please take a few seconds to complete this information. We do not use this information for other purposes. If you have special needs or concerns please contact gregor@mcs.anl.gov. The registration form can filled out in a variety of formats. The online form can be found at

http://www.cogkit.org/register

This form is available also as ASCII text at

http://www.cogkit.org/register/form.txt

which you can FAX to

Gregor von Laszewski, Fax: 630 252 1997

3 Introduction

We will restructure the sections once we have a complete list of examples.

4 Task Management Examples

5 Workflow Examples

6 Data Management Examples

7 Abstractions Examples

7.1 Job Submission

 to do 

7.2 File transfer

 to do 

7.3 Authentication

 to do 

8 jglobus Examples

8.1 Job Submission

 to do 

8.2 File transfer

 to do 

8.3 Authentication

 to do 

8.4 Information Query with LDAP

 to do 

9 Matlab Examples

9.1 Job Submission

 to do 

9.2 File transfer

 to do 

9.3 Authentication

 to do 

9.4 Workflow

 to do 

10 SSH Examples

10.1 Job Submission

 to do 

10.2 File transfer

 to do 

10.3 Authentication

 to do 

10.4 Workflow

 to do 

11 Interoperability Examples

11.1 Workflow

 to do 

This is the update on examples for Core

12 Format

13 Java CoG Kit Abstractions

13.1 LocalFileResourceTest

Short Title:
LocalFileResourceTest
Description:
???
Filename:
LocalFileResourceTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.2 WebDAVFileResourceTest

Short Title:
WebDAVFileResourceTest
Description:
???
Filename:
WebDAVFileResourceTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.3 GridFTPFileResourceTest.java

Short Title:
GridFTPFileResourceTest.java
Description:
???
Filename:
GridFTPFileResourceTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.4 FileResourceTest

Short Title:
FileResourceTest
Description:
???
Filename:
FileResourceTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.5 FileOperationTest

Short Title:
FileOperationTest
Description:
???
Filename:
FileOperationTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.6 FTPFileResourceTest

Short Title:
FTPFileResourceTest
Description:
???
Filename:
FTPFileResourceTest.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

13.7 JobSubmission

Short Title:
JobSubmission
Description:
Submit jobs to execute on the grid
Filename:
JobSubmission.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/execution
Remarks:
[X] example works - cannot currently do ssh submit, others work

13.8 FileResourceExample

Short Title:
FileResourceExample
Description:
Shows how to use file resource
Filename:
FileResourceExample.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/file
Remarks:
[X] I do not know, we need to check

src/cog/modules/core-examples/src/org/globus/cog/core/examples/queue/

13.9 HeiarchicalQueue

Short Title:
HeiarchicalQueue
Description:
Shows how to create a queue of tasks
Filename:
HierarchicalQueue.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/queue
Remarks:
Remarks: [X] example works (However, ”this is not a command line client”. It shows how you can execute a Hierarchical Qoueue programatically. Users have to edit task specifications to suite their needs) [ ] I do not know, we need to check - may work for kaizar since hard coded strings referencing files in his direcectories

13.10 DynamicScheduling

Short Title:
DynamicScheduling
Description:
Shows how to do dyanamic scheduling
Filename:
DynamicScheduling.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/scheduler
Remarks:
[X] example does not work – ”This example was demonstrating the scheduling framework I once developed using condor classAds. It never became a part of mainstream cog. I will clean it and make a new module” [ ] I do not know, we need to check - may work for kaizar since hard coded strings referencing files in his direcectories

13.11 HierarchicalSet

Short Title:
HierarchicalSet
Description:
Shows how to create a hiearchical set
Filename:
HierarchicalSet.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/set
Remarks:
[X] example works (However, ”this is not a command line client”. It shows how you can execute a Hierarchical Set programatically. Users have to edit task specifications to suite their needs) [ ] I do not know, we need to check - may work for kaizar since hard coded strings referencing files in his direcectories

13.12 HierarchicalDAG

Short Title:
HierarchicalDAG
Description:
Create a Hieararchical Directed Asyclic Task Graph
Filename:
HierarchicalDAG.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/taskgraph
Remarks:
[X] example works (However, ”this is not a command line client”. It shows how you can execute a Hierarchical DAGs programatically. Users have to edit task specifications to suite their needs) [ ] I do not know, we need to check - may work for kaizar since hard coded strings referencing files in his direcectories

13.13 HierarchicalDAGVisualizer

Short Title:
HierarchicalDAGVisualizer
Description:
See a Directed Asyclic Task Graph
Filename:
HierarchicalDAGVisualizer.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/taskgraph
Remarks:
[X] example works (However, ”this is not a command line client”. It shows how you can execute a Hierarchical DAGs visually programatically. Users have to edit task specifications to suite their needs) [ ] I do not know, we need to check - may work for kaizar since hard coded strings referencing files in his direcectories

13.14 FileTransfer

Short Title:
FileTransfer
Description:
Demonstrates how to transfer files
Filename:
FileTransfer.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/transfer
Remarks:
[X] example works for gridftp and local. Doesnt work for scp and ftp since we dont have default credentials for them.

13.15 Task2XML

Short Title:
Task2XML
Description:
Make a task into xml file
Filename:
Task2XML.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/xml
Remarks:
[X] example works

13.16 TaskGraph2XML

Short Title:
TaskGraph2XML
Description:
Make a taskgraph into xml file
Filename:
TaskGraph2XML.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/xml
Remarks:
[X] example works

13.17 XML2Task

Short Title:
XML2Task
Description:
Make an xml file into a task
Filename:
XML2Task.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/xml
Remarks:
[X] example works

13.18 XML2TaskGraph

Short Title:
XML2TaskGraph
Description:
Make an xml file into a taskgraph
Filename:
XML2TaskGraph.java
Path:
src/cog/modules/core-examples/src/org/globus/cog/core/examples/xml
Remarks:
[X] example works

14 Gridface

14.1 desktop.xml

Short Title:
desktop.xml
Description:
Loads a desktop state
Filename:
desktop.xml
Path:
src/cog/modules/gridfaces/examples
Remarks:
[X] example works

14.2 ex-all.gsh

Short Title:
ex-all.gsh
Description:
Runs all the examples from the manual
Filename:
ex-all.gsh
Path:
src/cog/modules/gridfaces/examples/shell/manual
Remarks:
[X] example works - ensure to configure gnet.gsh and connection.gsh first

14.3 goWorld.gsh

Short Title:
goWorld.gsh
Description:
Transfers GoWorld.java to a remote machine, compiles it, and runs it
Filename:
goWorld.gsh
Path:
src/cog/modules/gridfaces/examples/shell/demo
Remarks:
[X] example works - ensure to modify line ”gnetconfig eth2” to your set the ipaddress for your computer correctly. Also, if you are not on wiggum.mcs.anl.gov ensure to change the url and the path to java.

15 Graph Editor

15.1 graph1.xml

Short Title:
graph1.xml
Description:
A Graph Xml file that can be loaded into the graph editor
Filename:
graph1.xml
Path:
src/cog/modules/grapheditor/examples
Remarks:
[X] example works

15.2 graph2.xml

Short Title:
graph2.xml
Description:
A Graph Xml file that can be loaded into the graph editor
Filename:
graph2.xml
Path:
src/cog/modules/grapheditor/examples
Remarks:
[X] example works

15.3 graph3.xml

Short Title:
graph3.xml
Description:
A Graph Xml file that can be loaded into the graph editor
Filename:
graph3.xml
Path:
src/cog/modules/grapheditor/examples
Remarks:
[X] example works

15.4 graph4hierarchy.xml

Short Title:
graph4hierarchy.xml
Description:
A Graph Xml file that can be loaded into the graph editor
Filename:
graph4hierarchy.xml
Path:
src/cog/modules/grapheditor/examples
Remarks:
[X] example works - looks same as graph3.xml?

15.5 large-graph.xml

Short Title:
large-graph.xml
Description:
A Graph Xml file that can be loaded into the graph editor
Filename:
large-graph.xml
Path:
src/cog/modules/grapheditor/examples
Remarks:
[X] example works

References

[1]   G. von Laszewski, I. Foster, J. Gawor, and P. Lane, “A Java Commodity Grid Kit,” Concurrency and Computation: Practice and Experience, vol. 13, no. 8-9, pp. 643–662, 2001. [Online]. Available: http://www.mcs.anl.gov/~gregor/papers/vonLaszewski--cog-cpe-final.pdf

[2]   “Java CoG Kit Wiki,” 2004. [Online]. Available: http://www.cogkit.org/wiki

[3]   “Java CoG Kit Registration,” 2004. [Online]. Available: http://www.cogkit.org/register

Additional publications about the Java CoG Kit can be found as part of the vita of Gregor von Laszewski http://www-unix.mcs.anl.gov/~laszewsk/vita.pdf. Most documents are avalable online if you follow the links. In future we intend to provide this information without Gregors vita data.

If you need to cite the Java CoG Kit, please use [1].

Appendix

A Availability of the Document

The newest version of this document can be downloaded by the developers from

  1. cvs -d:pserver:anonymous@cvs.cogkit.org:/cvs/cogkit checkout manual/guide

It is not allowed to reproduce this document or the source. This documentation is copyrighted and is not distributed under the CoG Kit license.

B Bugs

We use Bugzilla for tracking bugs and for enhancement suggestions. It is located in the bugzilla.globus.org, but you may find it easier to use one of the following quick links:

C Administrative Contact

The Java CoG Kit project has been initiated and is managed by Gregor von Laszewski. To contact him, please use the information below.

Gregor von Laszewski
Argonne National Laboratory
Mathematics and Computer Science Division
9700 South Cass Avenue
Argonne, IL 60439
Phone: (630) 252 0472
Fax: (630) 252 1997
gregor@mcs.anl.gov

Index

Administrative Contact, 11

Contact, 11

desktop.xml, 8
DynamicScheduling.java, 6

ex-all.gsh, 8
Example
    desktop.xml, 8
    DynamicScheduling.java, 6
    ex-all.gsh, 8
    FileOperationTest.java, 5
    FileResourceExample.java, 6
    FileResourceTest.java, 5
    FileTransfer.java, 7
    FTPFileResourceTest.java, 5
    goWorld.gsh, 8
    graph1.xml, 9
    graph2.xml, 9
    graph3.xml, 9
    graph4hierarchy.xml, 9
    GridFTPFileResourceTest.java, 5
    HierarchicalDAG.java, 7
    HierarchicalDAGVisualizer.java, 7
    HierarchicalQueue.java, 6
    HierarchicalSet.java, 6
    JobSubmission.java, 5
    large-graph.xml, 9
    LocalFileResourceTest.java, 4
    Task2XML.java, 7
    TaskGraph2XML.java, 7
    WebDAVFileResourceTest.java, 5
    XML2Task.java, 8
    XML2TaskGraph.java, 8

FileOperationTest.java, 5
FileResourceExample.java, 6
FileResourceTest.java, 5
FileTransfer.java, 7
FTPFileResourceTest.java, 5

goWorld.gsh, 8
graph1.xml, 9
graph2.xml, 9
graph3.xml, 9
graph4hierarchy.xml, 9
GridFTPFileResourceTest.java, 5

HierarchicalDAG.java, 7
HierarchicalDAGVisualizer.java, 7
HierarchicalQueue.java, 6
HierarchicalSet.java, 6

JobSubmission.java, 5

large-graph.xml, 9
LocalFileResourceTest.java, 4

Registration, 2

Task2XML.java, 7
TaskGraph2XML.java, 7

WebDAVFileResourceTest.java, 5

XML2Task.java, 8
XML2TaskGraph.java, 8