In this example, we demonstrate how to set up client and server traffic generators with only one server and one client. (In the Scaled Server Case Study, we will show how the same procedure can be used for a significantly larger topology.)

We demonstrate three aspects of MAGI: specifying multiple event streams, synchronizing with triggers, and a special target called exit to unload agents.

This example has three events streams; the server stream, the client stream, and the cleanup stream.

The coordination between the events can be illustrated as follows:

Event streams can be synchronized using event-based triggers (such as after the server has started) or time-based triggers (such as wait for 30 seconds). The triggers are indicated as wait states (in gray). Forming the groups and loading the agents, which are also automated by the orchestrator tool, are not illustrated above.

The exit state unloads and tears down all the communication mechanisms between the agents. The exit state is entered by the key target and is used to transfer control to a reserved state internal to the Orchestrator.

It causes the Orchestrator to send agent unload and disband group messages to all of the experiment nodes and then it exits the Orchestrator.

Once run, you will see the orchestrator step through the events in the AAL file. The example output below uses the project montage with experiment caseClientServer. The output will be as follows:

The Orchestrator runs an internally defined stream called initilization that is responsible for establishing the server_group and the client_group and loading the agents. Once the agents are loaded, as indicated by the received trigger AgentLoadDone, the initialization stream is complete.

Now the serverstream, clientstream and the cleanup stream start concurrently. The serverstream sends the startServer event to the server_group. All members of the server_group start the server and fire a trigger serverStarted.

The clientstream then sends the startClient event to the client_group. One minute later, the clientstream sends the event stopClient to the client_group and terminates the clientstream. All members of the client_group terminate the client_agent and generate a clientStopped trigger which is sent back to the Orchestrator.

Once the serverstream receives the clientStopped trigger from the client_group, it sends out the stopServer event on the server_group. Once all the servers are stopped, the members of the server_group respond with a serverStopped trigger, which is forwarded to the cleanupstream.

Upon receiving the serverStopped trigger, the cleanupstream enacts an internally define stream called exit that is responsible for unloading agents and tearing down the groups.

The experiment artifacts, the procedure and topology file that were used for the case study are attached below.

In order to visualize the traffic on the network, modify the above-mentioned procedure to add another stream called monitorstream. This stream deploys a packet sensor agent on the server node to measure the traffic on the link in the experiment. The packet sensor agent records the traffic data using MAGI’s data management layer.