IBM WebSphere eXtreme Scale

WebSphere eXtreme Scale Getting Started readme

The getting started sandbox is provided for a quick introduction to eXtreme Scale functionality and basic operation. It consists of shell and batch scripts designed to start a simple grid with very little customization needed. In addition, a client program, including source, is provided to run simple create, read, update, and delete (CRUD) functions to this basic grid. Eclipse project metadata for the client program is provided.

For information on loading and running this client in Eclipse, refer to the ECLIPSE_README document that is provided.

Table of contents

Software requirements

Getting the sample

This sample is located in the directory.

This sample is in the <objectgrid_root>/gettingstarted directory.

Sample files

This sample provides scripts to start a catalog, container, and run a client to connect to the grid. One set is for UNIX platforms and one set is for Windows platforms:

  • stopXsServer.sh / stopXsServer.bat: Stop the catalog server.

    UNIX: ./stopXsServer.sh unique server name

    WINDOWS: stopXsServer.bat unique server name

  • stopXsServer.sh / stopXsServer.bat: Stop the container server.

    UNIX: ./stopXsServer.sh unique server name

    WINDOWS: stopXsServer.bat unique server name

  • runall.sh / runall.bat: Starts a catalog server, container server, and runs the client application in the same JVM. Use the same commands as the interactive client. Since this script runs embedded container servers, the monitoring console is not supported because statistics are not being taken

    UNIX: ./runall.sh

    WINDOWS: runall.bat

  • Running the sample

    This section describes the basic steps for starting your first grid and running a client to interact with it.

    1. Open a terminal session or command-line window.
    2. Type cd install_root/gettingstarted

      Substitute install_root with the path to the eXtreme Scale installation root directory or the root file path of the extracted eXtreme Scale trial.

    3. Run an eXtreme Scale catalog service process on localhost:

      UNIX: startcat.sh

      WINDOWS: startcat.bat

      The catalog service process runs in the current terminal window.

    4. Run an eXtreme Scale container server instance in the new terminal window:

      UNIX: startcontainer.sh server0

      WINDOWS: startcontainer.bat server0

      The container server will run in the current terminal window.

    5. Open another terminal session or command-line window and repeat step 5, using a different server name to start additional container servers.
    6. Run some client commands in the new terminal window:
      1. Add some data to the grid:
      2. Important: If your system is using DBCS (double byte character sets), when inserting data into the grid with the runClient script, the data may display as garbled or corrupted text. This can display in the output or in the cache. A possible workaround is to update the java call in the runClient script to include the JAVA VM argument -Xargencoding, and then specify the DBCS as a unicode character set. For example, using the command: \u runClient i key\u2e81 Hello\2e84World

        UNIX: runclient.sh i key1 helloworld

        WINDOWS: runclient.bat i key1 helloworld

      3. The client runs in interactive mode.
        1. Start a transaction. You can use a one-phase commit or a two-phase commit operation for your transaction. With a one-phase commit, the transaction must write to a single partition. If you insert several keys during your transaction that are placed in different partitions, the transaction fails when you commit. You can use a two-phase commit to write to multiple partitions in a single transaction.
          • : Begin a one-phase commit transaction
                    begin
                    
          • Begin a two-phase commit transaction:
                    begin2pc
                    
        2. Insert a value.
              i key1 helloWorld
              SUCCESS: Inserted TestValue [value=helloWorld] with key TestKey [key=key1], partitionId=6
          
        3. Retrieve a value you inserted.
          g key1
              Value is TestValue [value=helloWorld], partitionId=6
              
        4. Update a value.
          u key1 goodbyeWorld
              SUCCESS: Updated key TestKey [key=key1] with value TestValue [value=goodbyeWorld], partitionId=6
        5. Commit the value.
          commit
        6. Roll back the transaction
          rollback
        7. Delete a value you inserted.
          d key1
          SUCCESS: Deleted value with key TestKey [key=key1], partitionId=6
        8. Insert a number of test entries. For example, to insert 1000 keys and values that are numbered from 0 to 999, use the following command:
          n 1000
    7. Type exit to stop the client. If using the runall script, the embedded catalog and container server will also stop.
    8. Type stopcontainer.sh
    9. Type stopcat.sh

    More information

  • Use the following links for additional information about WebSphere eXtreme Scale: