< Previous | Next >

Getting started tutorial lesson 3.2: Running the getting started sample client application

Use the following steps to run a client to interact with the data grid. The catalog server, container server, and client all run on a single server in this example.

Open a terminal session or command-line window to run client commands.
The runclient.sh|bat script runs the simple create, retrieve, update, and delete (CRUD) client and starts the specified operation. The runclient.sh|bat script is run with the following parameters:
  • [Unix][Linux] ./runclient.sh command value1 value2
  • [Windows] runclient.bat command value1 value2
For command, use one of the following options:
  • Specify as i to insert value2 into data grid with key value1
  • Specify as u to update object that is keyed by value1 to value2
  • Specify as d to delete object that is keyed by value1
  • Specify as g to retrieve and display object that is keyed by value1
  1. Add data to the data grid.
    Important: If your system is using double byte character sets (DBCS), you might see garbled or corrupted text when you insert data into the data grid with the runClient script. This text can display in the output or in the cache. To work around this issue, update the Java call in the runClient script to include the -Xargencoding argument, and then specify the DBCS as a Unicode character set. For example, use the command: \u runClient i key\u2e81 Hello\2e84World
    • [Unix][Linux] ./runclient.sh i key1 helloWorld
    • [Windows] runclient.bat i key1 helloWorld
  2. Search and display the value:
    • [Unix][Linux] ./runclient.sh g key1
    • [Windows] runclient.bat g key1
  3. Update the value:
    • [Unix][Linux] ./runclient.sh u key1 goodbyeWorld
    • [Windows] runclient.bat u key1 goodbyeWorld
  4. Delete the value:
    • [Unix][Linux] ./runclient.sh d key1
    • [Windows] runclient.bat d key1

Lesson checkpoint

Lessons learned

In this lesson, you learned:
  • How to run the sample client application to insert, get, update, and delete data from the data grid.
< Previous | Next >