Chapter 4: ServiceMap Document: Advanced Features
The
services created by the toolkit offer some advanced features that you
can enable from the ServiceMap document.
- Including pre-defined methods: The services created by the
toolkit
have four pre-defined methods/operations viz. Shutdown, Kill and Ping.
Shutdown will un-register the service's WSDL from the Registry service,
wait for all application instances started by the application service
to finish and then shutdown the service. After the shutdown operation
is called, the service will not accept any connections. The Kill method
will un-register the service's WSDL from the Registry service, kill all
application instances started by the service and shutdown the service.
The Ping operation can be used to 'ping' the service to see if it is
running and
responding. To enable these three methods in your service, include the
following XML in your ServiceMap document
<method userDefined="false">
<methodName>Ping</methodName>
<methodDescription>Just ping the
service</methodDescription>
</method>
<method userDefined="false">
<methodName>Shutdown</methodName>
<methodDescription>Shutdown the
service</methodDescription>
</method>
<method userDefined="false">
<methodName>Kill</methodName>
<ethodDescription>Kill the
service</methodDescription>
</method>
Note: The 'Shutdown' and Kill
methods can be invoked directly or indirectly by sending
either a SIG_TERM (TERM signal), SIG_HUP (caused by a log out) or by a
SIG_INT (cause by control-c) to the service.
- Specifying job attributes: The application service
provider can specify some attributes for running the application on a
cluster of machines. These attributes must be specified within the
"application" element in the ServiceMap document as shown below. These
values can be modified by the user before invoking the application
service.
<application>
<applicationName
targetNamespace="http://www.extreme.indiana.edu/lead">TestApp</applicationName>
<project>
<projectName>TG-ASC060000N</projectName>
<projectDescription>LEAD Account on
TeraGrid</projectDescription>
</project>
<queue>
<queueName>test_queue</queueName>
<queueDescription>Test
queue</queueDescription>
</queue>
<count>
<value>10</value>
<decription>Run 10
counts of the application<description>
</count>
<!-- The application is an MPI applications -->
<jobType>mpi</jobType>
</application>
The "projectName" is the account string used to execute the
application. The "queueName" is the queue to submit the job if there is
a batch scheduler on the cluster. The "count" is the number counts of
the application to run. If the application is an MPI (Message Passing
Interface) application, the "jobType" must be specified as "mpi".
- Specifying a lifetime for the
service: The services created by the toolkit support lifetime
management. They renew their WSDLs with a well known Registry Service
at regular intervals of time. You can specify the lifetime for a
service in terms of the number of minutes of inactivity. After the
specified period of inactivity, the service will un-register its WSDL
from the Registry and shutdown. The period of inactivity is measured
from the time the service sends the last response message to a client
(not the time it receives the last request message from a client). You
can specify the lifetime as shown below. The service will shutdown
after 60 minutes after sending the last response message to the client.
<ServiceMap>
<lifeTime>
<notAfterInactiveMinutes>60</notAfterInactiveMinutes>
</lifeTime>
</ServiceMap>
[ << ] [ < ] [ Home ] [
> ] [ >>
]