Using BcTestSrvr

(Backchannel test server)

This server is useful for verifying that EventWeb is installed and working properly; And it also provides a relatively simple example of how EventWeb works.

If port 80 is available on your machine, running the server is very simple. If you can't use port 80, see Using an alternate port.

Start the server

You will get a timestamped message indicating the server is starting. When the service is ready you'll get another timestamped message with the service location, (port & path), followed by a dashed line. Below the line a one line message will be printed each time a client connects.

Access the server

Notice the square in the upper right corner of the tester page header. This is the applet that communicates with the server. It displays no content, but it's color indicates the applet's state:
    Yellow - Running but not connected.
    Green - Connected.
    Red - An error has occurred.
    Orange - Indicates a warning.
    Any other color indicates the applet is not loaded yet.
    (If there are two colors, the bottom color is a previous transitional state.)
In the lower left corner of the page header is a line with information about the applet, (obtained by calling it's getAppletInfo() method). When the page first loads this line just says "Applet Info".

In normal use, EventWeb is very fast. However, in this situation it will be slower. Once the applet is loaded in the browser's cache, it will run a lot faster. We always use the same applet, so this is a one time operation for each host.

Before doing anything else, you need to wait for the applet info line to fill in with something like:
TvIoWwgt Version x.x.x, Steve Thompson
Depending on the speed of your system, this could be anything from instantaneous to a few seconds. Once you have the info line, the page is fully loaded and ready to connect to the server. (In production applications we have the applet connect automatically, here we're doing things manually.)

The Backchannel Tester web page.
At this point, the applet light in the upper right should be yellow.

There are a number of beveled blue squares with labels on the page. These are push buttons.
The text field labeled Full URL is the URL for the server and must point to the location BcTestSrvr is listening at. If you are following this with no changes, it will be http://hostname:80/EvwTest/BcTest, and the server will be listening at that location.
The buttons and fields above the Full URL field are provided as a convenience for editing it. Do this if you have changed the port or path the server is listening at.
Directly below the Full URL field are buttons for connecting and disconnecting from the server.
A wide blue line separates the connection area from the testing area.

The testing area has fields for displaying:
    the connection status,
    the last timestamp received from the server,
    a test count field,
    the last test message received from the server,
    and a field for status messages.
Below that are the test buttons.

Connect to the server

The status light will turn green, and the connection status will change from "Not connected" to "Connected to SimpleBcTestSrvc Instance x".
The SimpleBcTestSrvc used by BcTestSrvr doesn't implement the test counter, and just returns n/a for the test count. The test count field will fill in with n/a.

Again, the first time you do this, the process could be anything from instantaneous to a few seconds. The reasons are similar to those discussed above. If the connection is slow, you will get status messages. If it fails, (wrong port, server not running, etc.), the status light will turn red.

Run the tests

If the status light is green, you are ready to test the backchannel.

More Tests

This set of tests is not very exciting, but it demonstrates EventWeb's asynchronous, bi-directional communication, and use of the result to update the HTML on a web page. This ability is the foundation of the EventWeb architecture.

04/10/17  swt