AGFocus article

Robert Olson olson at mcs.anl.gov
Thu Feb 5 11:14:38 CST 2004


looks good; you might mention that the 
DataStoreFileReader|DataStoreFileWriter  return from OpenFile is intended 
to work like a python filehandle.

--bob

At 11:08 AM 2/5/2004, Thomas D. Uram wrote:
>The attached article is being submitted today for the next AGFocus 
>newsletter.  It's short; could people take a minute to review it and send 
>me any comments?
>
>Tom
>
>
>Developers Corner
>
>This article highlights support in the Access Grid toolkit for uploading 
>data to and downloading data from the venue server.
>
>The AG2 toolkit enables users to share files securely and 
>persistently.  The venue acts like a shared file system, in many 
>respects:  files can be uploaded, downloaded, and removed.  A file is 
>owned by the person who uploaded it.  And the file persists in the venue 
>until it is removed.
>
>The Venue Client displays the data in the venue as part of the current 
>venue state, and handles user requests for file manipulations.  Files are 
>uploaded and downloaded via a GSIHTTP connection to the DataStore.  To 
>remove a file, a SOAP call is made to the Venue, which passes the request 
>to its DataStore.
>
>As of AG2.1, access to the DataStore API is encapsulated in the 
>DataStoreClient module.  This simplifies developer access to the 
>DataStore.  One can create a DataStoreClient object using the URL to the venue:
>
>     DataStoreClient GetVenueDataStore(venueUrl)
>
>And then access the DataStore programmatically using the following interfaces.
>
>     LoadData()
>         Refresh the local data description cache
>
>     DataDescription GetFileData(filename)
>         Get the data description for the specified file
>
>     Download(filename,localFile)
>         Download the specified file to the given local file.
>
>     Upload(localFile)
>         Upload the specified local file
>
>     RemoveFile(filename)
>         Remove the specified file
>
>     DataStoreFileReader|DataStoreFileWriter OpenFile(file,mode)
>         Open a file in the DataStore with the specified mode ('r','w');
>         the return value is determined by the mode.  The file will
>         be created when the Reader/Writer is Close'd.
>
>     [filenames] QueryMatchingFiles(pattern)
>     [filenames] QueryMatchingFilesMultiple(patternList)
>         Find files in the local cache that match the specified pattern.
>
>This makes it possible for shared applications and other components to 
>access venue data.  The DataStoreClient is currently being used in the 
>SharedPresentation application, and will be utilized in other parts of the 
>code in the future.  Developers should note that, while access to the data 
>in a venue is relatively open to the individuals allowed in the venue, 
>access controls may restrict data access considerably in the future.
>
>Standalone, interactive use of the DataStoreClient API is exemplified in 
>the module itself.  Executing the module directly, the user is presented 
>with an ftp-like interface to the data store.
>
>     [turam at munich AccessGrid]$ python2 DataStoreClient.py 
> https://localhost:8000/Venues/default
>     DataStore> ls
>     7lyz.pdb
>     DataStore> get 7lyz.pdb
>     Downloading 
> https://localhost:8006/000000fa3e5ba31b007f00000000000133b/7lyz.pdb
>     DataStore> quit
>
>This example is solely intended to exercise the module code, not to 
>provide production functionality.  But it serves as a useful example of 
>the simplicity of programmatic access to data stores in AG2.




More information about the ag-dev mailing list