Deploying a Simple TIBCO ActiveSpaces Data Grid

The instructions in this section outline the steps involved in running grid stores with a minimal ActiveSpaces data grid setup that is suitable for a development environment. For information on designing, configuring and deploying an ActiveSpaces data grid that is suitable for your production environment, refer to the TIBCO ActiveSpaces Concepts and TIBCO ActiveSpaces Administration product guides.

Prerequisites

  • TIBCO FTL must already be installed on the host machine that is to run the realm service.
  • TIBCO ActiveSpaces must already be installed on all host machines that are to run the state keeper or node processes.

Overview

An ActiveSpaces data grid suitable for use with grid stores is composed of the following components:
  • Realm service (runs as part of a TIBCO FTL server)
  • Administrative daemon
  • State keeper
  • Node
  • Proxy

Embedded Proxy

The ActiveSpaces proxy facilitates communication between the EMS server and the data grid. While the EMS server requires an external proxy process to connect to the data grid during startup, all subsequent communication between the server’s grid stores and the data grid is carried out via an ActiveSpaces proxy embedded directly in the server. Using this embedded proxy improves grid store performance by eliminating any would-be server to proxy communication latency. Note that the embedded proxy must be included in the data grid definition. See the Defining the Data Grid and Component Processes section for details.

Starting a Realm Service

This section describes the steps to bring up the realm service.

Procedure

  1. Navigate to an empty directory that can be used as the realm configuration data directory.
    cd data_dir_1
    The realm service uses the current directory as the default location to store its working data files. When the realm service detects an empty working directory, it begins with a default realm definition.
    If you have already begun to configure the realm definition, then navigate to your existing data directory instead.
  2. Start the realm service by running the FTL server executable.
    tibftlserver -n <name>@<host>:<port>

    Where,

    <name> is a unique name for the FTL server, for example, ftl1.

    <port> is any port not bound by another process.

    ActiveSpaces component processes initiate contact with the realm service at this address.

Defining the Data Grid and Component Processes

This section describes the steps to define the data grid and its component processes in the realm service.

Procedure

  1. In a text editor, start editing a script file.
  2. Add the script command to create the data grid by using the syntax:
    grid create statekeeper_count=1 copyset_size=1 grid_name
    Where, grid_name is a unique name for this data grid.
  3. Add the script commands to create the copyset, node, state keeper, external proxy and embedded proxy:
    copyset create copyset_name
    node create --copyset copyset_name node_name
    keeper create keeper_name
    proxy create proxy_name
    proxy create _embedded_proxy
    
    Where copyset_name, node_name, keeper_name, and proxy_name are any unique name for each of these components.
    Note: Copysets and nodes in ActiveSpaces relate to horizontal data partitioning and data replication. When only a single copyset and node are defined as in this case, the data grid does not perform horizontal partitioning or replication.
  4. Run the script using the tibdg administration tool to create the data grid.
     tibdg -s script_file_path -r http://<host>:<port>
    where <host> and <port> refer to the realm service URL.

Starting the Data Grid Processes

This section describes the steps to bring up the data grid component processes.

Procedure

  1. Start the administrative daemon process
    tibdgadmind -r http://<host>:<port>
  2. Start the state keeper process.
     tibdgkeeper -n keeper_name -r http://<host>:<port> -g grid_name 
  3. Start the node process
     tibdgnode -n node_name -r http://<host>:<port> -g grid_name
  4. Start the proxy process
    tibdgproxy -n proxy_name -r http://<host>:<port> -g grid_name

Example

For all of the above <host> and <port>, refer to the realm service URL.

keeper_name, node_name, proxy_name and grid_name refer to the names chosen in Defining the Data Grid and Component Processes.

You can now run the following tibdg command to verify that all component processes are running and that the data grid is online:

tibdg -r http://<host>:<port> status

In a development environment, the realm service, administrative daemon, state keeper, node, proxy, and EMS server processes can be started on the same host machine.