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
- Java runtime environment (JRE) version 5 or higher
- All operating systems
- Eclipse IDE for Java developers 3.0 and later
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:
- env.sh / env.bat: This script is called by the other scripts to set needed environment
variables. Normally this script does not need to be changed.
- runcat.sh / runcat.bat: Starts the eXtreme Scale catalog service process on the local system.
- USAGE:
UNIX: ./startcat.sh
Windows: startcat.bat
startcontainer.sh / startcontainer.bat: Starts an eXtreme Scale container server instance. Any number of containers can
be started by running this script multiple times with unique server
names. These instances will work together to host partitioned and
redundant information in the grid.
- USAGE:
UNIX: ./startcontainer.sh unique server name
WINDOWS: startcontainer.bat unique server name
runclient.sh / runclient.bat: Runs the simple CRUD client and executes the given operation.
The client can run in interactive mode by just running the client and following the usage, or by passing the arguments in the command line.USAGE:
UNIX: ./runclient.sh
WINDOWS: runclient.bat
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 takenUNIX: ./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.
- Open a terminal session or command-line window.
- 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.
- 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.
- 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.
- Open another terminal session or command-line window and repeat step 5, using a different server name to start additional container servers.
- Run some client commands in the new terminal window:
- Add some data to the grid:
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
- The client runs in interactive mode.
- 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
- Insert a value.
i key1 helloWorld
SUCCESS: Inserted TestValue [value=helloWorld] with key TestKey [key=key1], partitionId=6
- Retrieve a value you inserted.
g key1
Value is TestValue [value=helloWorld], partitionId=6
- Update a value.
u key1 goodbyeWorld
SUCCESS: Updated key TestKey [key=key1] with value TestValue [value=goodbyeWorld], partitionId=6
-
Commit the value.
commit
-
Roll back the transaction
rollback
-
Delete a value you inserted.
d key1
SUCCESS: Deleted value with key TestKey [key=key1], partitionId=6
-
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
Type exit to stop the client. If using the runall script, the embedded catalog and container server will also stop.
Type stopcontainer.sh
Type stopcat.sh
More information
Use the following links for additional information about WebSphere
eXtreme Scale: