6.1.1 Module System

The module system extends the requirements introduced with the component execution framework (Section 5). Aside from imposing a unified interface upon the individual modules to enable exchangeability and expandability, each module is required to provide its own specific GUI. This ability is vital as simulation tools offer different parameters, hence requiring specific GUI-elements. The challenge is to extend the module interface - used to hold the module implementations - to further support module-specific GUIs.

Coupling a GUI with intensive computations by sharing a thread freezes the GUI, which is typically the case with numerical simulations. The thread is utilized for the computation, for instance, to solve a linear equation system, and is by itself1 not able to process GUI-related events. This behavior must be avoided to allow interaction with the GUI during the computation. For instance, whilst a simulation tool performs the computations, the rendering facility should still allow interactions such as zooming or panning. The challenge is thus to implement a non-intrusive mechanism, allowing for GUI interactions during heavy computations, by, for instance, outsourcing the computation to a worker thread (Figure 6.3). In this context, non-intrusive refers to the fact that no changes in the wrapped simulation code are required.


pict


Figure 6.3: The concept of outsourcing computationally intensive implementations to a separate thread is shown. Left: GUI tasks are delayed by the computation, if the GUI thread is used for the computation. Right: GUI tasks can be processed during the computation, if the computation is outsourced to its own worker thread.