Develop an Advanced caGrid Analytical Service
Introduction
This tutorial illustrates how to create an advanced analytical service. First, you will create a stock quoting service. Then you will add additional features to explore more complex and useful concepts of grid services. After creating the simple service capable of generating stock quotes, you will make a stateful service that will be able to manage stock portfolios. An optional phases demonstrates using identifiers in a service. Once you have the ability to manage portfolios, you will then add security enabling protected access or modification of the portfolios.
Tutorial Overview Presentation
Please peruse the tutorial presentation
that accompanies this tutorial. This presentation provides background information that will be useful to understanding the steps in the tutorial.
If unfamiliar with grid service contexts, please also peruse the service contexts documentation.
Prerequisites
Install caGrid and deploy a Non-Secure Tomcat Container (Phases 1-7)
The first 5 phases are intended to help you learn about Introduce. It requires the caGrid software and a non-secure container. Please install caGrid and Configure a Non-Secure Container Using the caGrid 1.4 Installer.
| It is important that you choose a hostname of localhost or 127.0.0.1 when installing your container. The container hostname will be used for enumeration in this tutorial. |
Download the Introduce Tutorial Tools
Before you begin, you will want to download the tutorial tools zip file http://software.cagrid.org/introduce/introduce-1.3-tutorial-tools.zip
and extract to somewhere from which you can copy files as needed. Note: This file is marked for use with caGrid 1.3, but will also work with caGrid 1.4 for the purposes of the tutorial.
Completed Service
| If you wish to deploy and test the completed service, a zipped service is provided for your convenience. This service is configured to not register with the grid and does not contain service metadata. It is not a secure service, meaning that the modification in phase 8 are not included in the service. |
To deploy the service:
- Deploy a non-secure Tomcat or JBoss Container using the caGrid Installer.
- Deploy the caGrid Transfer service to the container: Deploy Transfer
. - Download the completed StockManager service
. - Extract the service to your computer.
- Open a terminal and change directory to the StockManager directory.
- Run the appropriate Ant command to deploy your service:
- Tomcat

$ ant -Dno.deployment.validation=true deployTomcat
- JBoss

$ ant -Dno.deployment.validation=true deployJBoss
- Tomcat
Phases
- Create the Stock Quote Grid Service
- Add Resources to Manage Stock Portfolios
- Configure the Resources for Lifetime Management
- Making the resources persistent
- Making the resources send notifications
- Using Transfer to Upload Symbols to a Persisted Resource
- Adding Identifiers
- Securing the service and its resources





