Getting started tutorial lesson 3.1: Starting catalog and container servers

To run the sample client application, you must start a catalog server and a container server.

Before you begin

The env.sh|bat script is called by the other scripts to set needed environment variables. Normally you do not need to change this script.
  • [Linux][Unix]./env.sh
  • [Windows]env.bat

About this task

To run the application, you must first start the catalog service process. The catalog service is the control center of the data grid. The catalog service tracks the locations of container servers, and controls the placement of data to host container servers. After the catalog service starts, you can start the container servers, which store the application data for the data grid. To store multiple copies of the data, you can start multiple container servers. When all the servers are started, you can run the client application to insert, update, remove, and get data from the data grid.

Procedure

  1. Open a terminal session or command-line window.
  2. In a terminal session or command line window, navigate to the wxs_install_root/ObjectGrid/gettingstarted directory [Version 8.6 and later]of your server installation.
  3. Run the following script to start a catalog service process on localhost:
    [Version 8.6 and later]
    • [Linux][Unix]./startcat.sh
    • [Windows]startcat.bat

    The catalog service process runs in the current terminal window.

    You can also start the catalog service with the [Version 8.6 and later]startXsServer command. Run the [Version 8.6 and later]startXsServer from the wxs_install_root/ObjectGrid/bin directory:
    • [Version 8.6 and later][Linux][Unix]./startXsServer.sh cs0 -catalogServiceEndPoints cs0:localhost:6600:6601 -listenerPort 2809
    • [Version 8.6 and later][Windows]startXsServer.bat cs0 -catalogServiceEndPoints cs0:localhost:6600:6601 -listenerPort 2809
  4. Open another terminal session or command-line window, and run the following command to start a container server instance:
    [Version 8.6 and later]
    • [Linux][Unix]./startcontainer.sh server0
    • [Windows]startcontainer.bat server0

    The container server runs in the current terminal window. If you want to start more container server instances to support replication, you can repeat this step with a different server name.

    You can also start container servers with the [Version 8.6 and later]startXsServer command. Run the [Version 8.6 and later]startXsServer command from the wxs_install_root/ObjectGrid/bin directory:
    • [Version 8.6 and later][Linux][Unix]./startXsServer.sh c0 -catalogServiceEndPoints localhost:2809 -objectgridFile ../gettingstarted/server/config/objectgrid.xml -deploymentPolicyFile ../gettingstarted/server/config/deployment.xml
    • [Version 8.6 and later][Windows]startXsServer.bat c0 -catalogServiceEndPoints localhost:2809 -objectgridFile ..\gettingstarted\server\config\objectgrid.xml -deploymentPolicyFile ..\gettingstarted\server\config\deployment.xml
  5. Optional: [Version 8.6 and later][Java programming language only]Instead of starting the catalog and container servers separately, you can use the runall script to start a catalog server, container server, and Java™ sample client application in the same Java virtual machine.
    [Version 8.6 and later]
    • [Linux][Unix]./runall.sh
    • [Windows]runall.bat
    Restriction: Because the runall script runs embedded container servers, you cannot use the monitoring console to monitor your environment. Statistics are not collected for the container servers.
Related tasksStarting and stopping stand-alone serversYou can start and stop stand-alone catalog and container servers with scripts or the embedded server API.Related reference[Version 8.6 and later]startXsServer script (XIO)[Version 8.6 and later]The startXsServer script starts container and catalog servers that use the IBM eXtremeIO (XIO) transport mechanism. You must use the startXsServer when you want an enterprise data grid. You can use a variety of parameters when you start your servers to enable trace, specify port numbers, and so on.

Lesson checkpoint

In this lesson, you learned:
  • How to start catalog servers and container servers