Running the Demo

Run the application to demonstrate the WAN replication.

Note: The list of all commands is available by typing > help.
  1. In the wan-config-region-1.xml and wan-config-region-2.xml files, replace the "wan-samples-root-dir" placeholder with the actual location of the folder (for example, $WAN_SAMPLES/).
  2. Launch the Region-1 TSA using the command start-sample-server-1.sh (for UNIX/Linux) or start-sample-server-1.bat (for Windows).
  3. Launch the Region-2 TSA using the command start-sample-server-2.sh (for UNIX/Linux) or start-sample-server-2.bat (for Windows).
  4. Launch the Region-1 WAN Orchestrator using the command start-orch-1.sh (for UNIX/Linux) or start-orch-1.bat (for Windows).
  5. Launch the Region-2 WAN Orchestrator using the command start-orch-2.sh (for UNIX/Linux) or start-orch-2.bat (for Windows).

    Now that the TSA and WAN services for regions 1 and 2 have started, we are ready to run the application and demonstrate the replication process.

  6. Start the Region-1 application using the command run.sh (for UNIX/Linux) or run.bat (for Windows). You should see a command prompt which indicates that the application has started and is ready to accept various instructions.
  7. At the command prompt type:

    > connect localhost:9510 bar

    where bar is a sample cache name. You can use any name you want. This will start the application's cache manager and will make the Region-1 cluster operational.

  8. Start the Region-2 application, but at the command prompt, type:

    > connect localhost:9610 bar

    where bar is a sample cache name. You can use any name you want. This will start the application's cache manager and will make the Region-2 cluster operational.

  9. Store some elements in the Region-1 TSA by typing the following command on the Region-1 application:

    > fill 100

    This command will put 100 keys named k0, k1, ... k99 with values v0, v1, ... , v99 into Region-1.

  10. See if the elements have been replicated to the Region-2 TSA by typing the following command on the Region-2 application:

    > get k0

    You should see [k0, v0] as the result, which indicates that the key k0, which was inserted on Region-1, was successfully replicated to Region-2.

  11. Change the k0 value from Region-2 by typing the following command:

    > put k0 baz

    This "put", which happened on Region-2, should now be visible in Region-1. Type the following command on the command prompt of Region-1:

    > get k0

    You should see [k0, baz] as the result, which indicates successful replication.