Deploying a Simple TIBCO ActiveSpaces Data Grid
- TIBCO FTL must already be installed on the host machine that is to run the FTL server.
- 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 FTL server
This section describes the steps to bring up the FTL server.
- Procedure
- Navigate to an empty directory that can be used as the realm configuration data directory.
cd data_dir_1
The FTL server uses the current directory as the default location to store its working data files. When the FTL server 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. - Start 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 FTL server 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 FTL server.
- Procedure
- In a text editor, start editing a script file.
- 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. - 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
Wherecopyset_name
,node_name
,keeper_name
, andproxy_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. - 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 pipe-separated FTL server URLs.
Starting the Data Grid Processes
This section describes the steps to bring up the data grid component processes.
- Procedure
- Start the administrative daemon process
tibdgadmind -r http://<host>:<port>
- Start the state keeper process.
tibdgkeeper -n keeper_name -r http://<host>:<port> -g grid_name
- Start the node process
tibdgnode -n node_name -r http://<host>:<port> -g grid_name
- Start the proxy process
tibdgproxy -n proxy_name -r http://<host>:<port> -g grid_name
For all of the above
<host>
and
<port>
, refer to the pipe-separated FTL server URLs.
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 FTL server, administrative daemon, state keeper, node, proxy, and EMS server processes can be started on the same host machine.