Tutorial Introduction
| |
|
|
| |
Table of Contents |
|
| |
|
|
Introduction
We have outlined the installation of caGrid onto our machine in the previous steps. Now we will present a scenario that will require us to use a service generated by Introduce. For this tutorial, we have provided the completed service solution in the hackathon.zip. We will walk through the creation of this service in the Advanced section at the end of this tutorial
Scenario
We would like to share photos with friends and family. To accomplish this goal, we will create a Photo Sharing analytical service. This service allows us to create photo galleries and securely share photos with others.
Our model contains semantic information so that users of our service can read and interpret our data. We clarify the meaning of each attribute by assigning CDEs from the caBIG caDSR. We point out that we have not registered our model in the caDSR as a project, but that is normally done during the caBIG development process (we haven't done this just because our model is for training purposes only). In order to create an analytical service with semantic annotations (e.g., semantic information on objects passed over the Grid), we need a model registered in caDSR. So, the service we build today will not have semantic annotations.
| In order to see and share you photos with someone else when using the service, you will need a friend or colleague to also do this tutorial on a different machine! |
Domain Model for Syntactic Interoperability

- Id attribute in each class is for relational mapping purposes (e.g., Hibernate)
- User class will be used to manage user permissions
- Image class contains our image data only because the payload can be large
- ImageDescription class contains our image metadata
Why do we not have a Gallery class? Because the Gallery is a context used by our service to organize data in our data model. It is not a domain object.
CDEs for Model Attributes
View CDEs using the caBIG CDE browser: http://cdebrowser.nci.nih.gov/

Example Unique User Identity CDE

Photo Sharing Use Case
I have two photo galleries that I want to share. The first gallery, "Work", includes photos from a recent work conference. I'm happy to share these photos with friends and family (everyone). The second gallery, "SummerVacation" is of photos from a recent vacation. I want to make sure that only friends can see this gallery.
Photo Sharing Service Features
- Ability to organize photos into galleries
- Can create new galleries
- Can upload photos to chosen galleries
- Gallery owner has complete control over who can view photos in the gallery
- Gallery owner also has complete control over who can add photos to the gallery
- The service caches galleries and photos, but does not persist data
- Other service operations support Photo Sharing application development
Potential Additions
In an effort to keep Hackathon straightforward, we will not be using the Transfer Service. Transfer enables services and clients to easily efficiently and quickly move binary data over the Grid.
Important note: because we are not using Transfer to add images to our galleries, we need to keep the file sizes added to Galleries small!
For more information on using Transfer in a service and examples, see our Develop an Advanced caGrid Analytical Service tutorial
Image-level Authorization
Gallery owners may also set privileges for individual images. These privileges would override default gallery viewing privileges for that image only. For example, Jim and Lauren have gallery viewing privileges but only Jim has privileges to view image X from the gallery. Lauren will not be able to view image X even though she has gallery viewing privileges.





