GT 4.1.0 WS MDS WebMDS: Developer's Guide

1. Introduction

WebMDS is a web-based interface for viewing formatted information about Grid resources. Information is collected via a plugin interface and then formatted using an XSLT transform.

Figure 1. WebMDS Information Flow

WebMDS Information Flow

2. Before you begin

2.1. Feature summary

Features new in release 4.1.0:

  • None

Other Supported Features

  • Extensible plugin interface to support various mechanisms to gather monitoring information and XSLT transforms.
  • Plugins to acquire monitoring information via resource property mechanisms.
  • Plugin to acquire XSLT transforms by reading from local files.

Deprecated Features

  • None

2.2. Tested platforms

Tested Platforms for WebMDS:

  • The WebMDS server has only been tested with Tomcat version 5.0.28; it has been tested on RedHat Linux (i386) and, to a lesser extent, on Windows XP.
  • On the client side, WebMDS should be accessible from any web browser on any platform.

2.2.1. Installing WebMDS on Windows

Although the WebMDS server is not officially supported on non-Unix platforms, and no Windows installer exists for WebMDS, it is possible to run WebMDS on Windows. The following instructions describe how to install WebMDS on a Windows platform.

  1. Install Tomcat and set your CATALINA_HOME environment variable to the directory into which Tomcat was installed.
  2. Install the Globus Java WS-Core distribution from the Globus Toolkit download page. Set your GLOBUS_LOCATION environment variable to the directory into which you installed Globus Java WS-Core
  3. Check the ws-mds distribution out of the Globus CVS repository, using the globus_4_0_branch tag.
  4. Install the servicegroup package:

    cd c:\wherever\ws-mds\servicegroup\schema
    ant deploy
    cd ..\source
    ant deploy
    

    where wherever is the directory into which you checked out the ws-mds sources.

  5. Install WebMDS:

    cd c:\wherever\ws-mds\webmds
    ant deploy
    
  6. Create the webmds context file (this tells Tomcat where to find WebMDS):

    %GLOBUS_LOCATION%\lib\webmds\bin\webmds-create-context-file %CATALINA_HOME%\conf\Catalina\localhost
    
  7. Restart Tomcat.

WebMDS can then be configured and used as described in the rest of the documentation: WS MDS WebMDS.

2.3. Backward compatibility summary

Protocol changes since GT version 4.0.2:

  • None

API changes since GT version 4.0.2:

  • None

Exception changes since GT version 4.0.2:

  • None

Schema changes since GT version 4.0.2:

  • None

2.4. Technology dependencies

WebMDS depends on the following GT components:

  • Java WS Core

WebMDS depends on the following 3rd party software:

2.5. Security considerations

By default, the WebMDS plugins distributed as part of the Toolkit do not use authentication credentials -- they retrieve information using anonymous SSL authentication or no authentication at all, and thus retrieve only publicly-available information.

The ResourcePropertyNodeSource and ResourcePropertyQueryNodeSource plugins can be configured either to allow users to specify what resources they want to query or to only allow users to query resources pre-configured by the web administrator. The standard WebMDS deployment allows users to specify the resources they want to query; to disallow this (for example, to ensure that people don't use your site's bandwidth to view information about some other site's services), remove the files $GLOBUS_LOCATION/lib/webmds/conf/openEndedRP and $GLOBUS_LOCATION/lib/webmds/conf/openEndedQuery.

3. Architecture and design overview

Figure 2. WebMDS Request Flow

WebMDS Request Flow

In a typical WebMDS transaction, a user uses a web browser to send an HTTP request, including some web form arguments, to a web server / servlet container. The web server invokes the WebMDS servlet, which uses the form arguments to determine what plugins to use to retrieve the requested XML data and the XSLT transform to apply to it. The WebMDS servlet passes arguments to the plugins, which then retrieve the appropriate data and XSLT transform. The WebMDS servlet applies the XSLT transformation to the XML data and returns the result to the web server, which sends it back to the client's web browser.

4. Public interface

4.1. Semantics and syntax of APIs

4.1.1. Programming Model Overview

There is no "client" API for accessing WebMDS; WebMDS is a servlet that is accessed via web forms.

WebMDS uses a WebMDS plugin (a Java class that implements the WebmdsXmlSource interface) to acquire XML documents (which can be used either as raw information sources or as XSL transformations). WebMDS comes with two WebMDS plugins: FileXmlSource, which reads XML from a file (and is primarily used to acquire XSL transformations), and NodeXmlSource. NodeXmlSource in turn calls a node source plugin (a Java class that implements the WebmdsNodeSource interface) to acquire an XML DOM document. acquires XML information using a WebMDS XML source, a Java class that implements the WebmdsXmlSource interface. To summarize:

  • WebMDS is a servlet that uses plugins to acquire XML documents containing raw data and XSL transformations, and then applies the acquired XSL transformation on the acquired data.

    • The plugins used by WebMDS implement the org.globus.mds.webmds.WebmdsXmlSource interface.
    • WebMDS plugins include:

      • org.globus.mds.webmds.xmlSources.file.FileXmlSource, which reads XML from a file, and
      • org.globus.mds.webmds.xmlSources.xmlDomNode.NodeXmlSource, which uses its own plugin interface to acquire XML DOM documents.

        • The plugins used by NodeXmlSource implement the org.globus.mds.webmds.xmlSources.xmlDomNode.WebmdsNodeSource interface
        • Node source plugins include org.globus.mds.webmds.xmlSources.resourceProperties.ResourcePropertyNodeSource and org.globus.mds.webmds.xmlSources.resourceProperties.ResourcePropertyQueryNodeSource, which acquire resource property information.
  • The raw XML data acquired by WebMDS is processed by XSL transformations; see the W3C XSLT Documentation for more information on creating XSL transforms.

4.1.2. Component API

4.2. Semantics and syntax of the WSDL

4.2.1. Protocol overview

WebMDS is not a Web service and does not have any associated WSDL. For information on the web form-based protocol used by WebMDS, see WS MDS WebMDS on the WebMDS Graphical User Interface.

4.3. Semantics and syntax of non-WSDL protocols

[describe non-WSDL protocols. if none, state so.]

4.4. Command-line tools

There is no end-user command-line tool for WebMDS.

4.4.1. Tool description

The command-line tool webmds-create-context-file is used to create Tomcat configuration files needed to deploy WebMDS.

4.4.2. Command syntax

webmds-create-context-file [-f] tomcat_context_file

The tomcat_context_file argument is the location of the Tomcat configuration file defining the WebMDS context; in a default Tomcat installation, the location of this file will be $CATALINA_HOME/conf/Catalina/localhost.

By default, webmds-create-context-file will not overwrite an existing context file; the -f option is used to force webmds-create-context-file to overwrite an existing file.

Note: webmds-create-context-file is found in $GLOBUS_LOCATION/lib/webmds/bin

4.4.3. Example

    $GLOBUS_LOCATION/lib/webmds/bin/webmds-create-context-file -f \
         $CATALINA_HOME/conf/Catalina/localhost

4.4.4. Limitations

Changes to the Tomcat context do not take effect until Tomcat is restarted or reloaded.

4.5. Overview of Graphical User Interface

4.5.1. Overview of the purpose and functionality of the GUI

The WebMDS GUI is a web-based interface for browsing formatted XML data, such as the results of resource property queries on a grid service.

4.5.2. Command and options

WebMDS can be accessed using any web browser. In a default WebMDS installation, the URL http://hostname:port/webmds corresponds to the top-level WebMDS web page. This page includes a link to a WebMDS invocation that provides summary information (with links to detailed information) about a locally-running MDS Index server. It also contains a link to a page of sample web forms demonstrating other uses of WebMDS.

4.5.3. Customizing the web forms used to access WebMDS

The WebMDS servlet is located at http://your-tomcat-host:your-tomcat-port/webmds/webmds. It takes the following arguments:

Table 1. Form arguments used by WebMDS

infoThe name of the XML source that will be used to collect the raw XML data. XML sources are defined by files in $GLOBUS_LOCATION/lib/webmds/conf. This argument must be specified.
xslThe name of the XML source that will provide the XSL transform. XML sources are defined by files in $GLOBUS_LOCATION/lib/webmds/conf. If this argument is not specified, the WebMDS servlet will display raw, untransformed XML.
xmlSource.info_name.param.source_specific_options

Any additional options recognized by the info_name XML source (info_name must be the value of the info argument for this request). Source-specific options are discussed in the next section.

xmlSource.xsl_name.param.source_specific_options

Any additional options recognized by the xsl_name XML source (xsl_name must be the value of the xsl argument for this request). Source-specific options are discussed in the next section.

4.5.4. Limitations

Error conditions (such as typographical errors in resource property names) are presented as stack traces, rather than user-friendly error messages.

4.6. Semantics and syntax of domain-specific interface

4.6.1. Interface introduction

WebMDS uses a web form interface to specify parameters such as where to find raw data and what XSLT transformations to apply to that data.

4.6.2. Syntax of the interface

The web form interface is described in Section 3, “Graphical user interfaces”

4.7. Configuration interface

Please see the Configuring section of the System Administrator's Guide.

4.8. Environment variable interface

WebMDS does not require that any environment variables be set by the client or by the Tomcat server.

5. Usage scenarios

There is no "client" programmatic interface to WebMDS; clients communicate using HTTP requests. The web form arguments recognized by WebMDS are documented in GT 4.1.0 WS MDS WebMDS: User's Guide.

5.1. Creating a new plugin

To create a new plugin to collect raw XML data, write a Java class that implements the WebmdsXmlSource or WebmdsNodeSource interface. These are documented in Section 1, “Semantics and syntax of APIs”. The FileXmlSource and NodeXmlSource classes distributed with WebMDS are examples of classes that implement WebmdsXmlSource; the ResourcePropertyNodeSource and ResourcePropertyQueryNodeSource classes distributed with WebMDS are examples of classes that implement the WebmdsNodeSource interface.

5.2. Changing format of output

To change the appearance of the output of WebMDS, create a new XSLT transform; see the W3C XSLT Documentation for more information.

6. Troubleshooting

Log information from WebMDS and any WebMDS plugins will be logged by the servlet container into which WebMDS has been deployed. In a vanilla Tomcat 5.0.28 distribution, this information will show up in the file $CATALINA_HOME/logs/catalina.out

7. Related Documentation

None available at this time.