Using Service Grid to Deploy Partitioned Space

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Summary: How to deploy a partitioned cache, to scale out data and messages by adding memory partitions when needed.

Overview

The partitioned cache provides a simple way to add more partition instances, scaling out data and messages based on a certain field in the message attributes. Its main limitation is that data that is already stored in the partition is not re-partitioned when a new node is added or removed.

If you want to deploy a fault-tolerant partitioned cache, see Using Service Grid to Deploy Partitioned Space with Backup.

The partitioned cache can be useful as a front-end to a centralized data store, via CacheLoader. In this scenario, the data is loaded from the database if not in cache, allowing you to increase cache capacity by adding more memory instances to the partition. Another common scenario is stateless event processing, such as data streaming applications (market data is one example); events are constantly refreshed through the stream, and the partition balances itself over time when new nodes are added or removed.

The partitioned cache is set for a deployment of three nodes. Two of the instances are marked as required, meaning that the Service Grid makes its best effort to keep the two instances running on any available machine, even during a failover scenario. The Service Grid is also configured to run a single cache instance per container. In a case of load (high CPU utilization), the Service Grid tries to launch another cache instance if a Service Container is available for it.

The number of partition instances is kept constant throughout the lifecycle of the cache. It is the number of instances per Grid Service Container (GSC) / Virtual Machine that varies. Scaling is achieved by utilizing the available memory capacity in each GSC / VM. Relocation of partition instances can be done at any time, even dynamically. Therefore, it is normally required that the number of partitions in a cluster deployment be higher than the amount of available VMs. When a new GSC / VM joins the cluster, one of the existing partitions can be re-deployed to that machine.

Deploying Partitioned Space Using CLI

To deploy a partitioned cache using the Service Grid CLI:

  1. Use the gs-all utility to start the Grid Service Monitor (GSM) and Grid Service Container (GSC). This utility launches both GSM and GSC under the same virtual machine.
    When deploying a partitioned space, you must start another container before the deployment, by executing <GigaSpaces Root>\ServiceGrid\bin\gsc.bat. Otherwise your deployment won't be successful.

    Alternatively, you can start two containers using the service launcher (see Running Service Grid).

  1. Open the command line shell (gs) and change directory to config/deployment
  2. Use the command deploy partitioned_cluster.xml command to deploy the partitioned cache, utilizing the partitioned_cluster.xml deployment descriptor file.
    The following output is displayed:
    s> deploy partitioned_cluster.xml
    total 1
    Deploying [Partitioned Cluster], total services [2] ...
            [1] Partitioned GigaSpace provisioned to 11.0.0.6
            - There are [1] service provisioning requests outstanding
    Deployment notification time 5015 millis, Command completed
    
  3. To deploy the second cache instance, run a second GSC instance. The Service Grid automatically detects the availability of the new GSC instance and deploys the second cache instance into the new container.

Monitoring the Deployed Cache

Use the list command to view the cache instances, the lookup groups they are assigned to, and their host locations.

gs> list
total services 12
[1]   Grid Service Container   gs-grid                  test@11.0.0.6
[2]   PartitionedGigaSpace      gigaspaces-1400-045      <?>
[3]   PartitionedGigaSpace      gigaspaces-1400-045      <?>
[4]   Lookup                   gs-grid, gigaspaces-14   11.0.0.6
[5]   PartitionedGigaSpace_co   gigaspaces-1400-045      <?>
[6]   Lookup                   gs-grid, gigaspaces-14   11.0.0.6
[7]   Grid Service Container   gs-grid                  test@11.0.0.6
[8]   Grid Service Manager     gs-grid                  test@11.0.0.6
[9]   PartitionedGigaSpace_co   gigaspaces-1400-045      <?>
[10]  Grid Service Manager     gs-grid                  test@11.0.0.6
[11]  PartitionedGigaSpace      gigaspaces-1400-045      <?>
[12]  PartitionedGigaSpace_co   gigaspaces-1400-045      <?>

The list space utility can provide more information about the space instances, such as the number of entries and their basic configuration:

Option Description
list space Lists all spaces in the network
list space entry Lists all spaces with a specific count per class
list space stats Lists all spaces, the count per class, and runtime statistics

Deploying Partitioned Space Using Admin UI

To deploy a partitioned cache using the Service Grid Admin UI:

  1. Start the Service Grid Admin UI, using the gs-ui utility.
  2. Start the Deployment Wizard by clicking the Deploy button (see screenshot below), and select A Proactive Space as the deployment type. Click Next.

    • A – Deployment button.
      Selecting Application as the deployment type defines a Generic Application Service (see Compute Grid).
  3. Set the deployment parameters:
    • In the Deployment Name field, enter a name to identify the deployed service.
    • In the Space Name field, enter a name to identify the space. This name is also used to to define the cache cluster name.
    • In the Initial Instance Count field, type 2.
    • In the Maximum Instance Count field, type 2.
    • From the Space Schema drop-down menu, select cache.
    • From the Cluster Schema drop-down menu, select partitioned to deploy a partitioned cache.

      Click here to view more details about the deployment parameters.

      To create a Deployment Descriptor based on the default settings, click the Advanced button. This opens the Deployment Descriptor Generator, allowing you to modify the default settings.

      When you are done, press Next.

  4. In this step you determine the location of the code of the GigaSpaces service, by selecting a codebase server. This enables the Service Grid to dynamically deploy GigaSpaces instances on machines that do not have GigaSpaces installed. The server location is provided as a URL.
    Select one of the GSM instances from the list.

  5. Click Verify. This verifies that the location provided by the deployment descriptor is available. If not, another GSM instance, which maintains a reference to the service, is suggested.
    The verification step is required only if the codebase server provided in the deployment descriptor is unavailable.
    If you clicked Verify and the server is not verified successfully, this indicates that your HTTP port is not set correctly in the Service Deployment Descriptor. Open the descriptor file, and edit the tag <Parameter Name="httpPort" Value="9010" />, under <Component Name="com.gigaspaces.start">. Set the Value attribute to the current port set on your codebase server.

    Once the verification finishes successfully, the Deploy button becomes enabled.

  6. Click the Deploy button to start the deployment process. Current deployment status is shown; wait for deployment to finish or press Close to abort the process.

Refer to the UI Undeploy, Redeploy, and Update Options section to learn how to use these options.

RELATED TOPICS

Declaring Elements Globally in Deployment Descriptor Labels: service-grid, deployment, product-gigaspaces-5x
Declaring Service UI in Deployment Descriptor Labels: service-grid, deployment, product-gigaspaces-5x
Deployment Descriptor Codebase Element Labels: service-grid, deployment
Deployment Descriptor DeploymentSchedule Element Labels: service-grid, deployment, product-gigaspaces-5x
Deployment Descriptor Parameters and Configuration Elements Labels: service-grid, deployment, product-gigaspaces-5x
Deployment Descriptor SharedComponent Element Labels: service-grid, deployment
Deployment Descriptor SLA Element Labels: deployment, service-grid, product-gigaspaces-5x
deploy - Service Grid CLI Labels: deployment, service-grid-cli, service-grid
Fixed and Dynamic ServiceBean ProvisionType Labels: service-grid, deployment, product-gigaspaces-5x
Injecting Deployment Descriptor Properties into POJOs Labels: service-grid, deployment
POJO Lifecycle in Service Grid Labels: service-grid, deployment
Proactive Cache Labels: deployment, clustering, service-grid-intro, service-grid, dynamic-clustering, proactive-cache, failover
redeploy - Service Grid CLI Labels: service-grid-cli, service-grid, deployment
Rio OperationalString Labels: service-grid, deployment, product-gigaspaces-5x
Service Associations Labels: service-grid, deployment, product-gigaspaces-5x
Service Deployment Descriptor Labels: service-grid, environment, service-grid-config, deployment, clustering, service-grid-properties, gigaspaces-properties, service-grid-intro
Service Grid ClassLoader Hierarchy Labels: service-grid, deployment
undeploy - Service Grid CLI Labels: service-grid, deployment, service-grid-cli
Using Service Grid to Deploy Partitioned Space Labels: dynamic-clustering, clustering, partitioned-cache, service-grid-cli, deployment-wizard, deployment, service-grid-ui
Using Service Grid to Deploy Partitioned Space with Backup Labels: dynamic-clustering, service-grid, partitioned-cache, deployment-wizard, clustering, deployment
Using Service Grid to Deploy Replicated Space Labels: clustering, deployment, service-grid, replicated-cache, deployment-wizard, service-grid-cli, service-grid-ui
Using Service Grid to Deploy Space Labels: deployment, service-grid, service-grid-cli, deployment-wizard, service-grid-ui
Using Service Grid to Deploy Spring Applications Labels: service-grid, deployment, spring, deployment-wizard, product-gigaspaces-5x
Using System Properties for Deployment Descriptor Element Values Labels: service-grid, deployment, product-gigaspaces-5x

Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels