[seek-dev] get operation in ecogrid query

Jing Tao tao at nceas.ucsb.edu
Tue Dec 2 16:47:10 PST 2003


Hi, Bing:

On Tue, 2 Dec 2003, Bing Zhu wrote:

> Jing,
> 
> I have some comments here.
> 
> 1. In SRB, the identifier will be the SRB ID.
>     In the get operation for SRB, this SRB ID is translated into following:
>             host name  (e.g. multivac.sdsc.edu)
>             Physical file name with path in that machine.
>     In this case, the source will be either NULL or a port number in getting
> a SRB file.
>

The source URI is for gsiftp server. So you may just put 
"gsiftp://multivac.adsc.edu:5678" as the source URI.

For example, here is you get method:

get("gsiftp://multivac.adsc.edu:5678", "file:///tmp/hello.jpg", 
"mutivac.adsc.edu/data/image/hello.jpg")

In your implemenation, you can tolken the identifier and get the file path 
-"data/image/hello" and combine it with the uri of ftp server 
-"gsiftp://multivac.adsx.edu:5678/data/image/hello.jpg".

The combination - "gsiftp://multivac.adsx.edu:5678/data/image/hello.jpg" 
will be passed to another class EcoGridFTPTransfer as source uri and 
"file:///tmp/hello.jpg" will be passed to EcoGridFTPTransfer as 
destination uri. Then you call transfer() method, the file transfer will be finished 
by ftp server. (The detail is in EcoGridFTPTransfer.java)

 
> 2. It is better for the return value from 'get' operation to:
>         0 --> succeeded.
>         a negative number -> failed. The number is the error code
> corresponding to an error.
>                                        In SRB, failure to retrieve a file
> has many causes. 0 and 1 is not
>                                        not sufficient to handle error code
> information.
  
  That is good suggestion, we may do that.

> 3.  We need to have a way to let system admin to turn on or off the Debug
>      by modifying some configuration file(s) such as server-config.wsdd
> before starting SEEK Ecogrid
>      factory services. I wonder how Tomcat is handling this. If they already
> have a build-in function to
>      check if Debug is on or off, we need to put such function call for each
> System.out.println statement.

Yes, we need a way to turn on or off the debug. This is the reseaon I want 
create a debugger class. According the configuration, this debugger will 
be turned on or off. Metacat already have this mechanism. You can turn on 
or off in build.xml when you install it.

Thanks!

Jing

> 
> Bing
> 
> 
> 
> -----Original Message-----
> From: seek-dev-admin at ecoinformatics.org
> [mailto:seek-dev-admin at ecoinformatics.org]On Behalf Of Jing Tao
> Sent: Tuesday, December 02, 2003 2:59 PM
> To: seek-dev at ecoinformatics.org
> Subject: [seek-dev] get operation in ecogrid query
> 
> 
> Hi, everyone:
> 
> After struggling with some issues, the framework of get operation in
> ecogrid query interface is almost done(I have not implmented read document
> from metacat part, but that is not hard). Before I do that, I would
> like to get some response.
> 
> The get method looks like:
> 
> int get(URI source, URI destination, String identifier).
> 
> This method is base on gsiftp and will return 1 if transfer successfully,
> otherwise return 0. Besides server to client transfer, this method also
> support third party transfer (ftp sever to another ftp server) too.
> 
> Now the query porttype is secured because running gsiftp need the user's
> credential. So user should have a certification if he need to run the
> client.
> 
> Some issues:
> 1.
> The tansfer is base on file system. For example, you call the method like
> this way:
> URI source = new URI("gsiftp://pine.nceas.ucsb.edu:5678");
> URI dest   = new URI("file:///tmp/file1");
> get(source, dest, "tao.11.1");
> 
> Metacat would like read tao.11.1 from database and write it to a file.
> Then gsiftp server will transfer this file  to local file /tmp/file1. It has
> lot of I/Os. Maybe this way is good for srb (they store data as file).
> 
> 2.
> In the code, System.out.println is used for debug info. I am think if we
> need a debug class for whole seek java code or for ecogrid java code?
> 
> Any comments and suggestion are appreciated!
> 
> Jing
> 
> 
> --
> Jing Tao
> National Center for Ecological
> Analysis and Synthesis (NCEAS)
> 735 State St. Suite 204
> Santa Barbara, CA 93101
> 
> 
> _______________________________________________
> seek-dev mailing list
> seek-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/seek-dev
> 

-- 
Jing Tao
National Center for Ecological
Analysis and Synthesis (NCEAS)
735 State St. Suite 204
Santa Barbara, CA 93101





More information about the Seek-dev mailing list