1 / 10

Java Commodity Grid (Java CogKit)

Java Commodity Grid (Java CogKit).

Download Presentation

Java Commodity Grid (Java CogKit)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Commodity Grid (Java CogKit) • Java CogKits allow developers to use commodity technologies such as Java or Python in programming the Grid based on Globus. The Java CogKit provides a mapping between Java and the Globus Toolkit. However, it is not a wrapper of the Globus Toolkit. Java CogKit provides the following basic services: • Security • Remote job submission and monitoring • Remote data access • Information service access • Certificate store

  2. Java Commodity Grid (Java CogKit) • Aim: To download a file using GridFTP. • Create a directory under /grid/users/<your_name>/samples/ called ‘resourcemanagement.’. • cd grid/users/tugba • mkdir samples • cd samples • mkdir resourcemanagement • Create a test file called “TestGridFile” then write something to the file. Save it under /grid/users/<your_name>/samples/resourcemanagement. • Open another terminal and create the same directory structure as above. Then, download “MyGridFTP.java” and “GramExampleMulti.java” files to newly created directory. Then compile the files.

  3. Java Commodity Grid (GridFTP)

  4. Java Commodity Grid (GridFTP)

  5. Java Commodity Grid (GridFTP)

  6. Java Commodity Grid (Java CogKit) • Create a new Java file called “TestGridFTP.java”. Then write the following lines to that file: import org.apache.log4j.Logger; import org.apache.log4j.Level; import org.globus.ftp.*; public class TestGridFTP { public static void main(String [] args){ Logger.getRoot().setLevel(Level.INFO); // remote files String rf1 = "/grid/users/tugba/samples/resourcemanagement/TestGridFile"; String host = "concorde01.mcs.surrey.ac.uk"; // local files String lf1 = "/grid/users/tugba/samples/resourcemanagement/TestGridFile"; int TRANSFER_TYPE = GridFTPSession.TYPE_ASCII; MyGridFTP myGridFTP1 = new MyGridFTP(host, MyGridFTP.GRIDFTP_PORT,"/tmp/x509up_u28008",true); myGridFTP1.parallelDownload(rf1,lf1); myGridFTP1.close(); } } • Run the “TestGridFTP.java”. java TestGridFTP • Exercise: Look at the Java implementation of MyGridFTP and transfer a local file to a remote computer.

  7. Java Commodity Grid (GRAM)

  8. Java Commodity Grid (GRAM)

  9. Java Commodity Grid (Java CogKit) • Create a Java file called “TestGram.java” under the same directory. Write the following lines to the file. public class TestGram { public static void main(String [] args){ String [] contact = new String[1]; contact[0] = “concorde02.mcs.surrey.ac.uk”; GramExampleMulti gramm = new GramExampleMulti(contact, false); String [] rsl_command = new String[1]; rsl_command[0] = new String("&(executable=/opt/SUNWjava/j2sdk1.4.1_01/bin/java)(directory=/grid/users/tugba/samples/resourcemanagement)(arguments= HelloWorld)"); String jobOut = gramm.GlobusRun(rsl_command); System.out.println("Output:" + jobOut); } } • Compile and run the program.

  10. Java Commodity Grid (Java CogKit) • Exercise: • Implement the following tasks: • You want to count from 1 to a number x (such as 10000). The number x and the number of machines y to be used for counting process will be submitted to the service provider. • The service that received the request will parallelise the process by executing the query on y number of machines. • The service provider will send the output back to the client machine.

More Related