Reconfiguration Engine

ReCooPLa is translated into a subset of Java, and recognised and executed by an engine.
This engine, named Reconfiguration Engine, is a plug-in to execute reconfigurations specified in ReCooPLa over coordination patterns specified in CooPLa.


  • Reconfiguration specification
  • Applying reconfigurations
  • New patterns visualisation
  • Exportating CooPLa patterns

Reconfiguration specification

ReCooPLa reconfigurations are specified in a dedicated editor view.
It provides syntax highlighting and error reporting features.
Importing external files (CooPLa specifications or other ReCooPLa scripts) is made relatively to the working directoty.

Applying reconfigurations

A dedicated menu for ReCooPLa is added to the Ecipse's menu, from where the reconfiguration engine is called.

Before applying reconfigurations, it is ensured that the specifications are syntactic and semantic valid.
Then, Java files are automatically generated from the main reconfiugration in the ReCooPLa script.
These are compiled into a Java program. Only after this process, the reconfigurations are applied, generating new coordination patterns.

New patterns visualisation

The generated coordination patterns are displayed in an agreeable visualisation way.
The user may move the nodes in order to obtain better representations.
The generated coordination patterns carry not only structural information, but also stochastic information (if applied).

Exportating CooPLa patterns

The reconfigured patterns may be exported as CooPLa patterns into .cpla files.

A Practical Example

Consider a company that delivers a tourism guide sysservicetem over the internet. Among many other features, it assembles information about cities around the world. This information ranges from historical or demographical data, to images and promotional videos.
In particular for this activity, the system resorts to two external services. One of such services provides the textual information about the cities; the other completes it with representative touristic imagery.
The company's architect designed this activity using a sequential coordination pattern. However, when utilisation reaches peaks, the system becomes slow. In this scenario, the sequential call to the external services may, for instance, become parallelized.

In the following images we show the workflow within the CooPLa editor, using the Reconfiguration engine, to specify the required change in the coordination layer.

First, the original coordination pattern is specified in CooPLa.
In the image below, follows an example of such pattern. Code, outline and visualisation are prestend in order to deliver a more comprehensive perspective of the pattern.

Then, the reconfiguration is created.
One is the removeP reconfiguration (that removes a set of channels from the coordination patter to which it is applied);
The other is the implodeP reconfiguration (that collapses a structure of the pattern to which it is applied).
Finally, the main reconfiguration is specified. In this case, the sequencer pattern is imported into the reconfiguration and it is applied the implodeP reconfiguration with suitable arguments;

At this moment, we can apply the reconfiguration. Doing so, we obtain the Parallel coordination pattern as shown in the image below.
This pattern can be saved into a .coopla file, so that a new coordination pattern may be used latter on for analysis or other reconfigurations.

In the image below, is shown the saved generated coordination pattern (the Parallel pattern) aready loaded into the CooPLa editor.
Notice that when saving the reconfigured pattern, all the necessary channels are added to the same script.