About Ecogrid services from SRB =============================== Currently there are two ecogrid services available for SRB system. They are: Ecogrid Query Service Ecogrid Put service The Ecogrid query service has two operations, 'query' and 'get'. With these two operations, user can query SRB system and get data from SRB files. Note that getting metadata for SRB objects(files) is done via query operation. Please check out SRB examples for details. The Ecogrid put service in SRB allows user to upload files into SRB or add descriptive metadata for existing SRB files. Both getting SRB data and uploading SRB data require user credential via SRB URI which adopts the URI standard as of following. srb://username:password@hostname/home/... GSHs at orion.sdsc.edu for SRB ecogrid services (quey and put) ============================================================== Query Service: http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne Put Service: http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/PutServiceLevelOne SRB Query ========= Our general syntax of our Ecogrid query client is: $ java EcogridQueryClient query local_filename GSH , where the GSH should be ecogrid's query service. The SRB search now supports anonymous search for scientific data in SEEK project. User info such as user credential is no longer required to submit a query document to SRB system. Five sample query documents are provided in this package in the directory, examples. srb_query1.xml Here is an example of running a SRB query. $ source ./setenv.csh $ setenv QUERY_GSH http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne $ java EcogridQueryClient query ./examples/srb_query1.xml $QUERY_GSH For Windows user: $ setenv $ set QUERY_GSH=http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne $ java EcogridQueryClient query ./examples/srb_query1.xml %QUERY_GSH% SRB Get ======= The 'get' data operation is part of ecogrid's query service. The SRB user credential is required to retrieve files. The syntax for retrieving SRB files is: $ java EcogridQueryClient get SRBuri localfile GSH SRBuri: SRB file name in URI format which should include user credential as defined in URI standard. e.g. srb://testuser.sdsc:password@defaulthost/home/testuser.sdsc/SRB.jpg localfile: a filename to be used to save data into local disk. A '.' can be used to tell SRB client to save the file into local disk with the same SRB filename. GSH: pointing the ecogrid's query service. e.g. $ source ./setenv.csh $ setenv QUERY_GSH http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne $ java EcogridQueryClient get srb://testuser.sdsc:PASSWD@defaulthost/home/testuser.sdsc/SRB.jpg . $QUERY_GSH For Windows user: $ setenv $ set QUERY_GSH=http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne $ java EcogridQueryClient get srb://testuser.sdsc:PASSWD@defaulthost/home/testuser.sdsc/SRB.jpg . %QUERY_GSH% Note the 'PASSWD' should be actual password in running these examples. SRB Put Data (upload files) =========================== Since a user should have permission to upload file(s) into a collection, user credential is required to perform this operation. The syntax for running ecogrid client is: $ java EcogridPutClient data|metadata localfile SRBfile sessioId GSH data or metadata : a flag to tell SRB server that a user is uploading file (data) or metadata. localfile: the local file name for the data or metadata to be uploaded. In the case of metadata, the file is a XML document which conforms the XML schema, SRB_Metadata.xsd. (Basically, SRB metadata model consists of three paired metadata.) SRBfile: In uploading file (data), this is the URI for a new SRB file name to be created. When uploading metadata, this is the existing SRB file name. sessioId: The 'sessionId' is reserved for future use. Currently it is ignored and therefor can be any string. Examples: $ setenv PUT_GSH http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/PutServiceLevelOne $ java EcogridPutClient data ./examples/SRB2.jpg \ srb://testuser.sdsc:TESTUSER@defaulthost/home/testuser.sdsc/SRB2.jpg \ 0 $PUT_GSH $ java EcogridPutClient metadata examples/srb_metadata.xml \ srb://testuser.sdsc:TESTUSER@defaulthost/home/testuser.sdsc/SRB2.jpg \ 0 $PUT_GSH For Windows user: $ set PUT_GSH=http://orion.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/PutServiceLevelOne $ java EcogridPutClient data ./examples/SRB2.jpg srb://testuser.sdsc:TESTUSER@defaulthost/home/testuser.sdsc/SRB2.jpg 0 %PUT_GSH% $ java EcogridPutClient metadata examples/srb_metadata.xml srb://testuser.sdsc:TESTUSER@defaulthost/home/testuser.sdsc/SRB2.jpg 0 %PUT_GSH% Remark: Since SRB is a distributed grid system, a physical resource info is required when a file needs to be uploaded into SRB. In our Ecogrid SRB Put service, a default value for physical resource is provided and is pointing to 'unix-sdsc', a UNIX storage place at SDSC. However, user still has an option to specify a storage place for a file to be placed. This can be done through SRB URI with syntax similar to a cgi request with keyword 'defaultResource'. e.g. $java EcogridPutClient data BioImage001.jpg \ "srb://testuser.sdsc:passwd@srb.sdsc.edu/home/testuser.sdsc/BioImage001.jpg?defaultResource=test-unix" \ 0 $PUT_GSH In this example, the SRB file will be uploaded into 'test-unix'. (Don't forget the "" in this format, otherwise the '?' will cause the command not to able to pass to OS correctly.) other SRB GSHs ============== http://sasa.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/QueryServiceLevelOne http://sasa.sdsc.edu:8080/ogsa/services/org/ecoinformatics/ecogrid/PutServiceLevelOne Misc ==== Please send mail to srb@sdsc.edu should you have any question. Bing Zhu SRB Team San Diego Supercomputer Center University of California: San Diego Dec 10, 2004