GT 4.0 Samples for WS MDS

1. Building VOs using the DefaultIndexService

This example shows how to configure the DefaultIndexService so that it will register itself to an upstream DefaultIndexService. By chaining such upstream registrations between hosts, it is possible to build a hierarchical virtual organization with a complete aggregate data view at the root level.

  1. Change to the $GLOBUS_LOCATION/etc/globus_wsrf_mds_index directory.
  2. Open the file hierarchy.xml and add one or more upstream entries using the URL to DefaultIndexService(s) you wish to register to. Example syntax for an upstream entry is as follows:

     <upstream>https://vo-host:8443/wsrf/services/DefaultIndexService</upstream> 

    Please note that if a secure container is targeted, make sure to set the correct service url (https protocol, right port number) in the upstream entry.

    1. (This step is optional) Change the default upstream registration settings (if desired) in the upstream.xml file:

       
            <ServiceGroupRegistrationParameters
            xmlns="http://mds.globus.org/servicegroup/client>
            
            <!-- Specifies that the registration will be renewed every 600
            seconds (= 10 minutes) -->
            <RefreshIntervalSecs>600</RefreshIntervalSecs>
            
            <Content xsi:type="agg:AggregatorContent"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:agg="http://mds.globus.org/aggregator/types">
            
            <agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
            <agg:GetResourcePropertyPollType
            xmlns:wssg= "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd" >
            <!-- Specifies that the upstream index should refresh information
            every 10 minutes -->
            <agg:PollIntervalMillis>600000</agg:PollIntervalMillis>
            
            <!-- specified that the upstream index should collect the
            Entry resource properties from this index -->
            <agg:ResourcePropertyName>wssg:Entry</agg:ResourcePropertyName>
            
            </agg:GetResourcePropertyPollType>
            </agg:AggregatorConfig>
            <agg:AggregatorData/>
            </Content>
            
            </ServiceGroupRegistrationParameters>
          

      The two settings of note here are the RefreshIntervalSecs and the PollIntervalMillis parameters.

      The RefreshIntervalSecs parameter specifies that the local DefaultIndexService will attempt to refresh the registration made to the upstream DefaultIndexService every (n) seconds. If the upstream DefaultIndexService is a high level or root-level member of a VO hierarchy, or is intended to support a large number of registrants, it may be desirable to set the refresh interval to be a larger value so that the overall amount of registration traffic is reduced. Note that setting the RefreshIntervalSecs to a larger value will not affect the relative "freshness" of the aggregated data from each registrant; rather, this is controlled by the PollIntervalMillis parameter of the GetResourcePropertyPollType element.

      The GetResourcePropertyPollType element contained within the AggregatorConfig element specifies that the upstream DefaultIndexService should poll the local DefaultIndexService "Entry" resource property every (n) milliseconds, based on the value of the PollIntervalMillis parameter. Alter this parameter in order to control the interval upon which data from the downstream (local) DefaultIndexService is refreshed in the upstream DefaultIndexService.

  3. Start the container by running:

     $ bin/globus-start-container

    When the DefaultIndexService is first activated, it will read the contents of the hierarchy.xml file and attempt to make an upstream registration for each upstream entry found within that file. The service will make each registration according to the parameters found in the upstream.xml file. Any errors or warnings during the registration process will be written to the container log. If successful, the "Entry" resource property of the upstream Index will contain a child element for the downstream (local) Index, and a copy of the downstream Index "Entry" resource property will be cached within that element.