Deploying In-Memory-Data-Grid on the Cloud

Search CCF4XAP
Searching Cloud Computing Framework for XAP
Browse CCF4XAP

                                                              

Overview

When deploying an In-Memory Data Grid on the Cloud you should choose between the following deployment topolgies:
IMDG Primary-Backup Topology


IMDG Partitioned Topology


IMDG Partitioned with Backup Topology

You can add into each of the above persistency option:
IMDG with Synchronous-Persistency Topology


IMDG with Asynchronous-Persistency Topology

When deploying In-Memory-Data-Grid you should go through the following steps:
– Step 1 - Create your Cloud Application Deployment Configuration File
– Step 2 - Deploy your Data-Grid - Use the Cloud Web Console or the Cloud Tools Command Line Framework.
– Step 3 - Manage your application via the different Cloud Management Tools.
– Step 4 - Once you are done - Shutdown your Application.

The steps are identical to the steps described at Deploying Web Application on the Cloud, but Step 1 - the Cloud Application Deployment Configuration File is different.
The following sections will describe the settings required when deploying In-Memory-Data-Grid on the Cloud.

Deployment Topology

The Deployment will involve the following:

  • GSM Machine
  • GSC Machines - Running IMDG
  • UI Machine - Running GS-UI
  • Databse Machine (Optional) - Running Database and Mirror

General Settings

The General Application settings would include:

Cloud Application Deployment File - General Settings
<cloud-config>
	<cloud-name>my-data-grid</cloud-name>
	<machines>
		<gsm-machine>
			<name>gsm_small</name>
			<number-of-machines>1</number-of-machines>
			<gsm-per-machine>1</gsm-per-machine>
			<ami-type>small</ami-type>
			<ami-id>ami-3abe5953</ami-id>
			<processing-units>
			...
			</processing-units>
		</gsm-machine>			
		<gsc-machine>
			<name>gsc_small</name>
			<number-of-machines>4</number-of-machines>
			<gsc-per-machine>2</gsc-per-machine>
			<ami-type>small</ami-type>
			<ami-id>ami-3abe5953</ami-id>
		</gsc-machine>			
	</machines>
</cloud-config>

Deployment Options

The Deployment Options should include the following:

  • Cluster schema
  • Amount of partitions
  • Amount of backup instances per partition

IMDG Primary-Backup Topology

To deploy Primary-Backup topology the <deploy-options> should have the following settings:

<cloud-config>
	<machines>
		<gsm-machine>
			<name>GSM</name>
			...
			<processing-units>
				<processing-unit>
					<deploy-options>-cluster schema=partitioned-sync2backup 
					total_members=1,1 -properties embed://dataGridName=myIMDG 
					-max-instances-per-vm 1 -max-instances-per-machine 1 
					-override-name myIMDG /templates/datagrid</deploy-options>
				</processing-unit>
			</processing-units>
		</gsm-machine>
	</machines>
</cloud-config>

IMDG Partitioned Topology

To deploy Partitioned topology the <deploy-options> should have the following settings:

<deploy-options>-cluster schema=partitioned total_members=2 
	-properties embed://dataGridName=myIMDG -max-instances-per-vm 1 
	-max-instances-per-machine 1 
	-override-name myIMDG /templates/datagrid
</deploy-options>

IMDG Partitioned with Backup Topology

To deploy Partitioned with Backup topology the <deploy-options> should have the following settings:

<deploy-options>-cluster schema=partitioned-sync2backup total_members=2,1 
	-properties embed://dataGridName=myIMDG -max-instances-per-vm 1 
	-max-instances-per-machine 1 
	-override-name myIMDG /templates/datagrid
</deploy-options>

IMDG with Synchronous-Persistency Topology

To deploy IMDG with sync-persistency topology you should have the Synchronous-Persistency settings added to your application.

See the Cloud Data Persistency for full details how to configure your application to have persistency enabled.

IMDG pu.xml

The IMDG pu.xml Space configuration should include the following parameters:

IMDG pu.xml
<os-core:space id="space" url="/./space" schema="persistent" 
               external-data-source="hibernateDataSource">
    <os-core:properties>
        <props>
            <!-- Use ALL IN CACHE -->
            <prop key="space-config.engine.cache_policy">1</prop>
            <!-- <prop key="space-config.external-data-source.usage">read-only</prop>-->
            <prop key="cluster-config.cache-loader.external-data-source">true</prop>
            <prop key="cluster-config.cache-loader.central-data-source">true</prop>
        </props>
    </os-core:properties>
</os-core:space>

Cloud Deployment Configuration File

The cloud deployment configuration file should have the following settings:

The cloud deployment configuration file
<cloud-config>
	<cloud-name>data-grid-sync-persist</cloud-name>
	<machines>	
		<!--gsc and gsm machines-->	
		<database-machine>
			<!-database machine settings-->
			...
				<transfer-files>
				<!--database files-->
				...
				</transfer-files>		
		</database-machine>
		<gsm-machine>
			<name>GSM</name>
			<processing-units>
				<!--application PUs-->
			</processing-units>
		</gsm-machine>
	</machines>	
</cloud-config>

IMDG with Asynchronous-Persistency Topology

When deploying IMDG with asynchronous-persistency topology you should have the Asynchronous-Persistency settings added to your application. This should include also the Mirror PU added to your application deployment file.

See the Cloud Data Persistency for full details how to configure your application to have persistency enabled.

IMDG pu.xml

The IMDG pu.xml Space configuration includes the following parameters:

IMDG pu.xml
<os-core:space id="space" url="/./space" schema="persistent" mirror="true" external-data-source="hibernateDataSource">
    <os-core:properties>
        <props>
            <!-- Use ALL IN CACHE - Read Only from the database-->
            <prop key="space-config.engine.cache_policy">1</prop>
            <prop key="space-config.external-data-source.usage">read-only</prop>
            <prop key="cluster-config.cache-loader.external-data-source">true</prop>
            <prop key="cluster-config.cache-loader.central-data-source">true</prop>
        </props>
    </os-core:properties>
</os-core:space>

Cloud Deployment Configuration File

The cloud deployment configuration file should have the following settings:

The cloud deployment configuration file
<cloud-config>
	<cloud-name>data-grid-async-persist</cloud-name>
	<machines>	
		<database-machine>
			<!-database machine settings-->
			...
				<transfer-files>
					<!--database and mirror files-->
					...
				</transfer-files>			
		</database-machine>
		<gsm-machine>
			<name>GSM</name>
			<processing-units>
				<!--application and mirror PUs-->
			</processing-units>
		</gsm-machine>
		<gsc-machine>
			...
		</gsm-machine>
	</machines>	
</cloud-config>

Running the GU-UI over the Cloud

Here are the steps to perform to run the GS-UI on the Cloud:

  • Step 1 - Start the GS-UI - Once all the machines will be in 'running' mode and the Data-Grid will be deployed Click the Manage button
  • Step 2 - The GS-UI will be started

  • Step 3 - Run the Benchmark Tool

  • Step 4 - Watch the Statistics

More things you can do...

Test High-Availability and Self healing

You can Terminate of the machines and see how the data-grid recovers itself

– Click the Add Machine Button and Add 2 machines. Click Close.
– New machines will be started for you. These will join the grid

– The System will recover and place the missing spaces within the newly started containers

Run different Space operations

You can perform other space operations such as read , take via the benchmark view.

Deploy additional IMDG clusters

You can use the existing GSC to host additional IMDG (space) clusters.

Labels

 
(None)