Search code examples
javagraphfilterpipeexecution

Executable pipe and filter graph in Java


I am currenty writing my master's thesis about monitoring of distributed systems. For this purpose I have designed a framework that can record monitoring data and analyze this data in a series of filters (pipes and filter style). It is based on the Kieker monitoring framework.

You can connect the different filters to each other by subscribing to an output port, like so:

DurationFilter durationFilter = new DurationFilter();
Timeline timeline = new Timeline(...);
durationFilter.getOutputPort().subscribe(timeline);

This mechanism is provided by the Kieker framework which I am using.

To run an analysis the user currently has to connect the filters manually by writing out the code. What I want to do now is write a tool with a GUI that makes it easier to create a configuration (set of filters, input files and the connections). Ideally the user could do it like in a UML editor, creating boxes (filters) and connecting them with lines (connections) and set the parameters for input (input files) etc.

These configurations then need to be executed, meaning I need a mapping from the graph to the code to the java code. That was my idea so far. First off: do you think this approach is the right one for this task?

In my research I found the framework JHotDraw which has a lot of the features I just mentioned. With JHotDraw I can create the visual elements (Figures) on a drawing area (DrawingEditor) including a set of tools to create, edit and connect the elements. This I have done and it's pretty straightforward. A bonus is the undo/redo functionality of JHotDraw.

Now my problem: I am not sure how I am supposed to get from the graphical representation in the editor to the java code. What I have is the V-part of the MVC pattern which the framework supposedly uses. The Figures are the view. But where does the model go and how does it integrate into the framework? I am thinking that for every element that is displayed in the DrawingEditor I will have to have a corresponding model that stores the data for the element. A FilterModel would have attributes like input data types (which data can it process), output ports and their data types (what kind of data does it create) and the type of the filter (corresponds to the Java class). Those are necessary to check if one filter can connect to another and to execute the whole thing in the end.

Not sure if I am making myself clear. If anything is unclear please ask.


Solution

  • we are currently working on a web-based UI for Kieker. This will allows users to define and execute Kieker pipe-and-filter graphs. If you are still interested in this, feel free to contact us. You'll find our contact information at kieker.sf.net/support/. Also, I'd be interested in what you're doing in your thesis ;-).

    Regards, André