WS-MDS

From TeraGrid Wiki

Jump to: navigation, search

Contents

Description

The Monitoring and Discovery System (MDS), also known as MDS4, is the information service component of Globus Toolkit 4. It actually consists of two web services, the Trigger Service and the Index Service.

The Trigger Service collects information about computational resources in a virtual organization and performs actions if specific conditions are met, such as sending an administrator an email if disk becomes too full on a resource.

The Index Service is a WSRF-based service that collects and publishes monitoring and discovery information as Service Group Entries, which can be queried by clients via a web service call.

Index Service

The Index Service represents an example of a WSRF WS-Resource. The information in the MDS is defined as Resource Properties, which can be queried through a web service call. There are two operations defined, though users of the Teragrid resources' MDS will only use GetResourceProperty.


Operations

  • GetResourceProperty : Queries the MDS to discover information
    • Input : GetResourcePropertyRequest
    • Output : GetResourcePropertyResponse
    • Fault : InvalidResourcePropertyQNameFault
    • Fault : ResourceUnknownFault
  • Add
    • Input : AddRequest : Used by administrators to add a resource property to the MDS
    • Output : AddResponse
    • Fault : ContentCreationFailedFault
    • Fault : AddRefusedFault
    • Fault : UnsupportedMemberInterfaceFault

WSDL

The Index Service inherits its WSDL and associated schema from the WSRF WS-Resource Properties specification. http://docs.oasis-open.org/wsrf/2005/03/wsrf-WS-ResourceProperties-1.2-draft-06.wsdl http://docs.oasis-open.org/wsrf/2005/03/wsrf-WS-ResourceProperties-1.2-draft-06.xsd

Examples

Command Line Examples

The Index Service can be queried via the command-line using the wsrf-query command found in the $GLOBUS_LOCATION/bin directory.

The wsrf-query usage is as follows:

usage: java org.globus.wsrf.client.Query [-h] [-s url [-k name value] | -e
            file] [expression] [dialect]
Options:
 -a,--anonymous                  Use anonymous authentication (requires
                                 either -m 'conv' or transport (https) security)
 -c,--serverCertificate <file>   A file with server's certificate used for
                                 encryption. Used in the case of GSI Secure Message encryption
 -d,--debug                      Enables debug mode
 -e,--eprFile <file>             Loads EPR from file
 -f,--descriptor <file>          Sets client security descriptor.
                                 Overrides all other security settings
 -g,--delegation <mode>          Performs delegation. Can be 'limited' or
                                 'full'. (requires -m 'conv')
 -h,--help                       Displays help
 -k,--key <name value>           Resource Key
 -l,--contextLifetime <value>    Lifetime of context created for GSI
                                 Secure Conversation (requires -m 'conv')
 -m,--securityMech <type>        Sets authentication mechanism: 'msg' (for
                                 GSI Secure Message), or 'conv' (for GSI Secure Conversation)
 -p,--protection <type>          Sets protection level, can be 'sig' (for
                                 signature)  can be 'enc' (for encryption)
 -s,--service <url>              Service URL
 -z,--authorization <type>       Sets authorization, can be 'self',
                                 'host', 'none' or a string specifying the expected identity of the remote
                                 party
Where:
  [expression] - query expression
  [dialect]    - query dialect

For instance:

$GLOBUS_LOCATION/bin/wsrf-query -s https://mds.teragrid.org:8443/wsrf/services/DefaultIndexService '/*'

The above command will query the central Teragrid MDS Index Service found at https://mds.teragrid.org:8443/wsrf/services/DefaultIndexService. The next argument '/*' is the search expression. In this case we're requesting all of the information that the Index Service contains in the form of the entire resource properties document.


Replacing '/*' with a more useful XPath expression will result in a more focused search. For example, the search '//ns2:Address' as shown below will give all of the ns2:Address elements of the document, which should result in a list of the services Teragrid-wide.

$GLOBUS_LOCATION/bin/wsrf-query -s https://mds.teragrid.org:8443/wsrf/services/DefaultIndexService '//ns2:Address'

Programmatic Example

A Java code sample may be downloaded from https://repo.teragrid.org/head/portals/doc/developers/mds-client.tgz

A build/run script has been included in this distribution, such that compiling and running it is accomplished by the command:

% sh run.sh

This client has 2 important parameters hard-coded into it.

  • The MDS endpoint reference. This comes with the central Teragrid MDS server configured. You can change this by changing the line:

private static final String EPR = "https://mds.teragrid.org:8443/wsrf/services/DefaultIndexService";

  • The XPath query. The query that comes with the code is simply "/", which is a request for the entire XML document. This can be changed by changing the line:

String expression = "/";

More information on this client including more queries can be found at https://repo.teragrid.org/head/portals/doc/developers/Querying_MDS4_TeraGrid.html .

Links & References

GT 4.1.0: Information Services https://globus.org/toolkit/docs/development/4.1.0/info/index.html

GT 4.1.0: WS MDS Index Service https://globus.org/toolkit/docs/development/4.1.0/info/index/index.html

The Teragrid WEB-MDS web page contains a list of registered services for the Teragrid http://mds.teragrid.org:8080/webmds/webmds?info=indexinfo&xsl=sgservicetablexsl

Querying Data from MDS 4 on the Teragrid https://repo.teragrid.org/head/portals/doc/developers/Querying_MDS4_TeraGrid.html

Index Service Public Interface Guide https://globus.org/toolkit/docs/development/4.1.0/info/index/index-public-interfaces.html

Oasis WSRF Documents http://docs.oasis-open.org/wsrf/

TopXML XPath Reference http://www.topxml.com/xsl/XPathRef.asp

Understanding WSRF IBM Developerworks Tutorial http://www-128.ibm.com/developerworks/edu/gr-dw-gr-wsrf1-i.html


--Steve Mock, mock@sdsc.edu, 19:13, 25 January 2007 (GMT)

--Eric Roberts

Personal tools