File Agent Service

From Ogce

Contents

Introduction

The File Agent Service provides metadata of the community data space. Community owned data spaces often provide convinient access to the users and computing processes. Since community data space requires community proxy certificates instead of personal proxy certificates, it is relatively easy to manage for the applications and individual users. In addition, it still provides minimum security scheme within the community. However, the community data space requires to be organized properly so that users can access their data products with certain level of privacy to other community members. The File Agent Service stores metadata of the community data space including informations about the user's personal space.

Installation

Currently, File Agent Service V.0.7 is available as a part of OGCE portalrelease.

From the directory of ogce-portal-only/,

 mvn clean install -f local_services/FileAgentService/pom.xml

The File Agent Service is deployed to the default servlet container included in the OGCE release. Please follow the guide of the OGCE portal.

Operations

The File Agent Serivce is a web service providing access to the information about community user space. This user space is accessed with Teragrid community certificate. This version provides 7 operations including 3 operations from the previous version.

queryDataSpaceInfo

This operation provides query interface to the data space information. Input parameter is query statement described in WSDL and output parameter is the query result. Here is how to build an input query for this operation. First, dataspace information includes following items,

  • username : user's id (e.g. portal id)
  • host: remote location of the data resource
  • port: port number of the data resource
  • commCertDN: DN of the community certificate that used for this resource
  • protocol: protocol to access this resource
  • LogicalUserSpace: logical user space assigned for the user


Above items are accessible through getter/setter methods of the FASBean object that is included in the FileAgentService.aar file.

For example,

FASBean fb = new FASBean();
fb.setUsername("fiona");
fb.setHost("gridfarm001.ucs.indiana.edu");
fb.setPort("2811");
fb.setCommCertDN("/C=US/O=National Center for Supercomputing Applications/CN=QuakeSim Community User  ");
fb.setProtocol("gridftp");
fb.setLogicalUserSpace("/home/communityspace/fiona");

For the queryDataSpaceInfo operation, you can build very simple query without knowing any of complicated query language. Specify items that you know exactly. Leave items as null if you are not sure. This operation will process the null item as a wildcard in the query.

For example, if you want to get all the dataspace information about user A in the host GGG, then set the username and host and leave everything else as null. (Just don't set the value).

For more example, please refer sample code included in the package, org.ogce.fileagentservice.client.QueryUserSpace

registerDataSpaceInfo

This operation registers new data space information. Define FASBean and use it as parameter of this operation. You can create FASBean using the FASBean class included in the FileAgentService jar file.

FASBean fb = new FASBean();
fb.setUsername("fiona");
fb.setHost("gridfarm001.ucs.indiana.edu");
fb.setPort("2811");
fb.setCommCertDN("/C=US/O=National Center for Supercomputing Applications/CN=QuakeSim Community User  ");
fb.setProtocol("gridftp");
fb.setLogicalUserSpace("/home/communityspace/fiona");

For more example, please refer the sample code. org.ogce.fileagentservice.client.AddNewUserSpace

removeDataSpaceInfo

This operation removes data space inforamtion. This works very similar to the queryDataSpaceInfo operation. Therefore, if you want to remove all of the information about user A, you can use this operation with specifying username only. For other items, simply do not set anything. [NOTE]
Please note if you set complete null input parameter to thie operation, it will completely reset your database. For more example, please refer the sample code included in our source code distribution. package org.ogce.fileagentservice.client.RemoveUserSpace

createDataSpace

[TODO] This operation is almost same with thte registerDataSpaceInfo operation. On top of creating data space information, this operation will access the remote resource and create your's logical space as well.

queryUserSpaceConvention

This is a utility operation for the advanced users. If the administor wants to organize ther user's logical space with more standard convention, 3.5 ~ 3.7 operations should be very useful. This operation provides following informations,

   * host: host name of the remote resource
   * port: port number of the remote resource
   * attr: attribution of this convention
   * defaultLoc : convention of the user space

For example, let's assume that an administrator should organize users' data under the community space which is /g/d/commUser. This space is hosted by host A and port 1234. Also this host has multiple mounted resources such as /tg/h/j/hpss for the HPSS server, and /sc/datacatacitor for the High performance data capacitor. The user's space can be organized following way.

host: A port: 1234 attr: High performance data capacitor defaultLoc: /sc/datacapacitor/userspace/username

host: A port: 1234 attr: Network File System defaultLoc: /g/d/commUser/userspace/username

host: A port: 1234 attr: HPSS defaultLoc: /tg/h/j/hpss/userspace/username

Based on these informations, when a new user tries to create a data space, the system can query the convention of the defaultLoc and create the user space accordingly. Also the application can show the attribute of the location so that it can provide more precise information instead encrypted directory path.

You can use this operation in very similar way to the queryDataSpaceInfo. Specify all of the items you know exactly and send the request. The operation will process your query as predicates combined as AND predicates and process non-specified items as wildcard items.

For more detail example, please refer to the sample code.

registerUserSpaceConvention

This operation registers new User space convention. Section 3.5 explains how to organize the community user space using this operation. For more information, please refer the sample code.

removeUserSpaceConvention

This operation removes user's space convention. For more information, please refer the sample code.


Command line client

Command line tool provides immediate access to the FAS server. This is very useful for the test runs. To user this command line tool, you don't need to run the service on your site. You will need only client of the service.

Step 1. You should download this . All of the example, script files are included.

Step 2. Run the command.

(1)To create new user space

./run.sh AddNewUserSpace -f [FAS service location] -l [username] -h [host name] 
                         -p [port number] -dn [DN of the community cert for this host] 
                         -pr [protocol] -us [logical space for this user]

e.g.) ./run.sh AddNewUserSpace -l testuser -h "gridfarm001.ucs.indiana.edu" -p "2811" -pr "gridftp" -us "/home/quakesim/"

(2)To query user space

./run.sh QueryUserSpace -f [FAS service location] -l [username] -h [host name] 
                        -p [port number] -dn [DN of the community cert for this host] 
                        -pr [protocol] -us [logical space for this user]

e.g.) ./run.sh QueryUserSpace -l testuser

(3)To remove user space

./run.sh RemoveUserSpace -f [FAS service location] -l [username] -h [host name] 
                         -p [port number] -dn [DN of the community cert for this host] 
                         -pr [protocol] -us [logical space for this user]

e.g.) ./run.sh RemoveUserSpace -l testuser

[NOTE]

  • Default value of FAS service location is,

http://gridfarm002.ucs.indiana.edu:8080/axis2/services/FileAgentService

  • Default value of DN of the Community Certificate is Teragrid Quakesim cert.

/C=US/O=National Center for Supercomputing Applications/CN=QuakeSim Community User


Sample Client Script

Script file generateDB.sh is designed especially for the demo at SC07. This script manages three accounts, leesangm, mpierce, and yuma. First, all of the information about these users will be removed.Then new information will be registered. If you want to modify information, open generateDB.sh modify it, and run it.

To run this script,

  • Step 1. You should download this. All of the library jar files, and script files are included.
  • Step 2. Run the command.
./generateDB.sh

File Agent Serivce is a web service providing access to the information about community user space. This user space is accessed with Teragrid community certificate.

Web site tools