
|
Home -> Toolkit -> Docs -> 4.0 -> Info -> Usefulrp -> Developer
Could this page be better? Send us your feedback. |
|---|
Table of Contents
This guide contains information of interest to developers working with the WS MDS UsefulRP. It provides reference information for application developers, including APIs, architecture, procedures for using the APIs and code samples.
Features in GT 4.0.5+ WS MDS UsefulRP
- Provides API and implementation for working with customized resource properties and information providers
- Provides an implementation of a GLUE 1.1 schema compliant resource property
- Provides sample resource property implementations for service developers to incorporate into their own services
Protocol changes since GT 3.2
- N/A (new component)
API changes since GT 3.2
- N/A (new component)
Exception changes since GT 3.2
- N/A (new component)
Schema changes since GT 3.2
- N/A (new component)
WS MDS UsefulRP depends on the following GT components:
- Java WSRF Core
WS MDS UsefulRP depends on the following 3rd party software:
- none
The rpprovider framework is comprised of three main sub-components:
Providers - A simple execution environment for collections of programs (generally called information providers) which periodically output XML data that compose the values of a Resource Property. This execution environment consists of an GT4 Java operation provider that schedules periodic background tasks using the
org.globus.wsrf.impl.timer.TimerManagerImplclass to execute information providers in a separate thread. When a timer event fires, the information provider code is invoked and the subsequent XML output ingested as Resource Property values.Producers - An API for creating plug-in (or adapter) modules for the execution environment and a standard set of basic information provider programs that can collect XML output using a variety of mechanisms, for example; reading from a file, reading the output of an HTTP GET operation, or executing a child process and parsing the standard output stream of the child process into valid XML, and others. These plug-in modules are generally called element producers, since the API interface which defines them (the
org.globus.mds.usefulrp.rpprovider.ResourcePropertyElementProducerinterface) uses aorg.w3c.dom.Elementas the return type.Transforms - An API for performing arbitrary post-processing on the output XML of element producers known as element transforms. Element transforms implement the org.globus.mds.usefulrp.rpprovider.ResourcePropertyElementTransform interface and can be configured to run against any given ResourcePropertyElementProducer via a configuration file setting. An example of a an element transform is the included sample XSLTFileElementTransform, which will take the output of a ResourcePropertyElementProducer and apply an arbitrary XSL transform to it, using the XSLT file specified by the configuration argument.
The RPProvider Framework code is part of the UsefulRP package of the ws-mds (CVS module) and can be seen under the usefulrp/rpprovider/
directory. The producers are located in the rpprovider/producers/ directory, and the transforms are located in the
rpprovider/transforms/ directory.
No additional non-WSDL wire protocol defined at this time
The system administrator first enables a given service or service resource to use the
org.globus.mds.usefulrp.rpprovider.ResourcePropertyProviderCollection operation provider
by adding the fully qualified Java class name to the provider's parameter value in the service descriptor of a service or resource's server-config.wsdd file.
Lastly, the administrator must add a new parameter named rpProviderConfigFile and for its corresponding value,
specify a full (absolute) OS-native file path to a valid ResourcePropertyProviderConfig configuration file.
The ResourcePropertyProviderConfig file contains all required information for generating one or more Resource Properties
for the hosting service or resource.
At service startup, the ResourcePropertyProviderCollection operation provider code is initialized and attempts to process the
configuration entries found in the file specified by the rpProviderConfigFile parameter into a set of one or more background execution
tasks (threads) that periodically update the contents of configured Resource Properties with the results of the executing information providers.
By default, if there are errors that occur during the first execution of a provider, the timer that controls that provider will be canceled and a warning message
output to the container log.
Seen below is a sample service descriptor for the MDS4 DefaultIndexService which shows how to configure the service to use the
ResourcePropertyProviderCollection operation provider and specifies the rpProviderConfigFile location used for configuring the sample
GLUEResourceProperty that the ResourcePropertyProviderCollection will process.
<service name="DefaultIndexService" provider="Handler" use="literal" style="document">
<parameter name="providers"
value="org.globus.mds.usefulrp.rpprovider.ResourcePropertyProviderCollection
org.globus.wsrf.impl.servicegroup.ServiceGroupRegistrationProvider
GetRPProvider
GetMRPProvider
QueryRPProvider
DestroyProvider
SetTerminationTimeProvider
SubscribeProvider
GetCurrentMessageProvider"/>
<parameter name="rpProviderConfigFile" value="/YOUR-GLOBUS-LOCATION-HERE/etc/globus_wsrf_mds_index/gluece-rpprovider-sample-config.xml"/>
<parameter name="scope" value="Application"/>
<parameter name="allowedMethods" value="*"/>
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
<parameter name="className" value="org.globus.mds.index.impl.DefaultIndexService"/>
<wsdlFile>share/schema/mds/index/index_service.wsdl</wsdlFile>
</service>
The configuration file format for the ResourcePropertyProviderCollection operation provider is simply the
XML-serialized form of the ResourcePropertyProviderConfig stub object, as defined in the schema file
rpprovider.xsd.
Below is a sample configuration file which configures the GLUE Resource Property provider with element producers using Ganglia to provide cluster information and PBS for scheduler information. This sample configures the provider to generate cluster information using Ganglia on the localhost with the default Ganglia port, and configures PBS as the scheduler information provider. The period of execution is set to 300 seconds for each element producer, but may be configured separately if desired. This configuration mirrors a common information provider setup in the GT4 GRAM ManagedJobExecutable service. Using the RPProvider Framework, it is possible to generate this information in other services as well.
<ns1:ResourcePropertyProviderConfigArray
xsi:type="ns1:ResourcePropertyProviderConfigArray"
xmlns:ns1="http://mds.globus.org/rpprovider/2005/08"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:resourcePropertyProviderConfiguration xsi:type="ns1:resourcePropertyProviderConfig">
<ns1:resourcePropertyName xsi:type="xsd:QName" xmlns:mds="http://mds.globus.org/glue/ce/1.1">mds:GLUECE</ns1:resourcePropertyName>
<ns1:resourcePropertyImpl xsi:type="xsd:string">org.globus.mds.usefulrp.rpprovider.GLUEResourceProperty</ns1:resourcePropertyImpl>
<ns1:resourcePropertyElementProducers xsi:type="ns1:resourcePropertyElementProducerConfig">
<ns1:className xsi:type="xsd:string">org.globus.mds.usefulrp.glue.GangliaElementProducer</ns1:className>
<ns1:arguments xsi:type="xsd:string">localhost</ns1:arguments>
<ns1:arguments xsi:type="xsd:string">8649</ns1:arguments>
<ns1:period xsi:type="xsd:int">300</ns1:period>
<ns1:transformClass xsi:type="xsd:string">org.globus.mds.usefulrp.rpprovider.transforms.GLUEComputeElementTransform</ns1:transformClass>
</ns1:resourcePropertyElementProducers>
<ns1:resourcePropertyElementProducers xsi:type="ns1:resourcePropertyElementProducerConfig">
<ns1:className xsi:type="xsd:string">org.globus.mds.usefulrp.rpprovider.producers.SchedulerInfoElementProducer</ns1:className>
<ns1:arguments xsi:type="xsd:string">libexec/globus-scheduler-provider-pbs</ns1:arguments>
<ns1:transformClass xsi:type="xsd:string">org.globus.mds.usefulrp.rpprovider.transforms.GLUESchedulerElementTransform</ns1:transformClass>
<ns1:period xsi:type="xsd:int">300</ns1:period>
</ns1:resourcePropertyElementProducers>
</ns1:resourcePropertyProviderConfiguration>
</ns1:ResourcePropertyProviderConfigArray>
It is possible to configure the GLUEResourceProperty provider to use alternate mechanisms for providing scheduler information by changing the arguments
field that follows the SchedulerInfoElementProducer parameter to a string with a GLOBUS_LOCATION relative-path that indicates the GRAM scheduler adapter to
use, for example, libexec/globus-scheduler-provider-fork.
TBD: It is also possible to pass parameters to the GLUESchedulerElementTransform that control even more advanced post-processing and sorting of results when generating GLUE 1.1 XML, e.g. Teragrid resorting code.
[this is the section where you can describe using this component - can also link to standalone howto docs]