Activities are the operations that data service resources can perform on behalf of a client. These normally expose an intrinsic capability of the underlying data resource or may be functionality added at the service layer. Activities are generally used to carry out data resource manipulations, data transformations or data delivery operations such as SQL queries, XSL-T transformations and GridFTP data delivery respectively. The client interacts with a data service resource by sending a perform document which contains zero or more activities. In this perform document activities may be linked together so that data from one activity flows into another activity. This mechanism allows multiple potential interactions with a service to be encapsulated in a single interaction.
The perform document contains an activity element for each activity that is to be used. The name of the activity element specifies the activity while the attributes and child-elements specify the settings for that activity. For example, an
Some activities are designed to interact with the data resource that lies underneath a data service resource. These activities operate with specific types of data resource. For example, the sqlQueryStatement activity is designed to interact with relational databases but not with XML databases. Other activities are generic and designed to operate on any data service resource regardless of the underlying data resource.
Activities can have named inputs and outputs which are known as streams. Many activities are designed to inter-operate and this is achieved by connecting the output of one activity to the input of another to form an activity pipeline. For example, an sqlQueryStatement activity may be connected to a webRowSet activity in order to transform the results of an SQL query into WebRowSet XML. An activity pipeline may contain two or more activities and when a data service resource processes the activity pipeline, data is streamed efficiently between each activity.
Inter-operating activities
Activities write blocks of data to their output streams which are then processed by the activity connected to this output. A block can be a Java Object of any type although usually they are Strings or byte arrays. In the above example, each block is a ResultSet object.
OGSA-DAI provides the following activities:
Activity | Description | OGSA-DAI Platform Compatibility |
---|---|---|
Relational Activities | ||
sqlQueryStatement | Run an SQL query statement. | All |
sqlUpdateStatement | Run an SQL update statement. | All |
sqlStoredProcedure | Invoke an SQL stored procedure. | All |
sqlBulkLoadRowSet | Bulk load data into a table. | All |
sqlResultsToXML | Convert results from sqlQueryStatement or sqlStoredProcedure into an XML representation. | All |
sqlResultsToCSV | Convert results from sqlQueryStatement or sqlStoredProcedure into a CSV representation. | All |
sqlResultToBytes | Convert a binary column result from sqlQueryStatement or sqlStoredProcedure into a a stream of bytes. | All |
extractDatabaseSchema | Retrieve the logical schema from a database. | All |
databaseSchemaToXML | Convert logical schema information into an XML document. | All |
extractPhysicalSchema | Retrieve physical schema information from a database. | All |
removeDuplicates | Remove duplicate rows from the results retrieved from multi-resources. | All |
resultsetProjection | Projection of a java.sql.ResultSet onto column name name or index. | All |
XML Activities | ||
xPathStatement | Run an XPath statement against an XML database. | All |
xQueryStatement | Run an XQuery statement against an XML database. | All |
xUpdateStatement | Run an XUpdate statement against an XML database. | All |
xmlCollectionManagement | Create or remove collections within an XML database. | All |
xmlResourceManagement | Create or remove resources within an XML database. | All |
xmlBulkLoad | Bulk load resources into a collection. | All |
Delivery Activities | ||
deliverFromURL | Retrieve data from a URL. | All |
deliverToURL | Deliver data to a URL. | All |
deliverToGDT | Push data to a service implementing OGSA-DAI data transport operations. | All |
deliverFromGDT | Pull data from a service implementing OGSA-DAI data transport operations. | All |
deliverToGFTP | Deliver data to a GridFTP server. | WSRF only |
deliverFromGFTP | Retrieve data from a GridFTP server. | WSRF only |
deliverFromFile | Retrieve data from a file on the container's local filesystem. | All |
deliverToFile | Deliver data to a file on the container's local filesystem. | All |
deliverToSMTP | Deliver data in an e-mail using SMTP. | All |
inputStream | Receive data through a service's data transport operations. | All |
outputStream | Deliver data through a service's data transport operations. | All |
deliverToStream | Deliver results to a stream. | All |
deliverToNull | Throws the input stream away. | All |
deliverToResourceProperty | Writes results to a resource property. | All |
deliverToAttachment | Delivers results to a SOAP attachment. | All |
Transformation Activities | ||
zipArchive | ZIP compress the results. | All |
gzipCompression | GNU-ZIP compress the results. | All |
gzipDecompression | GNU-ZIP decompress results. | All |
xslTransform | Transform data using an XSLT. | All |
stringTokenizer | Break a single block into multiple blocks based on a set of separator characters. (Unsupported) | All |
blockAggregator | Aggregate multiple blocks into a single block. (Unsupported) | All |
bytesToTempFile | Writes a stream of bytes to a temporary file and then outputs a reference to this temporary file. | All |
webrowsetProjection | WebRowSet projection onto column name or column index. | All |
csvProjection | CSV projection onto column index. | All |
frequencyDistributor | Distribute numeric values onto spaces. | All |
randomSample | Generate a random sample of the input. | All |
Resource Management Activities | ||
removeResource | Withdraws a data service resource from a service. | All |
File Activities | ||
directoryAccessActivity | Access a directory. (Unsupported) | All |
fileAccessActivity | Read data from a file. (Unsupported) | All |
fileManipulationActivity | Manipulate files in a directory. (Unsupported) | All |
fileWritingActivity | Write data into a file. (Unsupported) | All |
Indexed File Activities | ||
addIndexFile | Import a new text file and create an index on it. (Unsupported) | All |
searchIndexedFile | Perform a full-text search across an indexed file. (Unsupported) | All |
readFile | Read data from a file. (Unsupported) | All |
Miscellaneous Activities | ||
dataStore | Cache parameters and results. | All |
notification | Send or receive notifications as to the execution of other activities. (Unsupported) | All |
Relational Multi-Resource Activities | ||
sqlBag | Merge the results of multiple queries executed to different relational data service resources. | All |
sqlResilient | Retrieve the results of multiple queries from the first available relational data service resource. | All |
Example Activities | ||
helloWorldActivity | A simple test example. | All |
demoExternalInput | Example activity that creates a new external input stream (Unsupported) | All |
demoCreateInstance | Example activity that creates a new resource (Unsupported) | All |
demoCreateTransientInstance | Example activity that creates a new transient resource. (Unsupported) | All |
demoQueryInstance | Example activity that queries a newly created resource. (Unsupported) | All |
Note that activities marked Unsupported are activities that should work but have not been subjected to rigorous testing.
Back: Interacting with Data Service Resources | Up: Interacting with Data Service Resources | Next: Sessions |
? International Business Machines Corporation, 2002-2006 | ? The University of Edinburgh, 2002-2006 |