Continuous Model-Driven Engineering

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone

Continuous Delivery (CD) is becoming the most popular agile practice. From the Agile ManifestoOur highest priority is to satisfy the customer through early and continuous delivery of valuable software.

Continuous delivery encourages a more frequent software integration and testing process; and claims many advantages (shorter release cycles, faster feedback, visibility of the process, automatization, quality, etc…). Continuous development relies on the related concepts of continuous integration and continuous deployment.  For a discussion on the (somehow overlapping) relationship between these terms read this.

Given the important role model-driven engineering (in any of its versions) plays nowadays in software development, the natural question is: how can we combine modeling and continuous delivery? And how can this combination benefit both paradigms?

We can call this combination continuous model-driven engineering. We believe this integration can be done at two different levels: 1 – using modeling artifacts in a “normal” continuous delivery process and 2 – Using continuous delivery to develop the modeling artifacts themselves. Let’s explore a little bit more both scenarios.

Modeling artifacts in a Continuous delivery process

Most software development processes involve some kind of modeling artifact (even if for documentation). This forces any continuous delivery strategy to take into account those artifacts in the integration and deployment pipelines for the software (e.g. every change in an input model may need to trigger a new code generation process or the release of a new version may require updating the documentation automatically derived from it).

I’m afraid this is not really the case and typically models are left out of the process. But the question is whether there are technical reasons for this or it is more of a culture problem. Is it actually possible to chain MDE tools in a continuous delivery process?

The answer is a rotund yes. For each major MDE activity (model-to-model transformation, model-to-text transformation, model comparison,…) we can find a tool that can be executed standalone in batch mode by calling the tool with the right model/text parameters. This allows modeling tools to be integrated into continuous deployment servers, allowing the creation of pipelines (chained jobs) involving MDE tools.

The main limitation is that the integration server is not model-aware. This implies that all dependencies between jobs are manually added, coevolution is limited to alerting developers when an element needs to be manually reviewed and any new model version triggers all depending jobs.

Clearly, CD in MDE is possible but there is still work to be done. Model-aware CD processes would do a better job in interpreting when and how a model change affects the pipeline.

Continuous delivery in the development of modeling artifacts

Modeling artifacts evolve as often as any other software artifact. And not only the models evolve, but also the metamodels / languages, the transformations,… . This poses a real challenge when building a MDE infrastructure for a given domain or project. This modeling ecosystem needs to be evolved and maintained in a coherent way. Then, the questions is: Can continuous development help to maintain faster and better an MDE infrastructure?.

Again, the answer is yes. Analogously to traditional CD, where the goal is to have the mainline always in a deployable state, the aim now would be to have the modeling infrastructure always ready to be used. Wouldn’t it be nice to have our domain models always conforming to their metamodels and the transformations always ready to be executed, e.g. to generate code?

While there are many proposals for the coevolution of modeling artifacts, they often involve manual activities and target only pairs of components (a metamodel and its models, a metamodel and its transformations,…).

We propose a more ambitious approach where the co-evolution is reactive, multidimensional, automatic and parallelizable. Co-evolution tasks would take advantage of CD practices and tools: change detection would benefit from push notifications of CD servers, impact analysis would benefit from testing automation, and adaptations would benefit from automatic triggering depending on the result of previous tasks.

As an example, the following picture illustrates a co-evolution pipeline, with the typical steps in a co-evolution scenario (change detection, impact analysis, co-evolution):

Example of a pipeline for the continuous development of a model-based project

Example of a pipeline for the continuous development of a model-based project

The above example is just a proof-of-concept that we manually implemented in Jenkins to test whether those ideas would be feasible. Still, it’s a first step towards this goal.

If we are able to start extending continuous integration servers to teach them how to calculate the dependencies and propagate changes among all combinations of modeling artifacts (leveraging many of the proposals in the research literature) we would achieve a significant next step towards the maturity of model-driven engineering practices.

As always, if you are already using MDE within CD or have any thoughts on this topic, we’ll be happy to hear them!

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone
  1. Tim Lethbridge
    • Jokin Garcia
  2. David Chassels


Your email address will not be published. Required fields are marked *