Table of Contents
Fetching ...

Automatic Design-Time Detection of Anomalies in Migrating Monolithic Applications to Microservices

Valentim Romão, Rafael Soares, Luís Rodrigues, Vasco Manquinho

TL;DR

MAD is introduced, the first framework for automatically detecting anomalies that are introduced by a given decomposition of a monolith into microservices, and can identify precisely the causes of potential anomalous behavior for different decompositions.

Abstract

The advent of microservices has led multiple companies to migrate their monolithic systems to this new architecture. When decomposing a monolith, a functionality previously implemented as a transaction may need to be implemented as a set of independent sub-transactions, possibly executed by multiple microservices. The concurrent execution of decomposed functionalities may interleave in ways that were impossible in the monolith, paving the way for anomalies to emerge. The anomalies that may occur critically depend on how the monolith is decomposed. The ability to assess, at design time, the anomalies that different decompositions may generate is key to guide the programmers in finding the most appropriate decomposition that matches their goals. This paper introduces MAD, the first framework for automatically detecting anomalies that are introduced by a given decomposition of a monolith into microservices. MAD operates by encoding non-serializable executions of the original functionalities as an SMT formula and then using a solver to find satisfiable assignments that capture the anomalous interleavings made possible by that specific decomposition. We have applied MAD to different benchmarks and show that it can identify precisely the causes of potential anomalous behavior for different decompositions.

Automatic Design-Time Detection of Anomalies in Migrating Monolithic Applications to Microservices

TL;DR

MAD is introduced, the first framework for automatically detecting anomalies that are introduced by a given decomposition of a monolith into microservices, and can identify precisely the causes of potential anomalous behavior for different decompositions.

Abstract

The advent of microservices has led multiple companies to migrate their monolithic systems to this new architecture. When decomposing a monolith, a functionality previously implemented as a transaction may need to be implemented as a set of independent sub-transactions, possibly executed by multiple microservices. The concurrent execution of decomposed functionalities may interleave in ways that were impossible in the monolith, paving the way for anomalies to emerge. The anomalies that may occur critically depend on how the monolith is decomposed. The ability to assess, at design time, the anomalies that different decompositions may generate is key to guide the programmers in finding the most appropriate decomposition that matches their goals. This paper introduces MAD, the first framework for automatically detecting anomalies that are introduced by a given decomposition of a monolith into microservices. MAD operates by encoding non-serializable executions of the original functionalities as an SMT formula and then using a solver to find satisfiable assignments that capture the anomalous interleavings made possible by that specific decomposition. We have applied MAD to different benchmarks and show that it can identify precisely the causes of potential anomalous behavior for different decompositions.

Paper Structure

This paper contains 24 sections, 4 equations, 5 figures, 7 tables.

Figures (5)

  • Figure 1: Example of how two functionalities can be divided when migrating from monolith to microservices and of an interleaving that leads to an anomaly.
  • Figure 2: MAD's pipeline.
  • Figure 3: Monolith AR structure.
  • Figure 4: MAD's models constraints
  • Figure 5: MAD's cyclic graph for the example anomaly.