Summary: Configuring the Service Grid, using the services.config File.

Overview

The services.config file (<GigaSpaces root>/config/services/services.config) contains configuration definitions for the following core services:

This configuration is based on the Jini configuration specification, a Java-based syntax that provides strict type definition and runtime configuration capabilities.

Shared Grid Configuration

Shared configurations (for both GSM and GSC) are located under the com.gigaspaces.grid configuration element in the services.config file.

com.gigaspaces.grid{
    groups = new String[]{"${com.gs.jini_lus.groups}"};
    secured = Boolean.getBoolean("com.gs.grid.secured");
}
Property Value Description
groups Sys.prop: com.gs.jini_lus.groups Jini's lookup service group; default set by bin/setenv script
secured Sys.prop: com.gs.grid.secured (false/true) True if GSM and GSC should be loaded in secured mode; default false

GigaSpaces Transport

The GigaSpaces LRMI Communication Protocol configuration defines the default exporter for services and utilities.
A more detailed description of how to configure the transport layer can be found here.

com.gigaspaces.transport is the configuration element in the the services.config file.

Grid Service Manager (GSM)

The Grid Service Manager (GSM) provides the support to deploy, manage and monitor services in the Service Grid.

org.jini.rio.monitor is the configuration element in the services.config file.

org.jini.rio.monitor {
    serviceResourceSelector = new org.jini.rio.monitor.LeastActiveSelector();

    /* Set the groups to join */
    initialLookupGroups = BootUtil.toArray("${com.gs.jini_lus.groups}");

    //NOTE: in order to enable the Jini Locators unicast discovery and registration, verify
    //the -Dcom.gs.jini_lus.locators=<host:port> is passed in the command line
    initialLookupLocators= BootUtil.toLookupLocators("${com.gs.jini_lus.locators}");

    serviceName = "Grid Service Manager";
    serviceComment = "Grid Service Management";
    opStringName = "Service Grid Infrastructure";
    jmxName = "com.gigaspaces.grid:type=GSM";

    // Delays next attempts to re-provision a service after it failed to allocate it on all of the
    // existing GSCs. If a new GSC is brought up, a re-provision request will attempt immediately.
    // Otherwise, after the specified delay, it will retry to provision the service on all existing
    // GSCs. Default is 10 min.
    pendingRequestDelay = 600000;

    /* Configure a FaultDetectionHandler for the Grid Service Monitor */
    fdh = "com.gigaspaces.grid.gsm.GSMFaultDetectionHandler";
    configArg = new Object[]{new String[]{
        "-",
        "com.gigaspaces.grid.gsm.GSMFaultDetectionHandler.invocationDelay=10000",
        "com.gigaspaces.grid.gsm.GSMFaultDetectionHandler.retryCount=0"}
    };
    faultDetectionHandler =
        new org.jini.rio.core.ClassBundle(fdh,
                                          null,  // load from classpath
                                          new String[]{"setConfiguration"},
                                          new Object[]{ configArg });
}

GSM Fault-Detection Handling

The GSMFaultDetectionHandler is used to monitor the reachability between GSMs.
A GSM acts as an active GSM for any deployments it initiated. In case of an abrupt termination, another GSM takes over the deployments, hence declaring an active state over them.

Property Value Description
invocationDelay 10000 ms Delay between each monitoring invocation
retryCount 0 Retries until a GSM is considered unreachable
retryTimeout 1000 ms Delay between retries until a GSM is considered unreachable

When a GSM fails to provision a service on all currently available GSCs, the next attempt to re-provision the service is delayed (as specified by pendingRequestDelay). If a new GSC is brought up during this time, then a re-provision attempt is initiated immediately.

Grid Service Container (GSC)

The Grid Service Container (GSC) represents the capabilities of a compute resource, making the compute resource available as a service on the network, and provides a dynamic lightweight container to instantiate dynamic application services.

com.gigaspaces.grid.gsc is the configuration element in the services.config file.

com.gigaspaces.grid.gsc {
    initialLookupGroups = BootUtil.toArray("${com.gs.jini_lus.groups}");

    //NOTE: in order to enable the Jini Locators unicast discovery and registration, verify
    //the -Dcom.gs.jini_lus.locators=<host:port> is passed in the command line
    initialLookupLocators= BootUtil.toLookupLocators("${com.gs.jini_lus.locators}");
    
    serviceName = "Grid Service Container";
    serviceComment = "GigaSpace Technologies Dynamic Grid Service Container";
    provisionEnabled = Boolean.valueOf(true);
    opStringName = "Service Grid Infrastructure";
    jmxName = "com.gigaspaces.grid:type=GSC";

    nativeLibDirectory = new String[]{
                             "${com.gigaspaces.grid.lib}${/}native"
                         };

    /* Configure a FaultDetectionHandler for the Grid Service Container */
    fdh = "com.gigaspaces.grid.gsc.GSCFaultDetectionHandler";
    configArg = new Object[]{new String[]{
        "-",
        "com.gigaspaces.grid.gsc.GSCFaultDetectionHandler.invocationDelay=10000",
        "com.gigaspaces.grid.gsc.GSCFaultDetectionHandler.retryCount=0"}
    };
    faultDetectionHandler =
        new org.jini.rio.core.ClassBundle(fdh,
                                          null,  // load from classpath
                                          new String[]{"setConfiguration"},
                                          new Object[]{ configArg });
}

GSC Fault-Detection Handling

The GSCFaultDetectionHandler is used by the GigaSpaces Management Center (UI) to monitor the reachability of a GSC.

Property Value Description
invocationDelay 10000 ms Delay between each monitoring invocation
retryCount 0 Retries until the UI considers a GSC as unreachable
retryTimeout 1000 ms Delay between retries until the UI considers a GSC as unreachable

Service Fault-Detection Handling

The Member Alive Indicator SLA is used to monitor the reachability between a GSM and a service deployed on a GSC. A service is managed by only one active GSM, through which the deployment initiated, but it is monitored by all GSMs. If a GSC has been abruptly terminated, only the active GSM is responsible for redeployment.

Jini Lookup Service (LUS)

The Jini lookup service configuration exposed in services.config, mainly defines the lookup groups and the lookup protocols.
A more detailed description of how to configure Jini reggie can be found here.

com.sun.jini.reggie is the configuration element in the services.config file.

com.sun.jini.reggie {

    //Specifies initial groups for this lookup service to be a member of.
    initialMemberGroups = BootUtil.toArray("${com.gs.jini_lus.groups}");

    //Specifies initial list of locators indicating other lookup services with which to register.
    //NOTE: in order to enable the Jini Locators unicast discovery and registration, verify
    //the -Dcom.gs.jini_lus.locators=<host:port> is passed in the command line
    initialLookupLocators = BootUtil.toLookupLocators("${com.gs.jini_lus.locators}");

    //Specifies the host name for unicast discovery, which is advertised in multicast announcements
    //and unicast discovery responses.
    unicastDiscoveryHost =
        BootUtil.getHostAddressFromProperty("java.rmi.server.hostname");

    //Specifies the initial number of the port on which to listen for unicast discovery queries.
    //If the port number is 0, then an arbitrary port is selected (with preference given to 4162, if available). 
    //This entry is obtained once at service start
    //initialUnicastDiscoveryPort = 1222;

    //Specifies initial attributes to use when registering with lookup services (including self)
    initialLookupAttributes =
        new net.jini.core.entry.Entry[] {
            new net.jini.lookup.entry.Name("Lookup"),
            new org.jini.rio.entry.OperationalStringEntry(
                                               "Service Grid Infrastructure")
        };

    //Specifies the exporter to use to export this service.
    serverExporter = com.gigaspaces.transport.defaultExporter;

    //A service's entry in the lookup is leased and kept until the next renewal attempt fails. This property
    //specifies the lower bound for the maximum value allowed for service leases, in milliseconds. Default 15 min.
    minMaxServiceLease = 900000L;
	
    //Internal Reggie task managers (applies to GigaRegistrar)
    commTaskManager = new com.sun.jini.thread.TaskManager(40, 15000, 2.0F, "Reggie Comm Task", 10);
    eventTaskManagerPool = 5;
    eventTaskManager = new com.sun.jini.thread.TaskManager(8, 15000, 2.0F, "Reggie Event Task", 10);
    
    //Specifies if a cache miss should indicate the non existence of a Space service within reggie
    useCacheForSpaceMiss = Boolean.valueOf(true);
}

Jini Transaction Manager

The Jini Transaction Manager configuration exposed in services.config mainly defines the lookup groups and the lookup protocols.
A more detailed description of how to configure mahalo can be found here.

com.sun.jini.mahalo is the configuration element in the services.config file.

Quality of Service (QoS)

The quality of service section defines a set of measurable capabilities for a compute resource (e.g. a GSC). These specify how often the compute resource informs registered observers (e.g. a GSM) of a state change. A state change is determined if any of the MeasurableCapability components contained within this ComputeResource, provide an update in the interval specified.

org.jini.rio.qos is the configuration element in the services.config file.

There are three measurable capabilities defined: CPU, memory and disk. These can be monitored using the Utilization tab in the GigaSpaces Management Center (UI). A GSM won't deploy to a GSC which has breached the QoS requirements, and relocates an already deployed service, if possible.

com.gigaspaces.management.system.cpu, com.gigaspaces.management.system.memory, and com.gigaspaces.management.system.disk are the configuration elements in the services.config file.

This configuration defines the overall capability of a GSC, which can be overridden for each deployed service by specifying the service level agreement (SLA).

GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence