Cougaar "Mesh" Demos

NOTE: This file and all referenced files are included in the demo-mesh.zip of the latest Cougaar release.


This module contains the Cougaar "mesh" demos, which are designed for scalability and performance testing.

The mesh benchmark is similar to a distributed clock. At startup every peer sends a relay with a "1" counter to all its peers. When a peer has received all the "1"s from its peers, that peer sends out a "2". All peers run asynchronously but are effectively throttled by the slowest peer. No peer can get far ahead of any other peer; they are limited by the "distance" between one another. Note that, although the slowest peer is random, the aggregate throughput will be correct.

In a fully connected mesh, every peer lists all the peers in its "targets" parameter. This will create an "N^2" connection topology. Other topologies (rings, trees, etc) are supported, as illustrated in the configs directory.

A peer will log a warning if it receives a duplicate counter, or if it has waited more than 30 seconds for an input counter. The plugins also support several other benchmark-friendly options:

For a complete list of supported options, please see the Javadoc.

For additional information, please see the Cougaar Overview Slides:
  http://cougaar.org/docman/view.php/17/196/CougaarOverview.ppt.

Index:


Contents:

  1. configs/*.xml:
    The society files.
  2. run/*.xml:
    The runtime files.
  3. run/logging.props:
    The Log4j logging configuration file.
  4. src/org/cougaar/demo/mesh/*.java:
    The Java source code consists of:

Installation:

Please follow the same installation steps as in the "Hello World" example, substituting "mesh" for "hello".

The "Hello World" README is available online at:
  
http://cougaar.org/cgi-bin/viewcvs.cgi/*checkout*/hello/doc/README.html?rev=1.1.1.1&cvsroot=tutorials#installation
and in the "demo-hello.zip" produced by the nightly build:
   http://build.cougaar.org/auto/HEAD/latest_success/

Usage:

There are FIXME demos:
  1. A basic 3-agent "mesh" test:
    1. Run:
        cd $COUGAAR_RUNTIME_PATH
        cougaar
      $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BasicRuntime.xml
      This should print:
        [MeshPlugin] - A: Parsed 2 targets: [B, C]
        [MeshPlugin] - A: Sending counter 1 to 2 targets
        [MeshPlugin] - B: Parsed 2 targets: [A, C]
        [MeshPlugin] - B: Sending counter 1 to 2 targets
        [MeshPlugin] - C: Parsed 2 targets: [A, B]
        [MeshPlugin] - C: Sending counter 1 to 2 targets
        [DOTS] - ++-+-+-+--+-
        [MeshPlugin] - B: Received 1 from C
        [MeshPlugin] - A: Received 1 from C
        [MeshPlugin] - A: Received 1 from B
        [MeshPlugin] - A: Will send counter 1 in 5 seconds
        [MeshPlugin] - C: Received 1 from A
        [MeshPlugin] - C: Received 1 from B
        [MeshPlugin] - C: Will send counter 1 in 5 seconds
        [MeshPlugin] - B: Received 1 from A
        [MeshPlugin] - B: Will send counter 1 in 5 seconds
        [DOTS] - .
        [MeshPlugin] - C: Sending counter 2 to 2 targets
        [DOTS] - +-+-
        [MeshPlugin] - B: Sending counter 2 to 2 targets
        [DOTS] - +-+-
        [MeshPlugin] - A: Sending counter 2 to 2 targets
        [MeshPlugin] - A: Received 2 from C
        [MeshPlugin] - A: Received 2 from B
        [MeshPlugin] - A: Will send counter 2 in 5 seconds
        [DOTS] - +-+-
        [MeshPlugin] - B: Received 2 from C
        [MeshPlugin] - B: Received 2 from A
        [MeshPlugin] - B: Will send counter 2 in 5 seconds
        [MeshPlugin] - C: Received 2 from B
        [MeshPlugin] - C: Received 2 from A
        [MeshPlugin] - C: Will send counter 2 in 5 seconds
        [DOTS] - .
        ...
    2. Optionally view the servlet at
        http://localhost:8800/$A/mesh
    3. Press CTRL-C to stop the run.
  2. A benchmark 3-agent "mesh" test:
    1. Run:
        cd $COUGAAR_RUNTIME_PATH
        cougaar $COUGAAR_SOCIETY_PATH/configs/BasicSociety.xml BenchmarkRuntime.xml
      Note that the above runtime XML file has been modified to disable the logging output.
    2. Optionally view the servlet at
        http://localhost:8800/$A/mesh
      Note the high "relays-per-second" throughput, due to the "delayMillis=0" setting in the society XML file.
    3. Press CTRL-C to stop the run.
  3. More topologies tests: The benchmark can be configured into other topologies, such as rings, trees, etc. See configs/*.xml. The usage is similar to the above examples.

Support:

If you have any questions or comments, please:
  1. Subscribe to the cougaar-developers mailing list:
      
    http://cougaar.org/mailman/listinfo/cougaar-developers
  2. Then send email to:
      cougaar-developers@cougaar.org