Table of Contents
Fetching ...

Domain-Driven Design Representation of Monolith Candidate Decompositions Based on Entity Accesses

Miguel Levezinho, Stefan Kapferer, Olaf Zimmermann, António Rito Silva

TL;DR

The paper tackles the gap between Domain-Driven Design (DDD) and monolith-to-microservice migrations by extending the Mono2Micro pipeline with Context Mapper (CML) to produce DDD-based representations of candidate decompositions. It introduces a Structure Collector and a CML Translator that map Mono2Micro's entities, clusters, and functionalities into DDD concepts such as Entities, Bounded Contexts, Aggregates, and Coordinations (Sagas). The approach is validated on a real-world QT monolith (46 entities, 107 functionalities) showing how complexity can be reduced through functionality refactoring and how DDD-based modeling enables architects to refine decompositions within Context Mapper. The solution demonstrates modularity, practical relevance for industry adoption, and opens pathways for broader integration with DDD tooling and further refinements.

Abstract

Microservice architectures have gained popularity as one of the preferred architectural approaches to develop large-scale systems, replacing the monolith architecture approach. Similarly, strategic Domain-Driven Design (DDD) gained traction as the preferred architectural design approach for the development of microservices. However, DDD and its strategic patterns are open-ended by design, leading to a gap between the concepts of DDD and the design of microservices. This gap is especially evident in migration tools that identify microservices from monoliths, where candidate decompositions into microservices provide little in terms of DDD refactoring and visualization. This paper proposes a solution to this problem by extending the operational pipeline of a multi-strategy microservice identification tool, called Mono2Micro, with a DDD modeling tool that provides a language, called Context Mapper DSL (CML), for formalizing the most relevant DDD concepts. The extension maps the content of the candidate decompositions, which include clusters, entities, and functionalities, to CML constructs that represent DDD concepts such as Bounded Context, Aggregate, Entity, and Service, among others. The results are validated with a case study by comparing the candidate decompositions resulting from a real-world monolith application with and without CML translation.

Domain-Driven Design Representation of Monolith Candidate Decompositions Based on Entity Accesses

TL;DR

The paper tackles the gap between Domain-Driven Design (DDD) and monolith-to-microservice migrations by extending the Mono2Micro pipeline with Context Mapper (CML) to produce DDD-based representations of candidate decompositions. It introduces a Structure Collector and a CML Translator that map Mono2Micro's entities, clusters, and functionalities into DDD concepts such as Entities, Bounded Contexts, Aggregates, and Coordinations (Sagas). The approach is validated on a real-world QT monolith (46 entities, 107 functionalities) showing how complexity can be reduced through functionality refactoring and how DDD-based modeling enables architects to refine decompositions within Context Mapper. The solution demonstrates modularity, practical relevance for industry adoption, and opens pathways for broader integration with DDD tooling and further refinements.

Abstract

Microservice architectures have gained popularity as one of the preferred architectural approaches to develop large-scale systems, replacing the monolith architecture approach. Similarly, strategic Domain-Driven Design (DDD) gained traction as the preferred architectural design approach for the development of microservices. However, DDD and its strategic patterns are open-ended by design, leading to a gap between the concepts of DDD and the design of microservices. This gap is especially evident in migration tools that identify microservices from monoliths, where candidate decompositions into microservices provide little in terms of DDD refactoring and visualization. This paper proposes a solution to this problem by extending the operational pipeline of a multi-strategy microservice identification tool, called Mono2Micro, with a DDD modeling tool that provides a language, called Context Mapper DSL (CML), for formalizing the most relevant DDD concepts. The extension maps the content of the candidate decompositions, which include clusters, entities, and functionalities, to CML constructs that represent DDD concepts such as Bounded Context, Aggregate, Entity, and Service, among others. The results are validated with a case study by comparing the candidate decompositions resulting from a real-world monolith application with and without CML translation.
Paper Structure (19 sections, 11 figures, 4 tables)

This paper contains 19 sections, 11 figures, 4 tables.

Figures (11)

  • Figure 1: The five stages of the Mono2Micro operational pipeline Lopes23. Each stage can use the output of former stages as input.
  • Figure 2: Example syntax of CML, containing the syntax for defining a Context Map (1-6); Bounded Contexts (8-29, 31-32); Aggregates (9-21); Entities (10-15,17-20); and Services (24-27).
  • Figure 3: Mono2Micro pipeline extension to support CML representation of candidate decompositions. In blue, the relevant pipeline steps (top) and modules. In orange, the extension to the pipeline, composed of the addition of new modules.
  • Figure 4: Generated Context Map diagram of the integration between Mono2Micro and Context Mapper. PL stands for Published Language, ACL stands for Anti-Corruption Layer, and CF stands for the Conformist pattern.
  • Figure 5: Mapping strategy of candidate decomposition concepts from Mono2Micro (M2M) to DDD and CML.
  • ...and 6 more figures