Data Storage
The exercises in this session will show you how to use the DataStoreClient to connect to a venue data storage.

The DataStoreClient API can be found here. Please refer to the class AccessGrid.DataStoreClient.DataStoreClient

Exercise 1 - Test the Data Storage API

  1. Start a server on your local machine, see Configuration - Exercise 4.

  2. Open the DataStorageTest.py file.

  3. Print results from each DataStoreClient call.

  4. Create a test.doc and test.ppt file in your local directory

  5. Run the script

    DataStorageTest.py

    Note: OSX users will first need to source the file /Applications/AccessGridToolkit.app/Contents/Resources/setupenv.sh

  6. Connect with the Venue Client to see files get added and removed. You may have to refresh the UI to see the new files. Also, make sure the localFile.doc exists in your local directory.


Exercise 2 - Create a Venue File Browser

  1. Download the VenueFileBrowser.py file.

  2. Start the file browser

    VenueFileBrowser.py

    OSX: pythonw VenueFileBrowser.py

    Two lists will be displayed; one for local files on the left and one for venue files on the right. The VenueFileBrowser.py code does only include the UI components.

  3. Add code for populating the remote file list on the right.

  4. Add code for uploading a file from the local directory to the venue in the Upload event handler.

  5. Add code for downloading a venue file to the local directory in the Download event handler.

  6. Make sure upload and download works. Enter the venue with the Venue Client and check if the files are there.


    For more UI details, see the wxPython online documentation.




    Solution: VenueFileBrowser_Solution.py