Dynamic Synthesis of Mediators: From Theory to Practice

During my PhD, I defined an approach for the automated synthesis and deployment of mediators in order to enable heterogeneous software components, with compatible functionalities, to interoperate. The synthesised mediators reconcile the differences between the interfaces of the components and coordinate their behaviours from the application down to the middleware layers. I validated the approach through the development of a tool, MICS, and its experimentation with a number of case studies ranging from heterogeneous chat applications to emergency management in systems of systems. These case studies serve demonstrating the viability and efficiency of the automated synthesis of mediators to enable software components to interoperate in extremely dynamic and heterogeneous contexts such as ubiquitous environments or systems of systems.

Motivation

Interoperability is a complex challenge that can only be solved by appropriately combining different techniques and perspectives. These techniques include formal approaches for the synthesis of mediators with the support of ontology-based reasoning so as to automate the synthesis, together with middleware solutions to realise and execute these mediators.

Contribution

In the thesis, I define a multifaceted approach to interoperability, which brings together and enhances the solutions that tackle interoperability from different perspectives, as depicted in Figure 1.3. The mediators we synthesise act as (i) translators by ensuring the meaningful exchange of information between components, (ii) controllers by coordinating the behaviours of the components to ensure the absence of errors in their interaction, and (iii) middleware by enabling the interaction of components across the network so that each component receives the data it expects at the right moment and in the right format.

More specifically, the contribution of this thesis are as follows:

  • Generating interface matchings automatically. A significant role of the media- tor is to translate information available on one side and make it suitable and relevant to the other. This translation can only be carried out if there exists a semantic correspondence between the actions required by one component and those provided by the other component, that is, interface matching. The main idea is to use the domain-specific information embodied in the domain ontology in order to select from sequences of actions of the components’ interfaces only those which retain the meaning of the information exchanged and for which translations can automatically be computed. The generated interface match- ings not only specify one-to-one correspondences between the actions of compo- nents but also many-to-many correspondences, which makes their computation very complex. By using constraint programming, which we leverage to support ontology reasoning, we are able to calculate interface matchings efficiently.
  • Synthesising correct-by-construction mediators. We explore the behaviours of the functionally-compatible components in order to generate the mediator that composes the computed interface matchings to guarantee the correct interaction between the components. The algorithm deals with the potential ambiguity of interface matching, i.e., when the same sequence of actions of one component matches with different sequences of actions from the other component. The me- diator, if it exists, guarantees that the two components progress synchronously and reach their final states.
  • From abstract to concrete mediators. Ensuring interoperability from applica- tion down to middleware often requires dealing with many concerns, some of which are specific to the application at hand while the others relate to the distribution and coordination of the components. We perform the automated synthesis of mediators at the ontological and behavioural levels where reasoning and inference can be realised. Then, we refine the mediators by considering the interaction patterns of the middleware involved. Finally, we use middleware libraries to create concrete network messages based on these middleware primi- tives. Only when the mediator includes all the details about the communication of components, can interoperability be achieved.
  • Experimenting with real-world cases. We demonstrate the validity of our ap- proach through the development of the MICS (Mediator Synthesis to Connect Components) tool and illustrate its large applicability using real-world scenar- ios involving heterogeneous existing systems. We show that our approach is able to automatically generate the appropriate mediators automatically. The mediator enables the components to interoperate while introducing only a small overhead.