Author:Rob Bartholet
Date: 14-DEC-1998
Version: 3.0

Dependency Emulation Monitor
User's Manual

Table of Contents


System Overview


Server


Demon


Client



System Overview

The Dependency Emulation Monitor (DEMon) is a distributed system that allows software developers to model the effects of changes during software development. The model simulates how a change in one part of the system propagates to force changes in other parts of the same system. A simulation run allows the user to see how long it takes the system to stabilize when changes are made to some of the design parameters or functional requirements.

The DEMon uses a data structure called a Map. The Map holds information about the software system that is being modeled, to include modules, design parameters within modules, and dependencies between design parameters. A module represents a piece of software assigned to one developer. Design parameters represent design decisions that are implemented within a module. The dependencies show which design parameters are affected by a change in any one design parameter. Each dependency between two design parameters has a bound probability that represents the likelihood that a change in the design parameter will affect the dependent design parameter. Additionally, each design parameter has a bound recovery probability that gives the likelihood the parameter, once unstable, will become stable in any given cycle.

One of the modules can be chosen by the user to model the functional requirements of the system being modeled. In this case, the nodes within this module would represent the functional requirements themselves. Since the system distinguishes between modules and functional requirements in name only, dependencies can be from functional requirements to a design parameter, and vice versa.

The following outline shows a very simplified high-level look at a typical event loop of the simulation:
1) start Server and choose a Map
2) DEMon (super-user) and Clients are started
3) DEMon chooses automatic mode or manual mode
4) If manual mode, Clients destabilize design parameters and submit them
5) DEMon chooses cycle delay and propagation mechanism, and submits them to begin the simulation
6) Server sends out updated Maps to the DEMon and each connected Client until all design parameters are stable
7) Go back to 3 until DEMon chooses to quit the simulation.

Server

The Server is a stand-alone Java application. It is run on a known machine and binds to a known port. This allows the Client users to find the Server when they are started. The Server contains the logic to control the event flow of the simulation, as well as calculate and propagate the effects of changes in design parameters.

Before you run a simulation, you must have a file that contains the software development structure you are going to model. To do this, you can run the following command to build a random structure: Java Builder {num_Nodes} > {outfile.name}. You can also build this text file manually by adhering to the following regular expression. In this regular expression, do not use the "<" and ">" symbols, as these were used to delineate those parts of the expression where the user substitutes values.

Regular Expression for Valid Map:

<module count>(^<module name>|<number of nodes>(|<node name> <current stability> <probability of spontaneous recovery> <probability of spontaneous destabilization>)+)+^<number of dependencies>(^<source module ID> <source node ID> <destination module ID> <destination node ID> <probability of propagation>)*^<final state boolean>^<editable state boolean>

Here are a few notes on this regular expression. It is important to note that adhering to this regular expression does not guarantee that the user has build a valid Map. The system does internal checks on the Map to ensure it is consistent. For instance, if you state that the Map has 4 modules, then you must define those four modules according to the rules laid out in the regular expression, or the map is inconsistent and the simulation will not run. So you must maintain consistency by ensuring that you define the map according to the number of modules, number of nodes in each module, and number of dependencies that you specify.

To begin the Server, type "java Server <map filename> <port number>" on the command line. If you do not enter the optional filename and port, the port defaults to port 1202, and you are prompted for a filename. If you get the screen message "RMI: Binding done", the Server has initialized correctly, and you can start up the DEMon and Clients in any order. At this point, there is no more user interaction with the Server. It continues to run as long as the DEMon decides to continue with the simulation. It will occasionally output a message, for instance it tells the user whenever a user has connected or disconnected.

DEMon

The DEMon is the interface for the super-user. The person sitting at the DEMon terminal can see the system state and has the ability to start and stop the simulation at any time. The DEMon also determines some of the external parameters like simulation mode (automatic or manual), propagation mechanism, and propagation cycle delay.

To start the DEMon, type "appletviewer DemonTest.html" at the command line. This html file must contain the address to the machine where the Server is running, and the correct port where the Server is bound. An appletviewer will appear as the DEMon attempts to connect to the Server. The appletviewer will contain a blank statistics box, blank message box, the connection status for each Client, and several buttons, some of which will be inactive.

Display of DEMon User Interface

DEMon Graphical User Interface

The connection status box shows a colored circle for each module identified in the Map chosen by the Server. If the circle is gray, the Client has not yet connected with the Server. If the circle is yellow, the Client has connected with the Server, but still has not input any changes to the state of its module (see manual mode below). If the circle is blue, the Client is connected and has input the state of its module to make the next run. Note that this system is designed for dynamic connection and reconnection. At any time during the simulation, a Client can disconnect or reconnect, without affecting the state of the simulation. Dynamic reconnection also allows a Client to pick up in the middle of a simulation, without affecting the current state of the simulation into which it connected.

When the DEMon is started, and after each run of the simulation is complete, the DEMon user must input whether the next run will be in automatic or manual mode. Automatic mode allows the Server to choose which design parameters from each module will be unstable to begin the simulation run. In other words, the DEMon can begin the simulation without input from the Clients. The Server determines these destabilizations from the map, because each design parameter is defined with a probability that it will go unstable at the beginning of a simulation in automatic mode. If automatic mode is chosen, then the user can also specify the number of runs before the DEMon is again allowed to choose the mode. This gives you the ability to do a "Monte Carlo" simulation to see how the system behaves over many runs. Manual mode allows the DEMon to wait for each Client user to submit unstable design parameters before the simulation run. To choose the mode, click on the Automatic or Manual button, type in the number of runs (if automatic mode), and click on submit. If manual mode is chosen, this prompts the Server to send out an editable copy of the map to each Client so they can destabilize nodes and submit them.

Once the mode is submitted, the DEMon user is allowed to choose the propagation mechanism, propagation cycle delay, and submit them. To do this the user clicks on the appropriate buttons, and then clicks on Submit. The submission of these two external parameters actually begins the simulation, regardless of the connection status of the Clients. So the DEMon user must watch the Client connection status and submit at the appropriate time. Note that this allows the DEMon user to begin the simulation without waiting for a slow or unconnected Client, and also to wait for each Client to submit destabilizations if it is important to do so. The key is that the DEMon user has the flexibility to begin the simulation when he wants. If the simulation is begun with an unconnected Client, or before a connected Client has submitted instabilities, the Server assumes that all design parameters from those Clients are stable to begin the simulation.

The DEMon user has three choices of propagation mechanism: Any, All, or Sum. Any means that a design parameter goes unstable if any design parameter on which it is dependent goes unstable in the previous cycle. All means that a design parameter goes unstable if all design parameters on which it is dependent go unstable in the previous cycle. Sum means that a design parameter has a probability that it will go unstable, based on the sum of the probability of all its dependencies. The sum is calculated as the inverse of the product of the inverses. For example, the sum of p1, p2, and p3 is: 1-[(1-p1)(1-p2)(1-p3)].

The propagation cycle delay is input in milliseconds. This denotes the amount of time the Server waits before sending out the results of the current cycle of instabilities. If 0 is chosen, the simulation runs as quickly as it can, which is still usually slow enough for each user to assimilate the properties of the model. Note that <Return> must be typed for the entered delay to take affect.

The DEMon user is given a matrix view of the system, that shows each design parameter down the side and across the top of the matrix, as shown here.

Matrix View of Simulation

Matrix View of Simulation

A circle in a matrix element denotes a dependency going from the design parameter denoted by the row, to the design parameter denoted by the column. If the dependency is red, then the design parameter denoted by the row is unstable, and some function will be used to see if the design parameter denoted by the column is forced to go unstable. If the dependency is green, the design parameter denoted by the row is stable, and will not influence the design parameter denoted by the column to go from unstable to stable. Additionally, the design parameters listed on the left of the matrix are given a green or red circle, to denote whether the design parameter is stable or unstable at the moment. Looking at this matrix gives the super-user a picture of the system state at all times.

The statistics box shown in this figure gives the DEMon user some pertinent statistics for the simulation. The statistics are updated by the Server between each cycle of each run. Shown are the number of design parameters that recovered from unstable to stable, the number of design parameters that went from stable to unstable, and the number of design parameters that are currently unstable. Two numbers are given for each of these statistics, one for the current cycle, and an accumulation from the beginning of the simulation run. The DEMon user can scroll through the statistics box to playback the simulation.

Additionally, the DEMon user has a message box that displays pertinent system messages and prompts. The novice user will want to pay attention to this box as it will prompt the user for what is going on and what needs to happen next.

The last two buttons to discuss for the DEMon user are the Quit and Abort buttons. The Abort button ends the current simulation, puts the Map back into a stable state, and allows the DEMon user and Clients to begin a new simulation. This is handy when a Map state is such that the likelihood of ever reaching a stable Map is very low. The Quit button freezes the Clients and the DEMon, and shuts down the Server. The DEMon user and Clients are forced to close their applets at this point, and there is no recovery once this button is pushed. The Quit and Abort buttons begin immediate actions and do not require the Submit button to activate their actions.

Client

The Client is the interface for a user to control a module. Although a Client has limited control over only his own module, there are ways for him to get a system view of the entire model. While the Server is awaiting input from the DEMon and Clients, the Client user can get see the system state using a module view or internal view. While the Server is propagating cycles through a simulation run, the Client user can view the system state in a module view or matrix view. The Client user also has visibility on statistics, for its own module and for the system as a whole. There is also a detailed information box that shows the internal information for the currently selected object. Lastly there is a status box that shows messages and prompts for the user.

Display of Client User Interface

Client Graphical User Interface

To start a Client, type "appletviewer Client.html" at the command line. The html file must contain the address where the Server is running, and the port where the Server is bound. The Client will then be started in appletviewer, and will display a module-level view of the simulation Map. At this point, the Client user left-clicks on a module to choose that module as his own. The Server accepts this module selection if the Client is the first to choose this module. If the module selection is not accepted, then the Client is allowed to choose again.

If the DEMon user chooses manual mode, then the Client user will receive a map and instructions to destabilize some of his nodes and submit. To destabilize a design parameter, click on it with the left mouse button. Unstable nodes appear in a shade of red, and stable nodes appear in a shade of green. If automatic mode is selected, then the Client will never go through this phase, because the Server will choose all the nodes that are to become unstable for every Client user, based on the destabilization probability defined in the map. Once the simulation begins, the view will change to module view (see below), and a new map will be displayed for each cycle of the simulation.

The Client user has several ways to view system information. Whenever the user clicks on a node or module, the detailed info box will show all relevant data, to include dependencies, recovery probabilities, design parameters (for modules), etc.. Left clicking on any module will bring that module into focus so the user can see the internal design parameters of the module, as shown in this figure.

Module Focus View

Focusing In On A Particular Module

Right clicking on a module or design parameter will highlight the outgoing and incoming dependencies relating to that object, as shown here.
Right Clicking on a Node

Focusing In On A Node With a Right Mouse Click

A dependency arrow points from the dependee to the dependent entity. Left clicking within the center of the display (but not on any design parameter) toggles the display between module view and internal view. Module view shows only modules and the dependencies between modules, without showing any design parameters, as shown here.
Module View

Module View

Internal view shows the internal design parameters of the currently selected module, as shown here. Once the simulation begins cycling through instabilities, the user can click on a button in the bottom right hand corner to toggle between matrix view and module view. Matrix view shows the same matrix that the DEMon user sees. Module view shows the modules with dependencies between modules, along with a small circle showing the current stability state of each design parameter within each module.

The statistics box shown here displays the same three statistics that are displayed for the DEMon user. But in addition to showing these stats for the entire system, it shows the stats for the Client's module also.

The status box on the bottom left hand corner of the display shows the prompts and status messages. The novice user should pay close attention to this box to guide him through the simulation until he becomes familiar with the event loop.


Revision history:

Version 3.0 - 14-DEC-1998 rgb
Initial creation