Architectural Refactoring to Microservices: A Quality-Driven Methodology for Modernizing Monolithic Applications Von der Fakultät für Informatik, Elektrotechnik und Informationstechnik der Universität Stuttgart zur Erlangung der Würde eines Doktors der Naturwissenschaften (Dr. rer. nat.) genehmigte Abhandlung Vorgelegt von Jonas Fritzsch geboren in Erlabrunn, Deutschland Hauptberichter: Prof. Dr. Stefan Wagner Mitberichter: Prof. Dr. Alfred Zimmermann Prof. Dr. Wilhelm Hasselbring Tag der mündlichen Prüfung: Dienstag, 24.09.2024 Institut für Software Engineering 2024 2 Zusammenfassung Kontext und Problemstellung: Der Microservices-Architekturstil als De- facto-Standard für Cloud-basierte Anwendungen hat die Art und Weise revolutioniert, in der moderne Softwaresysteme entwickelt und betrieben werden. Das Konzept kleiner, gekapselter und autonomer Services ermög- licht einen agilen Entwicklungsprozess, der durch einen hohen Automati- sierungsgrad und unabhängige Teams gekennzeichnet ist. Die gewonnene Flexibilität zeigt sich in kurzen Release-Zyklen und wird oftmals mit einer verbesserten Produktqualität assoziiert. Bestandssysteme sind jedoch oft als Monolithen konzipiert. Neben langen Release-Zyklen und problematischer Wartbarkeit ist der Architekturstil nicht geeignet, die Vorteile von Cloud- Umgebungen auszuschöpfen. Der Einsatz von Microservices erfordert jedoch ein Architektur-Refactoring, was mitunter die Neuentwicklung von Teilen oder sogar der gesamten Anwendung zur Folge hat. Microservices sind nicht von vornherein für jedes System geeignet. Der teils enorme Aufwand einer Modernisierung erfordert daher eine systematische Entscheidungsfindung, detaillierte Planung und bewährte Verfahren. Aus technischer Sicht erfordert die Architekturtransformation hin zu Microser- vices die Zerlegung des Systems in einzelne, in sich abgeschlossene Services. Eine zielgerichtete, qualitätsorientierte und teilautomatisierte Dekompo- sition ist jedoch oft problematisch und mit hohem Aufwand verbunden. 3 Architektinnen und Architekten von Anwendungssystemen suchen daher nach ressourceneffizienten Wegen, um Orientierung und prognostizierbare Ergebnisse in diesem höchst individuellen Prozess zu erlangen. Die akade- mische Forschung hat in letzten Jahren ein umfangreiches Wissen über die Erstellung performanter, zuverlässiger, wartbarer und sicherer Microservices- basierter Systeme hervorgebracht. Dieses Wissen wird durch zahlreiche Migrations- und Refactoring-Verfahren für bestehende Systeme ergänzt. Es zeigt sich jedoch, dass diese vielfältigen Ressourcen in der Praxis wenig genutzt werden oder teilweise unbekannt sind. Zielsetzung: Wir streben eine ganzheitliche Methodik zur systematischen und qualitätsgesteuerten Modernisierung bestehender Softwaresysteme hin zu Microservices an. Dabei suchen wir nach Lösungen für die gezielte und automatisierte Dekomposition in Services, eine besondere Herausforderung im Architektur-Refactoring. Um sicherzustellen, dass die resultierende Ar- chitektur vordefinierte Qualitätsziele erfüllt, soll deren qualitätsorientiertes Design durch etablierte Entwurfsmuster und bewährte Praktiken unterstützt werden. Darüber hinaus zielt unsere Arbeit darauf ab, Industrie-relevante Methoden bereitzustellen, um den Wissenstransfer zwischen Wissenschaft und Praxis zu fördern. Methoden: In einem übergreifenden Design-Science-Forschungsprozess entwickeln wir eine Migrationsmethodik, ergänzt durch eine Implementie- rung als webbasierte Anwendung. Für die Analyse und Evaluation setzen wir etablierte Methoden des empirischen Software Engineerings ein, wie z.B. Fallstudienforschung, Umfragen und Experteninterviews. Unsere Sekun- därforschung zur Zusammenfassung des aktuellen Stands der Wissenschaft stützt sich auf konsekutive Literaturrecherchen und Rapid Reviews – einer leichtgewichtigen Methode, die sich von systematischen Literaturrecherchen ableitet. Forschungsbeiträge: Auf Basis zweier Interview-Studien konnten wir Er- kenntnisse über die Intentionen, Strategien und Herausforderungen im Migrationsprozess gewinnen. In unserem ersten Beitrag sprachen wir mit 16 Software-Experten aus 10 deutschen Unternehmen über insgesamt 14 Migra- 4 tionsszenarien. Die anschließende Fallstudie im Bereich Cyber-Physical Sys- tems (CPS) erbrachte in Interviewsmit 9 Branchenexperten und -expertinnen zusätzliche Anforderungen hinsichtlich Tool-Unterstützung und Automatisie- rung. In vier Iterationen haben wir 110 wissenschaftliche Publikationen zum Architektur-Refactoring und Migrationen im Microservices-Kontext aufgear- beitet. Aus dem entwickelten Klassifizierungsschema wurde eine Taxonomie abgeleitet, die eine schnelle Einordnung neuer Lösungsansätze ermöglicht. Zur Anleitung und Unterstützung des Migrationsprozesses haben wir ein Framework mit dediziertem Qualitätsmodell konzipiert, das einen qualitäts- getriebenen Migrationsprozess abbildet. Auf der Basis aktueller Technologien und eines modernen Benutzeroberflächen-Designs wurde unser Konzept als webbasierte Anwendung in einem agilen Entwicklungsprozess realisiert. In einer mehrstufigen Evaluation haben wir untersucht, inwieweit unse- re Methodik Orientierung und Unterstützung für die Praxis bieten kann. Dazu führten wir drei Befragungsstudien und eine Interviewstudie mit ins- gesamt 26 Teilnehmern durch, ergänzt durch zwei Längsschnittstudien im industriellen Kontext. Fazit: Wir präsentieren eine ganzheitliche Methodik für die Modernisie- rung von monolithischen Systemen hin zu Microservices. Diese umfasst ein Framework mit dediziertem Qualitätsmodell und implementiert einen quali- tätsgetriebenen Migrationsprozess. Unsere Beiträge unterstützen zunächst die systematische Entscheidungsfindung bei der Einführung von Microser- vices. Im Anschluss führt unsere Methodik durch den Transformationsprozess mit Fokus auf das Architektur-Refactoring. Die durchgeführten Evaluatio- nen ergaben ein insgesamt positives Ergebnis in Bezug auf Wirksamkeit, Nützlichkeit und Benutzerfreundlichkeit, während beide Fallstudien eine erfolgreiche Anwendung im industriellen Umfeld zeigten. Indem wir wichti- ge Studienartefakte zur Verfügung stellen, unterstützen wir Forscherinnen und Forscher bei der Entwicklung ähnlicher Industrie-fokussierter Metho- den. Darüber hinaus betrachten wir unseren Design-Science-Ansatz zur Nutzung akademischer Forschung in der Praxis als übertragbar auf andere Wissenschaftsdisziplinen. 5 Abstract Context and Problem: The microservices architectural style has revolu- tionized the way modern software systems are developed and operated, and has become the de facto standard for cloud-based applications. The concept of small, encapsulated, and self-contained services allows for an agile de- velopment process with a high degree of automation, independent teams, and freedom of technological choice. Such systems offer high flexibility through reduced time-to-market and are often associated with better overall product quality. However, existing systems are often designed as monoliths, which are associated with inflexible processes, long release cycles, and an architecture incapable of leveraging the advantages of cloud environments. The adoption of microservices would require an architectural refactoring, entailing redevelopments of parts or even the entire application. Yet, mi- croservices are not inherently a good fit for every system, and the enormous effort involved requires systematic decision-making, detailed planning, and proven approaches to such a modernization. Technically, transforming the ar- chitecture of a monolithic system into microservices requires decomposing it into a set of self-contained services. Often associated with extensive manual effort, the targeted, quality-oriented, and semi-automated decomposition remains problematic. Software architects look for resource-efficient ways to provide predictable results and guidance in this highly individual process. 7 Academia has accumulated a significant body of knowledge on how to build high-performance, reliable, maintainable, and secure microservices-based systems, complemented by numerous migration and refactoring approaches to microservices. However, we found that practitioners hardly leverage this diverse spectrum of resources, or are even unaware of it. Objective: To systematically guide software architects and developers in modernizing their software systems, we seek to provide a holistic methodol- ogy for systematic and quality-driven migrations towards microservices. As part of it, we search solutions for the targeted and automated decomposition into services, a particular difficulty during an architectural refactoring. To ensure that the resulting architecture meets predefined quality goals, we seek for ways to support a quality-oriented design based on established patterns and best practices. Moreover, our work aims to provide industry-relevant methods that address the gap between academia and practice by facilitating the transfer of knowledge. Methods: In an overarching design science research process, we create a migration methodology that we implement as a web-based application. For analysis and evaluation, we apply established methods in empirical software engineering, such as case study research, surveys, and semi-structured in- terviews with experts. Our secondary research to summarize the current state of scientific advances relies on consecutive literature searches and rapid reviews, a lightweight method derived from systematic reviews. Contributions: Based on two primary empirical interview studies, we col- lected evidence on the intentions, strategies, and challenges of migrating monolithic applications to microservices. In our first analysis contribution, we interviewed 16 software professionals from 10 German-based compa- nies, and talked about 14 migration scenarios. The following mixed-method empirical study in the domain of cyber-physical systems yielded additional requirements for tool support and automation from interviews with 9 in- dustry experts. Over four iterations, we reviewed 110 scientific publications on approaches for architectural refactoring and migration to microservices. From the developed classification scheme, we derived a taxonomy that sup- 8 ports the swift classification of new solution proposals. To guide architects and developers in a migration process, we conceptualized a framework, along with a dedicated quality model that reflects a quality-driven migration process. Based on latest technologies and a modern user interface design, we realized our concept as a web-based application in an agile development process with early involvement of potential users. In a multi-faceted evalua- tion, we examined its ability to provide actionable guidance for practitioners. To this end, we conducted three surveys and one interview study with a total of 26 participants, complemented by two longitudinal case studies in an industrial context. Conclusion: We propose a holistic methodology for modernizing monolithic applications to microservices, that comprises a framework and dedicated quality model, thereby implementing a quality-driven migration process. Our contributions support architects in making informed decisions about microservices adoption, and furthermore guide them through a system- atic transformation process. The evaluations showed an overall positive result in terms of effectiveness, usefulness, and usability, while both case studies demonstrated a successful application in an industrial environment. By sharing important study artifacts, we support researchers developing industry-focused methods, who can profit from our insights and experiences. Moreover, we regard our design science approach to leveraging academic research by practice as transferable to other scientific disciplines. 9 Acknowledgements The research conducted within this thesis would not have been possible without the support and guidance of several people. First of all, I want to express my gratitude to my PhD advisors Prof. Dr. Stefan Wagner and Prof. Dr. Alfred Zimmermann. I met Alfred during my master’s studies, while he encouraged me to join the doctoral program “Services Computing”. His breadth of knowledge, good-tempered way, and thoughtful advice provided a strong anchor and guidance throughout my PhD journey. In his foresight, Alfred soon established the contact to Stefan, who became my first supervisor. I want to thank Stefan for his early support and motivation to join his group. His guidance, advice, and goal orientation are the foundation that made this dissertation possible. I appreciate our numerous constructive discussions in an always serene and pleasant atmo- sphere. Stefan gave me the freedom to also satisfy my curiosity for other topics and explore adjacent research topics, which broadened the repertoire of my scientific skills. I’m especially tankful for his support in joining the “Software Campus” program, an opportunity that allowed me to support my research activities, acquire interdisciplinary skills, and expand my profes- sional network. I would also like to thank Prof. Dr. Wilhelm Hasselbring for his prompt confirmation to examine this dissertation. 11 Likewise, I want to thank my colleagues in the Empirical Software En- gineering Group, who have accompanied my journey over the past years. I appreciate the fruitful discussions, some of which have led to new ideas and evolved into successful collaborations. In particular, I want to thank Dr. Justus Bogner for our joint research studies that were outstandingly well received by the scientific community. As division lead of our research group, his profound expertise and methodological knowledge have always been a great source of inspiration. Eventually, I want to thank my supervised bachelor’s and master’s students whose excellent works likewise mark sub- stantial contributions. In this context, I would like to give a special mention to Tobias Haller and Daniel Koch, who laid the foundation for our web-based application. My thanks also go to Dr. Filipe Correia from the University of Porto. Our meeting during the Microservices Conference 2019 was the starting point of a successful collaboration, with several publications over the following years. Special thanks go the team at Siemens AG, Carolin Rubner, Matthias Saft, and Horst Sauer, for their support in the course of our conducted case study. Likewise, I very much appreciate the support from Stefan Melles at DATEV eG throughout our collaboration in the “Software Campus” project. I would also like to thank Dr. Alexander Eisold and his former employer L-mobile, and Frank Intorp at levigo solutions, for their active involvement throughout our evaluation case studies. Last but not least, my gratitude goes to my family and friends whose support I could always count on. I particularly thank Ganga for her refreshing thoughts while patiently accompanying my writing process with all its ups and downs. Jonas Fritzsch, May 2024 12 Contents I. MOTIVATION AND FOUNDATIONS 19 1. Introduction 21 1.1. Software Modernization . . . . . . . . . . . . . . . . . . . . . . 21 1.2. The Challenge of Moving to Microservices . . . . . . . . . . . 23 1.3. The Academia-Industry Gap . . . . . . . . . . . . . . . . . . . . 25 1.4. Research Objective . . . . . . . . . . . . . . . . . . . . . . . . . . 26 1.5. Research Methodology . . . . . . . . . . . . . . . . . . . . . . . 27 1.6. Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1.7. List of Publications . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2. Background and Related Work 35 2.1. Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . 37 2.1.1. Architectural Styles . . . . . . . . . . . . . . . . . . . . 38 2.1.2. The Monolith . . . . . . . . . . . . . . . . . . . . . . . . 40 2.1.3. Microservices . . . . . . . . . . . . . . . . . . . . . . . . 41 2.1.4. Migration to Microservices . . . . . . . . . . . . . . . 45 2.2. Architectural Refactoring . . . . . . . . . . . . . . . . . . . . . . 48 2.2.1. Refactoring Techniques . . . . . . . . . . . . . . . . . 49 13 2.2.2. A Classification Scheme for Approaches . . . . . . . 54 2.3. Software Quality in Microservices Architectures . . . . . . . 56 2.3.1. Quality Attributes . . . . . . . . . . . . . . . . . . . . . 58 2.3.2. Design Properties . . . . . . . . . . . . . . . . . . . . . 60 2.3.3. Quality Trade-Offs . . . . . . . . . . . . . . . . . . . . 64 2.4. Quality-Driven Migration to Microservices . . . . . . . . . . . 65 2.4.1. Architecture Assessment and Migration Decision . . 66 2.4.2. Quality-Oriented Decomposition . . . . . . . . . . . . 70 2.4.3. Quality-Oriented Design of Microservices . . . . . . 70 2.5. Patterns and Best Practices for Microservices . . . . . . . . . 72 2.5.1. Mapping Quality Attributes to Patterns . . . . . . . . 74 2.5.2. Quality Trade-Offs for Patterns . . . . . . . . . . . . . 76 2.5.3. Best Practices . . . . . . . . . . . . . . . . . . . . . . . . 77 II. STATE OF THE ART ANALYSIS 79 3. State of Practice: Microservices Migration in Industry 81 3.1. Context: Intentions, Strategies, and Challenges . . . . . . . . 82 3.2. Method: Semi-structured Interviews . . . . . . . . . . . . . . 83 3.3. Interview Case Descriptions . . . . . . . . . . . . . . . . . . . . 85 3.4. Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . 97 3.4.1. Migration Intentions (RQ1) . . . . . . . . . . . . . . . 97 3.4.2. Migration Strategies and Decomposition (RQ2) . . 99 3.4.3. Technical Challenges (RQ3) . . . . . . . . . . . . . . . 101 3.4.4. Organizational Challenges (RQ3) . . . . . . . . . . . 102 3.5. Threats to Validity . . . . . . . . . . . . . . . . . . . . . . . . . . 103 3.6. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 3.7. Subsequent Work . . . . . . . . . . . . . . . . . . . . . . . . . . 105 4. State of Practice: A Case Study in the CPS Domain 107 4.1. Context and Goals: Microservices in the CPS Domain . . . . 108 4.2. Method: Rapid Review and Interview-Based Case Study . . 111 4.2.1. Rapid Review . . . . . . . . . . . . . . . . . . . . . . . . 111 14 4.2.2. Interview-based Case Study . . . . . . . . . . . . . . . 115 4.3. Rapid Review Results . . . . . . . . . . . . . . . . . . . . . . . . 117 4.3.1. Challenges (RQ1) . . . . . . . . . . . . . . . . . . . . . 117 4.3.2. Practices (RQ2) . . . . . . . . . . . . . . . . . . . . . . 119 4.4. Interview Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.4.1. Challenges (RQ1) . . . . . . . . . . . . . . . . . . . . . 124 4.4.2. Practices (RQ2) . . . . . . . . . . . . . . . . . . . . . . 127 4.4.3. Rationales (RQ3) . . . . . . . . . . . . . . . . . . . . . 129 4.4.4. Requirements for Tool Support (RQ4) . . . . . . . . 130 4.5. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 4.5.1. Comparing CPS with Enterprise Applications . . . . 134 4.5.2. Comparing Rapid Review and Interview Results . . 138 4.5.3. Migration Guidance and Automation . . . . . . . . . 140 4.5.4. Main Takeaways . . . . . . . . . . . . . . . . . . . . . . 141 4.6. Threats to Validity . . . . . . . . . . . . . . . . . . . . . . . . . . 144 4.7. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 5. State of Research: A Classification of Refactoring Approaches 147 5.1. Context: Refactoring Approaches . . . . . . . . . . . . . . . . 148 5.2. Method: Literature Review . . . . . . . . . . . . . . . . . . . . 150 5.2.1. Search Databases and Keywords . . . . . . . . . . . . 150 5.2.2. Inclusion/Exclusion and Data Extraction . . . . . . . 151 5.2.3. Review Iterations . . . . . . . . . . . . . . . . . . . . . 152 5.3. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 5.3.1. Required Input . . . . . . . . . . . . . . . . . . . . . . . 155 5.3.2. Generated Output . . . . . . . . . . . . . . . . . . . . . 160 5.3.3. Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 5.3.4. Usability . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 5.3.5. Quality Goals . . . . . . . . . . . . . . . . . . . . . . . . 171 5.4. A Taxonomy for Refactoring Approaches . . . . . . . . . . . . 175 5.5. Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 5.6. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 15 6. State of Research: Automated Refactoring to Microservices 179 6.1. Context and Goal: Automating the Decomposition . . . . . . 180 6.2. Method: Rapid Review . . . . . . . . . . . . . . . . . . . . . . . 181 6.3. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 6.3.1. Mono2Micro (socialsoftware) . . . . . . . . . . . . . 183 6.3.2. Service Cutter . . . . . . . . . . . . . . . . . . . . . . . 184 6.3.3. Mono2Micro (IBM) . . . . . . . . . . . . . . . . . . . . 185 6.3.4. Microservices Identification . . . . . . . . . . . . . . . 187 6.3.5. MonoBreaker . . . . . . . . . . . . . . . . . . . . . . . . 188 6.4. Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.5. Discussion and Conclusion . . . . . . . . . . . . . . . . . . . . . 189 III. MIGRATION METHODOLOGY 191 7. Conceptualizing a Microservices Migration Framework 193 7.1. Context and Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 194 7.2. Method: Design Science Research . . . . . . . . . . . . . . . . 196 7.3. Related Frameworks and Quality Models . . . . . . . . . . . 197 7.4. Microservices Migration Framework . . . . . . . . . . . . . . . 199 7.5. A Quality Model for Migrations . . . . . . . . . . . . . . . . . . 203 7.5.1. From Qualities to Refactoring Approaches . . . . . . 204 7.5.2. From Qualities to Patterns and Best Practices . . . . 210 7.5.3. Algorithm for Suitability Calculation . . . . . . . . . 211 7.6. Discussion and Limitations . . . . . . . . . . . . . . . . . . . . . 212 8. Implementation as Web-based Application 215 8.1. Context and Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 216 8.2. Method: Agile Development Process . . . . . . . . . . . . . . 218 8.2.1. Requirements Engineering and Prototyping . . . . . 218 8.2.2. Test Strategy . . . . . . . . . . . . . . . . . . . . . . . . 219 8.3. Application Model and Prototyping . . . . . . . . . . . . . . . 221 8.3.1. Client-Server Application . . . . . . . . . . . . . . . . 221 8.3.2. Vertical Prototype . . . . . . . . . . . . . . . . . . . . . 221 16 8.4. Extensible Repository for Refactoring Approaches . . . . . . 223 8.4.1. Data Model for Refactoring Approaches . . . . . . . 224 8.4.2. Technology Stack . . . . . . . . . . . . . . . . . . . . . 226 8.5. User Interface and Application Front-End . . . . . . . . . . . 229 8.5.1. Technology Stack . . . . . . . . . . . . . . . . . . . . . 231 8.5.2. Design and Navigation . . . . . . . . . . . . . . . . . . 232 8.5.3. Integration with Back-End . . . . . . . . . . . . . . . . 240 8.6. Quality-Model Implementation . . . . . . . . . . . . . . . . . . 240 8.6.1. Quality Assessment (Phase 1) . . . . . . . . . . . . . 241 8.6.2. Quality-Based Recommendations (Phases 2 and 3) 243 8.6.3. Configuration Overview . . . . . . . . . . . . . . . . . 244 8.7. Build, Test, and Deployment . . . . . . . . . . . . . . . . . . . 245 8.7.1. Deployment Architecture . . . . . . . . . . . . . . . . 246 8.7.2. Containerization with Docker . . . . . . . . . . . . . 247 8.7.3. Integration Testing . . . . . . . . . . . . . . . . . . . . 249 IV. EVALUATION AND CONCLUSION 253 9. Application Concept and Usability Evaluation 255 9.1. Survey on Prototype (9 Participants) . . . . . . . . . . . . . . 256 9.1.1. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 9.1.2. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 261 9.2. Survey on Web-based Application (11 Participants) . . . . . 263 9.2.1. Questionnaire Design . . . . . . . . . . . . . . . . . . . 264 9.2.2. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 9.2.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 272 9.3. Evidence on Quality-Driven Migration (6 Participants) . . . 275 9.3.1. Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 9.3.2. Expert Interviews . . . . . . . . . . . . . . . . . . . . . 279 9.3.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 284 9.4. Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 9.5. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 17 10. Case Studies in Industry 291 10.1. Case Study Research . . . . . . . . . . . . . . . . . . . . . . . . 292 10.2. A Microservices Migration in the Services Domain . . . . . . 293 10.2.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 10.2.2. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 10.2.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 312 10.3. Refactoring of a Document Management Solution . . . . . . 313 10.3.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 10.3.2. Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 10.3.3. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 330 10.4. Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 10.5. Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 10.6. Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 11. Discussion and Conclusion 337 11.1. Summary of Contributions . . . . . . . . . . . . . . . . . . . . . 337 11.2. Limitations and Future Research . . . . . . . . . . . . . . . . . 344 11.3. Final Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Bibliography 349 List of Figures 389 List of Tables 393 A. Patterns and Best Practices 397 B. Refactoring Approaches 403 C. Web Application Requirements 409 18 Part I. MOTIVATION AND FOUNDATIONS 19 Ch ap te r 1 Introduction In the first chapter, we motivate our research by placing the transformation to microservices in the context of general software maintenance and mod- ernization. We highlight the particular challenge of architectural refactoring monolithic systems towards microservices and identify a related gap between academia and industry. Based on the outlined deficiencies, we derive our research objective, which we subsequently refine into four research ques- tions. The research methods applied to answer these questions are presented afterwards, along with an overview of the main contributions in this thesis. A list of publications contributed to the scientific community during this research concludes the chapter. 1.1. Software Modernization In contrast to consumer products that we are used to in our day-to-day life, a software product, once created, is never done, but subject to ongoing development. Its lifecycle entails permanent changes that make it more useful and mature over time, until its decommissioning [Sne12]. The notion of software evolution has been established to holistically describe this process, 21 which starts with a software’s initial operation [SS13]. Software evolution, according to Sneed and Seidl, entails activities to correct, change, expand, optimize, renovate, document, and integrate software. While evolution implies that the product stays the same at its essence, this may not be true for more profound changes like transformations to new environments, or introducing new programming languages [SS13]. Changing a software system’s architecture likewise involves more comprehensive changes, while we distinguish it from typical maintenance efforts that the notion of software evolution encompasses. However, boundaries between denotations are not always distinct, as such transformation processes can also be performed in small increments, thereby reflecting a continuous evolution process. Estimates suggest that around 70% of software developers are concerned with maintenance of existing systems [SS13]. The authors state that existing systems are less often decommissioned than new systems are introduced, leading to an ever-growing landscape of systems. Their maintenance, trans- formation to new platforms, or migration to a different architectural style require specific technical expertise, complemented by organizational and eco- nomical considerations. While common computer science curricula mainly focus on developing new systems [SS13], the dominance of maintenance- related demands by industry is proportionally underrepresented in education of software professionals. Academia has made significant advances to ad- dress this issue and proposed measures for the ability of a software system to evolve. The associated quality attribute of evolvability [Bog20] is regarded as particularly promoted by the service-oriented computing paradigm [BVS13] and its realizing service-oriented architecture. As the predecessor and over- arching principle of microservices, it inherently supports the ongoing change of a software system [Sne12]. Complemented by cloud technologies, contem- porary software systems thereby represent ecosystems that can constantly evolve and quickly react to changing requirements. However, most existing systems are designed and implemented in a con- ventional monolithic style. While such systems can be partly transitioned to cloud platforms, their underlying architecture is often incapable of leveraging the advantages of such environments. A recent magazine survey among 339 22 1 | Introduction German-based IT decision makers revealed that many companies struggle with monolithic legacy systems, while they attest themselves a moderniza- tion backlog [CIO22; Mau22]. The results show that 59% of the companies, particularly smaller ones, spend additional efforts on the maintenance and operation of legacy systems, which are usually based on a monolithic archi- tecture [Mau22]. Monolithic systems that have grown over years or decades can become complex and even fossilize in later stages, making them practi- cally unmaintainable [SS13]. The problem would be intensified by missing personnel that is familiar with the used legacy technologies. While such systems hardly meet today’s requirements, they increasingly become security risks, too. On average, the surveyed companies grade their own IT infrastruc- ture only “satisfactory”, with flexibility and adaptability revealing the most deficiencies. The article summarizes that most companies are aware of the situation, and thus regard the modernization of their systems as important. To fully leverage the advantages of microservices and cloud environments, monolithic applications require an architectural refactoring, that can entail redevelopments of parts or even the entire system. The sometimes enor- mous efforts of such a transformation involve significant amounts of time and human resources. It stands to reason that systematic decision-making, detailed planning, and proven approaches are in high demand, to avoid costly misinvestments. 1.2. The Challenge of Moving to Microservices The microservices architectural style has been established to date as de facto standard for modern cloud-based software systems. The overarching ad- vances towards cloud-native computing massively promote this architectural style, facilitated by technological enablers like containerization. Linthicum and David describe the underlying principle in a bigger context: “This is service-oriented computing, at its essence, decomposing the application down to the functional primitive, and building it as sets of services that can be lever- aged by other applications, or the application itself” [Lin16]. The concept of 1.2 | The Challenge of Moving to Microservices 23 autonomous services allows for their independent development and deploy- ment with a high degree of automation [JPM+18], embedded in a DevOps culture that combines development and operations. It thereby facilitates an agile development process that allows rapidly reducing time to market for new features, while several other product qualities like maintainability or performance likewise profit. While the advantages of this architectural style seem beneficial in every respect, literature often emphasizes that “microservices are no free lunch or silver bullet” [New15]. Adopting microservices entails various challenges related to their nature of a distributed system, like transactions and data con- sistency [New21], complemented by organizational and technology-related challenges [BNK18; FBWZ19]. As a prominent example, the Istio project recently reported on their migration back to a monolith, acknowledging that microservices are not always the best fit [MBMR21]. It underpins the need for a thorough analysis to reason a migration decision first, and iden- tify appropriate strategies and refactoring techniques in the following. The question of an appropriate strategy distinguishes between the development of a new application, and the redevelopment of the existing system. While building a new system from scratch is often regarded too expensive, solutions for resource-efficient refactoring of existing systems are in high demand. Strategies range from a slow-paced gradual adaption in a continuous evo- lution process, to a more rapid redevelopment using current technologies, while arbitrary mixtures of strategies are thinkable. Technically, transforming a monolithic system’s architecture would require decomposing the monolithic structure into a set of self-contained services. Such an architectural refactoring is considered a major reconstruction that can span several months to years for enterprise-scale systems, and typi- cally goes along with organizational and process-related changes [KH19; KMM18]. Such a challenging endeavor needs to be well-considered [BNK18], while software architects seek for resource-efficient and partly automated modernization approaches that yield predictable outcomes. A variety of design guidelines, pattern languages, and best practices are available for microservices greenfield developments [New21; VCG+22], but the process 24 1 | Introduction of migrating an existing system is not easily generalizable. The associated architectural refactoring is a highly individual process and heavily dependent on the system in place. While code-level refactoring can be automated to a great extent [AMNO21; MPB09], adapting a system’s architecture is a much more individual process, and the approaches proposed so far do not fit for arbitrary systems [FBZW19]. Early adopters of microservices had to deal with manifold challenges, such as a lack of guidance and best practices, immature tooling, or building up technology-related expertise [FBWZ19]. While pioneers like Amazon, Net- flix, Spotify, and even the German retailer Otto published on their journeys of microservices adoption, such exemplary cases do not necessarily qualify as a blueprint. The average enterprise system has often more individual and sophisticated requirements to meet than, e.g., the well-studied retail do- main. Moreover, IT budgets are often tight, and strict compliance and quality requirements do not leave much room for experimentation. Especially small and medium enterprises suffer from resource limitations that render the adoption of microservices a particular challenge [ADY19]. While practition- ers often find reasonable solutions with extensive manual efforts, a targeted, predictable, and quality-controlled migration, supported by semi-automated decomposition approaches, continues to be problematic. 1.3. The Academia-Industry Gap Over the last few years, scientific research has yielded various methods and approaches for migrations and architectural refactoring to microservices [ASM+21; BBGG21; FBZW19; KBAR21; PMA19; SKM20]. Existing studies also cover a variety of related topics, starting from decision-making [HWB17] over process strategies [BBGG21], to quality assurance [COU19], and or- ganizational aspects [BNK18]. It reflects the great demand for solutions to structure, systematize, and partly automate such transformations. However, their applicability is heavily dependent on several aspects of the system 1.3 | The Academia-Industry Gap 25 at hand, e.g., the availability and preparation of input artifacts, targeted quality attributes, or the maturity of accompanying tools. While academia offers a diverse spectrum of guidance, we found that prac- titioners hardly leverage these resources [FBH+22; FBWZ19], even special- ized consultancy companies rarely consider such knowledge. There may be several aspects to this barrier, e.g., reservations about scientific publications, access limitations to related databases, or concerns regarding the practical applicability and maturity of solutions proposed by academia [FBH+22]. Jamshidi et al. confirm that publications have had “little if any impact on microservice practice” [JPM+18], which the authors attribute to potentially limited involvement of industry-scale applications. While a strong interest in migrating legacy systems is widely confirmed [DLM19], academia still struggles in providing answers relevant for industry, such as benefits and drawbacks of microservices in a practical context [ZLC+23]. Hence, a key motivation of our work is bridging the gap between academia and industry by developing methods that focus on practical applicability and facilitate the knowledge transfer into practice. 1.4. Research Objective Based on the outlined problem statement, we frame our research project by formulating a research objective according to the guidelines for design science research by Wieringa [Wie14]: Design, implement, and evaluate A practically applicable methodology For transforming monolithic applications into microservices From the viewpoint of software architects and developers In the context of enterprise software development This overarching objective is further refined into four specific research ques- tions that express knowledge goals (RQ1-2), and design goals (RQ3-4). 26 1 | Introduction RQ1: What are intentions, strategies, and challenges in the context of mi- grating monolithic systems to microservices? RQ2: What architectural refactoring techniques are applicable for the de- composition into a set of microservices? RQ3: How can predefined quality goals steer the migration process? RQ4: How can a practically applicable migration methodology guide archi- tects? While these research questions set the scope for this thesis in its entirety, we formulate more find-grained questions for solving partial problems in the following chapters. Before, we introduce the applied research methodology for this thesis and its individual contributions. 1.5. Research Methodology The methodology followed throughout this thesis relies on established re- search methods in empirical software engineering, complemented by non- empirical methods that focus on the design of new artifacts. Empirical software engineering applies proven methods from social sciences to study and evaluate software engineering phenomena. Several concepts originate from evidence-based medicine, leading to the synonymously used notion of evidence-based software engineering [KDJ04]. But also various other fields like anthropology, psychology, or industrial engineering shaped this engineering discipline, that experienced a rapid growth during the last two decades [WA11]. The adoption of industry-relevant methods aims for design- ing and building high-quality software solutions [DKJ05], thereby bridging the gap between academia and practice [SDJ07]. Besides, empirical soft- ware engineering acknowledges the strong influence of human factors when constructing complex software systems [ESSD08; WA15]. Easterbrook et al. reviewed commonly used empirical methods, along with theoretical stances behind, and practical considerations for their appli- cation [ESSD08]. According to the authors, the key element of an empirical 1.5 | Research Methodology 27 research design is a clear research question. A philosophical stance will help to reflect the goal and further guide the selection of research methods. The chosen methods then determine the study design and data collection methods. Eventually, formulating a theory can help in data interpretation and subsequent answering the initially stated research question. Wohlin and Aurum similarly emphasize the importance of understanding the research design, process, and possible implications [WA15]. They confirm a broad spectrum of empirical methods for knowledge acquisition, and the inherent challenges of their appropriate selection. To guide researchers, they pro- vide a decision-making structure for research designs in empirical software engineering. For the creation of our research design, we consulted both mentioned guidelines. While we employ several complementing research methods throughout this thesis, its structure reflects the design science research process [HMPR04; PTRC07; Wie09]. According to Hevner et al., design science “seeks to extend the boundaries of human and organizational capabilities by creating new and innovative artifacts” [HMPR04] to understand the problem domain and its solution. Peffers et al. similarly emphasize to build upon prior knowledge and extending it through artifact design, development, and evaluation [PTRC07]. Such artifacts can be constructs, models, frameworks, methods, or instantiations, emphasizing its explorative nature [HMPR04; WA15]. Wohlin and Aurum add that such an artifact aims to address a specific problem, in which it needs to be effective and rigorously evaluated [WA15]. The nature of human knowledge is a contrarily discussed philosophical question [ESSD08], in particular for design science research [NB06]. Related epistemological questions center around ways in which scientific knowledge can be acquired, how suitable research methods can be selected, and how their soundness and rigor can be judged [Gre06]. Hevner et al. describe the design-science paradigm as the question of “what is effective” [HMPR04], and add that “both design-science and behavioral-science paradigms are needed to ensure the relevance and effectiveness” [HMPR04]. Schön argues that design science research does not particularly locate itself in a positivist domain, but is open to interpretivism as well [Sch91], while Hevner even constitutes 28 1 | Introduction a pragmatic nature of design science [Hev07] that “adopts an engineering approach to research” [ESSD08]. Case study research represents one of our essential methods, commonly used in software engineering research to investigate “contemporary phenom- ena in its natural context” [RH08]. By employing multiple data collection methods [WA15], case studies “offer in-depth understanding of how and why certain phenomena occur” [ESSD08]. Case study research supports our initial investigations in an explorative manner, and our evaluation activities in a confirmatory manner. As such, Sjøberg et al. emphasize their particular importance for industrial evaluations of methods and tools [SDJ07]. Survey research constitutes another pillar of our research methodology, both as questionnaires and expert interviews [ESSD08]. In the form of tech- nology evaluation surveys, we use self-administered questionnaires [KP08] to support our evaluation activities. Interviews, however, are a means to elicit a more “vivid picture of a participant’s perspective on the research topic” [WA15]. While fully structured interviews can be compared to questionnaire-based surveys [RH08], semi-structured interviews allow for capturing also unex- pected types of information [HA05; Sea08]. Such additional information in the form of rationals or intentions greatly facilitates the analysis of industry practice, but also allows for a targeted artifact evaluation. Next to the mentioned primary research methods, secondary research is essential to summarize the current state of research and draw conclu- sions [SF08], thereby setting the base for meaningful contributions to the scientific community. Systematic literature reviews, adopted from the medi- cal domain, represent a cornerstone of evidence-based software engineer- ing [BKB+07; KDJ04]. They are “a means of evaluating and interpreting all available research relevant to a particular research question, topic area, or phe- nomenon of interest” [Kit04]. Its “highly procedural approach” [SF08] aims to reduce selection bias and promote replicability. However, due to the partly immense effort involved, more lightweight approaches like rapid reviews in- creasingly gained popularity [CPS20]. In our thesis, literature reviews build the foundation for analyzing and synthesizing the current state of research, and help in identifying open questions and research gaps [SDJ07]. To op- 1.5 | Research Methodology 29 timally reconcile efforts and results, we rely on rapid reviews, or conduct several, partly overlapping, review iterations over a certain timeframe. 1.6. Contributions Within our thesis, the before outlined and complementing research meth- ods integrate in an overarching design science research process [HMPR04; PTRC07; Wie09]. Peffers et al. suggest a process model that comprises its six stages: problem identification, definition of objectives, design and development, demonstration, evaluation, and communication. Fig. 1.1 illus- trates our research design, that manifests in the structure of this thesis. It symbolizes the outlined process by employing the metaphor of a pyramid. Each building block represents a contribution that utilizes an individual research design. In the following, we briefly introduce the contributions, which are tagged with their chapter number in this thesis. State of Practice State of Research Evaluation Analysis and Research Gap Identification Main Contribution State of Practice: Microservices Migrations in Industry State of Research: Automated Refactoring to Microservices State of Research: A Classification of Refactoring Approaches State of Practice: A Case Study in the CPS Domain Conceptualizing a Microservices Migration Framework Design and Implementation as Web-based Application Application Concept and Usability Evaluation Case Studies in Industry 3 4 6 5 7 8 9 10 Figure 1.1.: Thesis Structure — Contributions and Methods 30 1 | Introduction State of Practice: Microservices Migration in Industry (3) In this first contribution to the state of practice, we conducted a qualitative interview study on intentions, strategies, and challenges in the context of migrations to microservices. We investigated the transformation process of 14 systems across different domains and sizes by conducting 16 in-depth interviews with software professionals from 10 German-based companies. While presenting a separate discussion of each case, we take an inventory of the situation, industry is confronted with. State of Practice: A Case Study in the CPS Domain (4) In this second contribution to the state of practice, we performed a mixed-method empirical study that aims at more thoroughly evaluating the state of microservices adoptions. To this end, we conducted a case study in the domain of cyber-physical systems (CPS), during an industry-academia collaboration. A rapid review based on 146 scientific papers on microservices and DevOps in the CPS domain is subsequently validated in an interview-based case study with 9 CPS professionals in different business units at Siemens AG. While the interviews reveal current challenges and applied practices, they also yield requirements for systematizing and automating the migrations process. State of Research: A Classification of Refactoring Approaches (5) In our third analysis contribution, we examine the state of research on architectural refactoring to microservices. Motivated by the reflections from industry, we sought answers and solutions offered by academia. Throughout four iterations, we reviewed 110 academia-proposed refactoring and migration approaches while classifying them based on several criteria, including quality aspects. Besides, we propose a taxonomy for such approaches that acts as a basis for communication among researchers and practitioners, and allows for swiftly classifying new solution proposals. State of Research: Automated Refactoring to Microservices (6) In our fourth contribution, we investigate the advances made by academia in automating a refactoring to microservices. We inspect the previously identified approaches regard- ing their techniques and tool support, while focusing on practical applicability. From 91 publications, we extracted 22 tools, seven of which address the decomposition into services. For five of them, we generated service cuts using reference applica- tions. To assess the tools from an end-user perspective, we report our experiences on installation, documentation, usability, and support. 1.6 | Contributions 31 Conceptualizing a Microservices Migration Framework (7) Our state-of- the-art analysis revealed prevalent challenges in the context of migrating monolithic systems towards microservices. Particular difficulties in the associated architectural refactoring center around a targeted and automated decomposition. Moreover, we discerned a distinct gap between industry and academia when it comes to leveraging research findings in industry practice. To overcome this barrier and provide more systematic guidance, we conceptualize a framework for migrations for microservices. Complemented by a dedicated quality model, we provide a holistic methodology for quality-driven migrations that focuses on practical applicability. Implementation as Web-based Application (8) To guide software architects and developers through a migration scenario, we developed a web-based application that implements our methodology. We adhered to established software engineering standards, including requirements engineering, model design, implementation, and testing. Starting with a vertical prototype, we involved potential users early on in an agile development process through continuous evaluations. The implemented frame- work and quality model provide the basis for a customizable workflow throughout a transformation, following the concept of a quality-driven migration. Application Concept and Usability Evaluation (9) We report on the eval- uation activities throughout the iterative development process of our web-based application. As part of the design science process, evaluations seek to collect em- pirical evidence on the practicability, soundness, and usability of our methodology and its implementation. We conducted a survey with 9 participants to evaluate the concept and vertical prototype, followed a by a survey with 11 participants targeting the concept and usability aspects. The quality-driven migration process was evalu- ated in a second and third iteration by a mix of surveys and interviews among six practitioners. Case Studies in Industry (10) We report on two longitudinal case studies that evaluated our framework and web-based application in an industrial context. The first case study on the migration of monolithic application in the Services domain was conducted between February and August 2023. Our methodology was systematically applied for developing a migration concept that was subsequently implemented in a proof-of-concept. The second case study aims to evaluate the suitability of our methodology for improving an existing microservices-based architecture of a 32 1 | Introduction document management solution, and was conducted between September 2023 and March 2024. Throughout both studies, we created structured field notes to collect in-depth qualitative data on its applicability and usability. 1.7. List of Publications In the pursuit of conducting the research for this thesis, the following five essential publications have been contributed to the scientific community: 1. J. Fritzsch, J. Bogner, A. Zimmermann, and S. Wagner. “From Mono- lith to Microservices: A Classification of Refactoring Approaches”. In: Software Engineering Aspects of Continuous Development and New Paradigms of Software Production and Deployment. DEVOPS 2018. Ed. by J.-M. Bruel, M. Mazzara, and B. Meyer. Cham: Springer Interna- tional Publishing, 2019, pp. 128–141 [FBZW19] 2. J. Fritzsch, J. Bogner, S. Wagner, and A. Zimmermann. “Microser- vices Migration in Industry: Intentions, Strategies, and Challenges”. In: 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, Sept. 2019, pp. 481–490 [FBWZ19] 3. J. Fritzsch, J. Bogner, M. Haug, A. C. Franco da Silva, C. Rubner, M. Saft, H. Sauer, and S. Wagner. “Adopting microservices and DevOps in the cyber-physical systems domain: A rapid review and case study”. In: Software: Practice and Experience (Nov. 2022), pp. 1–20 [FBH+22] 4. J. Fritzsch, F. Correia, J. Bogner, and S. Wagner. “Tools for Refactoring to Microservices: A Preliminary Usability Report”. In: 5th Interna- tional Conference on Microservices (Microservices 2023), Pisa, Italy. 2023 [FCBW23] 5. J. Fritzsch, J. Bogner, M. Haug, S. Wagner, and A. Zimmermann. “To- wards an Architecture-Centric Methodology for Migrating to Microser- vices”. In: Agile Processes in Software Engineering and Extreme Program- ming – Workshops. Ed. by P. Kruchten and P. Gregory. Cham: Springer Nature Switzerland, 2024, pp. 39–47 [FBH+24] 1.7 | List of Publications 33 Supplementary to this thesis, major contributions to the following publica- tions in the research field have been made, recognized by my co-authorship: 6. J. Bogner, J. Fritzsch, S. Wagner, and A. Zimmermann. “Limiting technical debt with maintainability assurance”. In: Proceedings of the 2018 International Conference on Technical Debt - TechDebt ’18. New York, New York, USA: ACM Press, 2018, pp. 125–133 [BFWZ18] 7. J. Bogner, J. Fritzsch, S. Wagner, and A. Zimmermann. “Microservices in Industry: Insights into Technologies, Characteristics, and Software Quality”. In: 2019 IEEE International Conference on Software Architecture Companion (ICSA-C). IEEE, Mar. 2019, pp. 187–195 [BFWZ19b] 8. J. Bogner, J. Fritzsch, S. Wagner, and A. Zimmermann. “Assuring the Evolv- ability of Microservices: Insights into Industry Practices and Challenges”. In: 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME). 2019, pp. 546–556 [BFWZ19a] 9. T. Matias, F. F. Correia, J. Fritzsch, J. Bogner, H. S. Ferreira, and A. Restivo. “Determining Microservice Boundaries: A Case Study Using Static and Dynamic Software Analysis”. In: Lecture Notes in Computer Science. Vol. 12292 LNCS. Lecture Notes in Computer Science. Cham: Springer International Publishing, 2020, pp. 315–332 [MCF+20] 10. J. Bogner, J. Fritzsch, S. Wagner, and A. Zimmermann. “Industry practices and challenges for the evolvability assurance of microservices”. In: Empirical Software Engineering 26.5 (Sept. 2021), p. 104 [BFWZ21] 11. G. Vale, F. F. Correia, E.M. Guerra, T. de Oliveira Rosa, J. Fritzsch, and J. Bogner. “Designing Microservice Systems Using Patterns: An Empirical Study on Qual- ity Trade-Offs”. In: 2022 IEEE 19th International Conference on Software Architecture (ICSA). IEEE, Mar. 2022, pp. 69–79 [VCG+22] 12. R. Lichtenthäler, J. Fritzsch, and G. Wirtz. “Cloud-Native Architectural Charac- teristics and their Impacts on Software Quality: A Validation Survey”. In: 2023 IEEE International Conference on Service-Oriented System Engineering (SOSE). Los Alamitos, CA, USA: IEEE Computer Society, July 2023, pp. 9–18 [LFW23] 34 1 | Introduction Ch ap te r 2 Background and Related Work In this chapter, we provide the technical background to the contributions of this thesis. As well, we discuss related studies that represent founda- tions for our work or have similar research goals. Both explications convey fundamental concepts on the current state of research and facilitate the comprehension of our following contributions. As the central theme of this thesis is bound to software architecture, we start with a brief introduction on software architectural styles. We then delve into the two opposing architectural styles, monolith and microservices, which will be examined from different perspectives throughout this thesis. By discussing their basic concepts, we point out key characteristics and their influence on software product quality. Throughout this thesis, we investigate both architectural styles in the context of software maintenance and evolu- tion, more precisely, the transformation of monolithic architectures towards microservices. We discuss common strategies for such a migration process whilst considering primarily technical but also business-related boundary 35 conditions. The inherent architecture-related activities in such a transforma- tion are referred to as architectural refactoring. We introduce this concept by discussing different techniques and tactics for its realization. Such aspects represent core features of concrete refactoring approaches. Academia has proposed a variety of such refactoring approaches for migrating monolithic systems towards microservices, whose classification we will briefly touch on. Upon covering the technical aspects of an architectural refactoring, we widen our perspective and examine the migration process to microservices more holistically. To conduct an architectural refactoring in a targeted man- ner, a precedent identification of migration intentions and goals is essential. This need arises from the typically long-lasting and resource-intensive mi- gration process that involves challenges also beyond technical aspects. The primary goal of a refactoring activity is the improvement of a software system’s non-functional requirements, or in other words, software quality. Both architectural styles, monolith and microservices, promote software quality aspects in different ways. Hence, an improvement of specific quality aspects is often the main-driver for a migration. As a preparatory work, we investigate such qualities for microservices architectures based on the ISO/IEC 25010:2011 Standard [ISO11a] and other related publications. The thereby established foundations allow for conceptualizing a quality model for microservices migrations at a later stage. As a second groundwork for our main contribution, we introduce the concept of a quality-driven migration to microservices. To this end, we identify the three major phases of a migration. The initial phase aims at eliciting quality goals during an architecture evaluation activity. These goals set the direction for the second phase, in which a strategy for organizing the development and conducting the architectural refactoring is defined. Eventually, established patterns and best practices ensure a quality-oriented design of the emerging microservices architecture in the third phase. Throughout this chapter, we discuss related studies that pursue similar research goals, or provide foundations that we build on. 36 2 | Background and Related Work 2.1. Software Architecture This thesis is anchored in software engineering, a branch of computer science that applies “a systematic, disciplined, quantifiable approach to the develop- ment, operation, and maintenance of software” [IEE90]. The discipline of software architecture as a sub-area of software engineering emerged in the last two decades of the twentieth century. Perry and Wolf ’s publica- tion on its foundations marked a first important reference for academia in 1992 [PW92]. At that time, software development faced the challenge of growing complexity through the increasing size of software systems. As a consequence, the underlying structure of a system became more important for satisfying various functional and non-functional requirements. Moaven et al. emphasize the importance of software architecture hereto, by stat- ing that “due to the enlargement and complexity of software systems and the need for maintenance and update, success of systems depends strongly on their architecture” [MHAK08]. The term software architecture reflects an analogy to the architecture of buildings. While the comparison of brick work and source code seems superficial, the analogy still conveys key concepts as detailed in [Tay18]. Taylor et al. define a software system’s architecture as “the set of principal design decisions made about the system” [TMD09], whereby design decisions would encompass “every aspect of the system under development, including structure, functional behavior, nonfunctional properties, user interaction, and decisions related to the system’s implementation and deployment” [Tay18]. Bass et al. emphasize the existence of structures and define software architecture as “set of structures needed to reason about a system. These struc- tures comprise software elements, relations among them, and properties of both” [BCK21]. The authors put their perspective on software architecture in contrast to other common definitions that emphasize the early decision- making in a development process: In the context of agile development practices, these structures would not predominantly reflect architectural design decisions that may manifest only in later development stages. This abstract notion of structures needs a closer inspection — Bass et al. distin- 2.1 | Software Architecture 37 guish three categories: Module structures represent the code and data units, while Component-and-connector structures reflect a system’s runtime behavior and the interaction between components. Lastly, allocation structures map the elements of the first two structures to non-software elements, such as hardware or humans. This definition implies that every software system represents an architecture, independent of its explicit description or spec- ification. It is apparent, however, that the targeted addressing of specific requirements benefits from a well-documented architecture design. Before embarking into a discussion of architectural styles, we distinguish software architecture from the two adjacent disciplines, but sometimes synonymously used terms system architecture and enterprise architecture. According to Bass et al., a system architecture is oriented towards “the to- tality of hardware, software, and humans” [BCK21]. While, for instance, a software architecture would allow to reason about qualities like performance and reliability of a system, the system architecture’s perspective would in- volve additional aspects like power consumption, physical dimensions, or human interaction. Enterprise architecture, as the second adjacent disci- pline, describes “the structure and behavior of an organization’s processes, information flow, personnel, and organizational subunits” [BCK21]. Hence, it focuses on the synergy between software systems and their role in achieving an enterprise’s business goals, e.g., in the process of a digital transforma- tion [ZSS+18]. While the two disciplines have many commonalities with software architecture, both a system and an enterprise represent environ- ments for accommodating software, with all its interdependencies [BCK21]. 2.1.1. Architectural Styles An architectural style in software development comprises a set of principles and patterns for a family of systems, thereby describing their macrostructure. The terms architectural pattern and architectural style are sometimes used synonymously, while design patterns usually describe structures on a lower level. Garlan and Shaw state that an architectural style “determines the vocab- ulary of components and connectors that can be used in instances of that style, 38 2 | Background and Related Work together with a set of constraints on how they can be combined” [GS94]. Taylor et al. emphasize the decision-making aspect by defining an architectural style as “a named collection of architectural design decisions” [TMD09], with Zimmermann adding that architectural styles are “typically defined via design intent, principles and patterns [...] or via (technical) constraints” [Zim16a]. The question arises, which aspects contribute to such a decision-making. In the introduction of their “Architecture Tradeoff Analysis Method” (ATAM), Kazman et al. note that it “is organized around the idea that architectural styles are the main determiners of architectural quality attributes” [KKC00]. Taylor et al. similarly state that architectural styles “elicit beneficial qualities in each resulting system” [TMD09]. In this regard, the choice of an architectural style can lead to a “multi-criteria decision-making problem” [MHAK08] which involves different and sometimes mutually exclusive goals and objectives. Examples of established architectural styles are client-server, layered, pipes and filters, data-centered, object-oriented, event-based, or REST (REpresen- tational State Transfer) [GS94; TMD09]. In the early 2000s, service-oriented architecture (SOA) [Erl05] emerged as a new architectural style and enabler of the service-oriented computing (SOC) paradigm [Pap03] that experienced its rise at that time. SOA promotes services as fundamental building blocks for developing applications, and is often regarded as a predecessor or gen- eralization of the microservices architectural style. A detailed discussion of SOA principles and foundations can be found in the work of Zimmer- mann [Zim09], while Bogner [Bog20] elaborates on the concept of service orientation and its evolution towards microservices. The microservices architectural style became popular around 2015 and brought significant changes to the landscape of software architectural styles. A survey among 50 architects, project managers, and scrum masters in 2020 ascertained a 50% growth of microservices architectures in web-based applications during the preceding 2 to 3 years [MSV21]. To establish a basic understanding of this architectural style and its characteristics, we provide a brief introduction by starting with a reflection on the opposing monolithic concept, before leading over to microservices. 2.1 | Software Architecture 39 2.1.2. The Monolith The notion of amonolith in software architecture does not precisely represent an architectural style, but merely a traditional unified model for software design, referring to its shape or representation. The term symbolizes the combination of all functionality and application logic within a single unit of software [KM19; LF14; SS17; VF23]. A monolith typically runs in a self-contained manner, and is often accommodated by a single process on a dedicated machine. Thus, the monolithic architecture is well suited for applications of limited size, that consist of tightly coupled components which are present at compile time [KM19]. Commonly, such applications are based on few, if not a single programming language and framework [SS17]. This characteristic allows for quick implementations and facilitates other maintainability aspects, such as testability [KMM18; SS17]. Function calls are typically implemented as in-process calls, which requires little operational overhead [KM19]. Deployment and operation of a monolith are ideally independent of external resources. That way, a small-sized monolith can also handle varying loads if complemented by a load balancer for horizontal scaling of the system [BOP22; KMM18; RWW+18]. While this concept has many advantages, it implies technical limitations like the typically low degree of technology heterogeneity. Today’s prevalence of software solutions in a multitude of application fields goes with an ever faster emergence of new technologies [FWBW21]. Hence, contemporary software architectures need to account for and support the quick adoption of new languages and frameworks. In this regard, monolithic structures often require major efforts and comprehensive refactoring, leading to the risk of a technology lock-in [SS17; VF23]. Moreover, monolithic applications that have grown over time, often suffer from related maintainability problems, in particular accumulated technical debt [LLST20]. Besides, build, test, and de- ployment of large units becomemore resource-intensive and time-consuming, hindering automation and the adoption of DevOps practices [KM19]. A small change to the code base requires to run the entire build pipeline, thereby hampering an agile development process with short release cycles [KMM18; 40 2 | Background and Related Work LF14]. As well, the operation and handling of varying workloads become more challenging, as horizontally scaling large applications can result in resource conflicts and reduced resource efficiency [KM19; KMM18; MDN20; VF23]. Reliability would be significantly impacted through degraded opera- tional stability, as a single application error can potentially disrupt the entire application’s functionality [KM19]. The in 2001 published Agile Manifesto1 brought far-reaching changes to the hitherto static and monolithic process of software development by introducing a dynamic, flexible, and customer-oriented approach that is nowadays considered the norm. While the monolithic architectural style represents the traditional approach, it still has its field of application in the era of cloud computing. Especially for small and lightweight applications, a system built as a monolithic architecture can profit from its simplicity, maintainability [SS17; VF23], and performance [KM19]. However, with increasing size and complexity, the drawbacks start to appear and eventually tend to outweigh the benefits. Hence, the challenge of building contemporary large-scale software solutions can be broken down into minimizing the proportional increase in complexity with a system’s size. Related to the architectural style, many of the outlined drawbacks can be mitigated by a more modular design. The microservices architectural style employs this principle based on current technological advances like containerization technologies [KM19; KMM18; SS17]. 2.1.3. Microservices According to a web article in 2016, the term Micro-Web-Services was first primed by Dr. Peter Rodgers during a cloud computing conference in 2005, and later in 2011 as Microservices itself at a conference of software archi- tects [Hab16]. Lewis and Fowler state that this architectural style has been employed in many projects later on, with promising results [LF14]. Hence, the concept gained growing interest in software industry due to its ben- 1 https://agilemanifesto.org/ 2.1 | Software Architecture 41 https://agilemanifesto.org/ efits over monolithic architectures [DBFP19]. Microservices address the various drawbacks of a monolith by dividing the application into smaller units, so-called services [KM19]. Small in this regard means that each ser- vice has a single responsibility, also denoted as single responsibility principle (SRP) according to the definition of Martin [Mar03; New15]. Lewis and Fowler [LF14], complemented by Newman [New15], have substantially shaped a uniform understanding of microservices by postulating commonly accepted characteristics and principles: • Componentization via Services [LF14] • Organized around Business Capabilities [LF14; New15] • Products not Projects [LF14] • Smart Endpoints and dumb Pipes [LF14] • Decentralized Governance & Data Management [LF14; New15] • Infrastructure Automation & DevOps [LF14; New15] • Design for Failure [LF14; New15] • Evolutionary Design [LF14] Many proponents agree with Sayara et al. [STH17], who consider microser- vices an evolutionary step from the service-oriented architecture (SOA). Zim- mermann confirms that “microservices indeed can be seen as a development- and deployment-level variant of SOA” [Zim16a]. In his work, he identifies the commonalities and differences between definitions of microservices and SOA in existing literature, which he then distills into “seven common themes (tenets)” [Zim16a] for microservices. In the following, we present them with a brief annotation. 1. Fine-grained interfaces to single-responsibility units Small and self- contained units encapsulate data and business logic, while exposing their entire functionality through a fine-grained API. It represents the primary way of inter-process communication between services and employs lightweight mechanisms [LF14]. The predominantly used synchronous REST-based communication [SS17; YPS17] is often complemented by asynchronous 42 2 | Background and Related Work event-driven messaging for performant backend communication. The design as single-responsibility units enables vertical scaling [KMM18; RWW+18], i.e., the individual scaling of services, thereby allowing for resource-efficiently handling varying workloads. 2. Business-driven development practices Services are built around business capabilities, which ensures a high cohesion of the implemented functionality, and promotes clear and well-defined boundaries at the same time. Techniques to model business contexts, such as domain-driven design (DDD) [Eva04], are recommended for the identification of such bounded contexts. 3. Cloud-native application design principles Zimmermann refers to the design principles by Fehling et al. who summarize them as “IDEAL” (Isolated state, Distribution, Elasticity, Automated management and Loose coupling) [FLR+14; Zim16a]. The loose coupling of services is a main characteristic [KMM18; SS17] and not only facilitates their independent development and deployment. Moreover, it has implications on the organi- zational structure of development teams, which, according to Conway’s Law, needs to consider the structure of a system to build [Con18]. 4. Polyglot programming and persistence Loosely coupled services pro- vide developers with the flexibility to use the most suitable technology stack for each microservice [KM19; New15; SS17], thereby facilitating a high degree of technology heterogeneity. In this context, polyglot persistence refers to using multiple databases and storage technologies in an applica- tion. It implies eventual consistency [Vog09] that Fowler points out as a microservice trade-off [Fow15]. 5. Lightweight containers Container technologies like Docker1 and Ku- bernetes2 offer a more resource-efficient virtualization mechanism compared 1 https://www.docker.com/ 2 https://kubernetes.io/ 2.1 | Software Architecture 43 https://www.docker.com/ https://kubernetes.io/ to, e.g., virtual machines. Accompanying tools for container orchestration enable an automated provisioning, deployment, scaling, load balancing, and monitoring. These technological foundations allow for buildingmicroservices- based systems that integrate hundreds or even thousands of small and decou- pled services. The integration of containers with CI/CD pipelines ensures a high degree of automation throughout development and operation, thereby facilitating the implementation of a DevOps culture [NOLP21]. 6. Decentralized continuous delivery As services run in their own process and operate their own database, they allow for independent development, delivery, and deployment [LF14]. While microservices promote building vertical teams around services, decentralization would empower the teams to establish their own build and release cycles, instead of adhering to central governance. An advancement towards continuous deployment even obviates the need for comprehensive product releases in favor of small and frequent increments. 7. DevOps The concept of DevOps, which evolved around the rise of mi- croservices, entails a set of practices that promote automation throughout development and operation in a streamlined process [Che18]. The indepen- dent development of services eases build, test, delivery, and deployment, allowing for more frequent releases and thus reduced time to market for new features [SS17]. Occurring failures likely affect only a part of the ap- plication’s functionality, promoting fault tolerance and reliability through isolation and easier location of failures [ALFT21; KMM18; THLL18]. Estab- lishing a DevOps culture is considered more than a set of practices, implying that the traditional roles of developers and operators merge with each other. The composition of small, autonomous services yields several advantages over a monolithic architecture. Microservices are thus particularly suit- able for large and complex applications that require frequent updates and maintenance [RWW+18]. However, this architectural style also has draw- backs which are mainly inherent to its distributed system’s nature [BBG+17; BOP22; VGC+15]. While microservices aim at reducing the complexity of 44 2 | Background and Related Work a system though separation into smaller parts, these parts need to commu- nicate in a coordinated manner. This communication complexity increases with the number of microservices that an application comprises. Hence, the system’s overall complexity as such does not disappear, but shift from inside the process boundaries to the outside. The communication overhead caused by inter-process communication, particularly across the network boundaries, can directly affect a system’s performance [JR19] and constitutes a major challenge in designing microservices-based systems [KMM18]. The services’ responsibility for their data management implies aligning different data formats and database systems across the application, which can complicate coordination and data exchange [BOP22]. The implementation of trans- actions spanning multiple services is severely impeded, and calls to trade consistency for eventual consistency [MM20]. Besides, a potentially high technology heterogeneity can lead to ecosystems that accommodate various languages and frameworks, thereby increasing maintenance efforts. We conclude that the microservices architectural style offers many advan- tages, but also poses new challenges of technical and organizational nature. Hence, microservices should not per se be considered the most appropriate architectural style for any “modern” application [KM19]. Pros and cons should be carefully weighed and aligned with software product quality goals, strategic goals, and an organization’s resources and capabilities. 2.1.4. Migration to Microservices Many companies migrate their monolithic applications to a microservices- based architecture in the context of moving to cloud-based platforms [FST23b]. Microservices are regarded the most suitable architectural style for cloud infrastructures and implementing DevOps practices [FST23a; HSA19; PD20]. To fully leverage the benefits of cloud environments, monolithic systems need to be transformed towards a microservices-based architecture [FST23a; HOAM23]. Hasan et al. confirm the observation by Mallidi et al. [KSS21], who regard “legacy/monolithic to microservices” as the most popular type of application modernization in 2021, while the latter see a similar trend 2.1 | Software Architecture 45 towards open-source and open platforms. Popular cloud providers such as Amazon Web Services1, Microsoft Azure2, or Google Cloud Platform3 promote this architectural style by offering comprehensive ecosystems for their development and operation. They even offer ways to detach application development from any infrastructural concerns, after the Serverless comput- ing paradigm [HR19; TEPN20]. In the following, we reflect on migration intentions and the central theme of service partitioning, before discussing possible migration strategies. Intentions The decision to migrate an existing system towards microser- vices can result from various intentions and reasons. Companies commonly aim for better maintainability, shorter release cycles, scalability, high avail- ability, cloud readiness, or a more agile development process. Henry and Ridene identified scalability and faster deployments as prevalent drivers by analyzing a developer community survey in 2018, counting 732 par- ticipants [HR19]. Taibi et al. identified maintainability, scalability, and independent development teams as the three main drivers for a migration among their 21 interviewed practitioners in 2017 [TLP17]. Several of them stated that migrating to microservices would be the only feasible solution to counteract the growing complexity of their systems. Monolithic systems that have grown over years or even decades can become large and complex, and even fossilize in later stages [SS13], making them practically unmaintainable. In software engineering, the phenomenon is denoted as accumulated techni- cal debt [LLST20], which can be reduced eventually through a migration to microservices. Service Partitioning When migrating an existing monolithic application to microservices, the most prominent question centers around an appropriate partitioning and the granularity of services. It essentially marks the differ- ence between both architectural styles, as a monolith can be regarded a 1 https://aws.amazon.com 2 https://azure.microsoft.com 3 https://cloud.google.com 46 2 | Background and Related Work https://aws.amazon.com https://azure.microsoft.com https://cloud.google.com microservices application comprising one service. The number and size of services influence the architecture’s efficiency to a great extent [THLL18]. Inappropriate service cuts can, e.g., lead to high coupling and thus degrade performance due to excessive inter-service communication [KM19]. The before outlined characteristics (Section 2.1.3) guide the design of ideal mi- croservices to avoid such inadequacies. For instance, the single responsibility principle suggests that a service should be responsible for one business ca- pability [SFP+19], promoting high cohesion within the service and loose coupling with other services. However, the granularity of such business functionalities is not precisely defined, and thus subject to a specific domain, influenced by the architect’s interpretation [STH17; THLL18]. Migration Strategy A suitable migration strategy depends on various factors like technical condition of the system, targeted quality goals, available resources, or strategic goals of the enterprise. It frames the migration process by structuring the individual activities in an organizational and chronological manner. Mallidi et al. distinguish two phases in a legacy modernization: assessment and implementation [KSS21]. The initial assessment of the legacy application, combined with an organization’s goals, would lead to a concrete transformation strategy. In this regard, they distinguish the “7-R’s”, namely Retain, Retire/rationalize, Rehosting, Replace, Refactor, Re- architecture, and Rebuild/rewrite/reengineering. Frank et al. [FST23b] use an equivalent categorization in the context of could migrations, while stating that only Refactor, Revise (Re-architecture), and Rebuild would alter the existing application. As Refactor and Revise/Re-architecture can be considered equivalent in the context of an architectural refactoring, we adhere to the basic strategy types that Bajaj et al. [BBGG21] suggest in the context of migrating monolithic systems to microservices: 1. Re-Factor— The restructuring is conducted (often incrementally) by altering the existing application and leveraging its code base. It is often combined with the extension by new functionality. 2.1 | Software Architecture 47 2. Re-Build— The application is redesigned using current technologies that suit best for fulfilling its requirements. It can entail a rewrite of parts or the entire application. 3. New Application—A new system is developed in a greenfield approach. An existing system serves merely for the derivation of requirements. The Re-Factor and Re-Build strategies are commonly also referred to as brown- field developments, while a “New Application” or greenfield development would not require an existing system implementation. Knoche and Hassel- bring [KH18] similarly distinguish between rewrite, restructuring/refactor- ing, and incremental approaches. The latter represent a popular strategy for gradually decomposing an existing system. Yoder and Merson provide a detailed discussion of the related Strangler Application [Fow04b] pat- tern and its use in evolving a monolith to the microservices architectural style [YM22]. Bajaj et al. [BBGG21] further add, that brownfield approaches can be grouped into two technique types, namely static and dynamic ap- proaches. This categorization refers to the underlying refactoring techniques, which we will discuss in the following section. 2.2. Architectural Refactoring Software evolves throughout its life-cycle, and the ability to do so efficiently receives much attention in today’s fast-moving markets [Bog20]. Software restructuring or refactoring is a means to improve specific quality attributes of a system without changing its behavior [FBBO99]. According to Ca- puano [Cap21], the migration of an existing monolithic system towards microservices can be regarded as a refactoring of its architecture. Most of the existing research on software refactoring, however, concerns code level refactoring [MT04], that aims to improve the source code’s understandability and maintainability [Fow04a]. Architectural refactoring, on the contrary, addresses the higher level struc- ture of a system and deals with documentation involving design decisions, components and connectors, and planning artifacts [Zim17]. Zimmermann 48 2 | Background and Related Work defines architectural refactoring as “a coordinated set of deliberate architec- tural activities that [...] improve at least one quality attribute without changing the system’s scope and functionality.” [Zim15], while quality-related conflicts and trade-offs are possible. Such activities would revisit and alter archi- tectural decisions that manifest in subsequent engineering tasks, including structural design changes, implementation, configuration, documentation, and communication [Zim17]. These tasks would be significantly more diffi- cult to automate than code refactoring, as their scale is larger and the level of abstraction is higher [ES22; Zim17]. Several recent studies on architectural refactoring refer to the works of Zim- mermann [Zim15; Zim17], who constitutes its under-representation in con- temporary software engineering practice, confirmed by Samarthyam [SSS16]. Zimmermann argues that the intangibleness of many involved artifacts would make it difficult to establish universally valid rules and practices. This makes architectural refactoring an effort-intensive process, whose resource de- mands are difficult to assess in advance [ES22; RR22]. The difficulties are amplified by infrastructural and organizational implications in the case of adopting microservices [TLP17]. As a mitigation, Balalaie et al. [BHJ+18] built a collection of migration patterns from industrial-scale projects that can support the planning of such an architectural refactoring to microservices. In the following, we review the underlying architectural refactoring tech- niques that are applicable in the context of a migration to microservices. By combining them with possible migration strategies (Section 2.1.4), we further discuss a classification scheme for such refactoring approaches in a migration context. 2.2.1. Refactoring Techniques Microservices aim at reducing a system’s complexity through functional de- composition into self-contained units. In Section 2.1.3, we quoted the single responsibility as a measure for the appropriate size of such a unit. However, software architects require more reliable criteria and methods to determine its size and boundaries. Domain-Driven Design (DDD) [Eva04], a software 2.2 | Architectural Refactoring 49 design approach introduced by Evans in 2004, regained popularity with the rise of microservices [ÖBB23b]. DDD offers a common language that facili- tates the communication between stakeholders and is particularly suitable for the design of new systems. As such, it is a commonly used technique for service identification, while initially neglecting the technical details of a subsequent implementation [ÖBB23b]. The authors report in another study on using DDD in the context of refactoring existing systems [ÖBB23a], and emphasize the positive effects of standardizing the refactoring efforts. How- ever, the authors also point out that the complexity of this generally manual technique can be a barrier. It requires profound domain knowledge, and, moreover, involves interpretations and personal judgment of the architects. Schmidt and Thiry [ST20] differentiate refactoring approaches for mi- croservices based on their use of Domain-Driven Design (DDD) or Model- Driven Engineering (MDE) [Sch06] techniques. For 27 studied approaches, they found 14 of them applying MDE techniques, while only five approaches use DDD. The three of them, which solely rely on DDD, have been iden- tified as exclusively manual approaches with no automation capabilities. While DDD has proven to adequately identify service boundaries and service granularity [VK21], major challenges affecting its use have been pointed out. Rademacher et al. see one reason in the “domain model informality” introduced by DDD, and further state that “domain models are typically under- specified, which poses several challenges when applying DDD to [microservices architectures]” [RSS18]. When inspecting both methods in the overall system engineering con- text, the difficulties involved with DDD become more obvious. Brambilla et al. [BCW17] show in Figure 2.1 the interplay between both design tech- niques. DDD focuses on the accurate modeling of a problem domain in its natural environment, while MDE is a means to transform the resulting model into a concrete system implementation. Here, the employed modeling lan- guages often support the automated transformation into executable artifacts, which would improve precision, quality, and productivity [RSZ17; Sil15]. 50 2 | Background and Related Work Domain Model Domain System representation of implementation of Domain-Driven Design Model-Driven Engineering Figure 2.1.: Domain-Driven Design (DDD) and Model-Driven Engineering (MDE) in System Development (Adapted From [BCW17]) The substantial effort of a manual technique like DDD may therefore not be practical for industry-scale applications, as its automation is difficult to achieve. When refactoring an existing system, model artifacts can be derived in an automated way by using reverse engineering techniques [DKTT22] and complement existing abstract system representations. We conclude that an architectural refactoring to microservices that leverages existing system artifacts allows for a higher degree of automation, due to the employment of model-driven engineering techniques. Domain-driven design, on the other hand, can be a complementary manual technique, but is more suited to new developments in a greenfield approach. The demand for reliable splitting criteria in a cost- and resource-efficient architectural refactoring process encouraged researchers to propose a variety of approaches [ASS22; SS21; ST20]. Schröer et al. [SKM20] contributed a comprehensive review of 31 microservices identification approaches. They found that a decomposition into microservices mostly originates from mono- 2.2 | Architectural Refactoring 51 lithic (code) artifacts, with 17 of them relying on static analysis, sometimes complemented by dynamic analysis. The remainder of approaches relied on requirements or model artifacts as input. Bajaj et al. [BBGG21] similarly reviewed 21 approaches, covering also tool support for automation. They found static analysis techniques in all approaches, dynamic techniques in seven, and hybrid techniques in three approaches. Kirby et al. [KBAR21] reviewed 13 approaches and collected expectations from 10 practitioners regarding tools that automate the decomposition. The results indicate that such tools should ideally allow for suggesting and com- paring different candidate service cuts. As well, they recommend combining multiple relationship types for generating a decomposition, e.g., structural, semantic, or evolutionary. Table 2.1 summarizes the mentioned reviews, supplemented by the study from Abdellatif et al. [ASM+21]. The summary reveals a dominance of static analysis approaches that primarily leverage executable artifacts, but also operate on models or requirements. Dynamic analysis is less common and mostly complements the former techniques for higher precision. Table 2.1.: Analysis Technique Types in Existing Reviews Review Sources Types of Analysis Techniques Schröer et al. [SKM20] (2020) 31 Monolith static (17), Greenfield (9), Business Process (5), Monolith dynamic (4), Monolith first (2) Bajaj et al. [BBGG21] (2021) 21 Static: Requirement Docs/Models (8), Design Docs (4), Source Code (7), VCS History (2), Dynamic (7), Hybrid (3) Kirby et al. [KBAR21] (2021) 13 Structural-static (11), Structural-dynamic (6), Semantic (2), Evolutionary (1) Lapuz et al. [LCA21] (2021) 8 Dynamic analysis (8) Abdellatif et al. [ASM+21] (2021) 13 of 41 Static analysis (10), Dynamic analysis (5), Lexical analysis (2) 52 2 | Background and Related Work From the reviewed secondary studies, we can identify three types of tech- niques used by the covered approaches. Figure 2.2 shows them in a sim- plified depiction of a refactoring process that combines all relationship types [KBAR21]. While each type will likely yield a different service cut, their aggregation can lead to more reliable results. Source Code Meta Data, Model Runtime Data Decompositions Aggregation Figure 2.2.: Refactoring Techniques Found in Existing Reviews The most comprehensive review by Abdellatif et al. [ASM+21] (Table 2.1) covers 41 service identification approaches suggested between 2004 and 2019, from which 13 specifically target microservices. Compared to the other studies, the authors classify approaches not only by their employed analysis technique type, but a variety of other attributes relevant in the migration process. As a result, they suggest a detailed taxonomy of such 2.2 | Architectural Refactoring 53 service identification approaches for legacy software systems modernization, which we discuss in the following. 2.2.2. A Classification Scheme for Approaches To find suitable refactoring approaches for migrating monolithic systems towards microservices, their essential characteristics need to be identified. We therefore elaborate a suitable classification scheme for such approaches, which represents another preparatory work for the following contributions in this thesis. The before discussed review by Abdellatif et al. [ASM+21] yielded a taxonomy for service identification approaches based on the anal- ysis of 41 publications. As it targets service identification in the context of service-oriented architectures (SOA), we consider it a precedent-setting groundwork for an enhancement by microservices-related specifics. Fig- ure 2.3 shows the attributes of such approaches, grouped into the four top-level categories Inputs, Outputs, Process, and Usability. It covers the specifics of such approaches in an elaborate and practice-oriented manner. However, microservices alter and refine the concept of SOA in several aspects, as discussed in Section 2.1.3. To account for these differences, we suggested several adaptions to this taxonomy. Specifically, we consider the following changes: • Input: For easier classification and a flatter hierarchy, we omit the subcategory Non Executable, while its branches Runtime Artifacts and Model Artifacts are promoted to separate subcategories. We also allow additional input artifacts to be reflected, such as repository data from a version control system. • Process: This category will be extended by the subcategories Process Strategy, Technique, and Atomic Unit, to reflect these additional process- related aspects. The subcategory Process Strategy would distinguish approaches according to their suitability for Re-Factor, Re-Build, and New Application strategies. The additional Technique subcategory will reflect the underlying algorithms and techniques, such as clustering, 54 2 | Background and Related Work Input Domain Artifacts Non Excecutable Excecutable Ontology Human Expertise Documentation Runtime Artifacts Model Artifacts Log Traces User-Application Interactions Domain Model Business Process Model Use Case Activity Diagram Data Flow Diagram State Machine Diagram Source Code Test Cases Database Output Architecture Service Types Services Microservices Business Enterprise Application Entity Utility Infrastructure Process Quality Direction Auto- mation Requirements Metrics Reuse Maintainability Coupling Cohesion Granularity Number of Services Usability Validation Tool Support Interoparability Selfcontainment Composability Bottum-Up Top-Down Mixed Automatic Semi- Automatic Manual Analysis Type Static Dynamic Lexical Historic Results Quality Experimental Industry Case Study No Validation Industry Ready Open Source Prototype No Tool Support High Medium Low Accuracy Precision Figure 2.3.: Taxonomy of Service Identification Approaches by Abdellatif et al. (Adapted From [ASM+21]) graph-based, data-flow driven, execution-trace modeling, or genetic algorithms. We consider the Atomic Unit an essential criterion for such approaches, as it determines the finest possible granularity of resulting microservices. Typical atomic units are, for instance, entity, class, function, interface, use case, or business capability. • Output: We omit the subcategory “Service Types” due to their rele- vance only in the SOA context. Instead, an extension by a subcategory 2.2 | Architectural Refactoring 55 Representation would characterize the generated output. Approaches could then be classified by generating, e.g., splitting recommendations, a list of services, or even source code for executable microservices. • Usability: We omit the Results Quality subcategory, as a rating of approaches in this regard is difficult and prone to subjective judgment. Moreover, we detect an overlap with the Accuracy Precision subcategory. We enhance the Tool Support subcategory by a basic characterization of accompanied tools, e.g. analysis type, programming language cov- erage, visualization capabilities, or availability of the tool. • Quality: We promote the Process subcategory Quality to a top-level category, thereby reflecting its importance in the migration process. Moreover, this category is subject to extension and replacement by a dedicated quality model for microservices migrations. In this regard, we consider replacing the subcategory Quality metrics by Design Prop- erties which allows for a more precise denotation of these architecture- related characteristics that interrelate with product quality goals. Next to coupling, cohesion, and granularity, we consider complexity, isola- tion, or technology heterogeneity as additionally relevant properties. In the following, we provide a more in-depth discussion on the role of quality attributes in the migration process to microservices. To do so, we start with a literature survey on relevant quality attributes for microservices architectures in general. 2.3. Software Quality in Microservices Architectures Delivering high-quality software products is essential for software companies to withstand highly competitive and rapidly ch