# Roadmap to Reasoning in Microservice Systems: A Rapid Review
## 5 Reasoning
### Technical Reasoning
#### 5.1.2 Quality Attributes  
Reasoning about the system quality attributes is concerned with several attributes of system behavior. Each quality attribute (such as performance, security, fault-tolerance, reusability, and maintainability) requires different strategies and techniques to evaluate the system accordingly. These strategies use multiple data sources (such as metrics and bad smell catalogs) to feed their decisions. The metrics could be produced through static analysis-based representations, such as cyclomatic complexity (CC) and Lines of Code (LOC) [28], while dynamic analysis-based metrics, such as the response time, error rate, and workload; identify potential performance indicators, for example, it identifies scaled up or down for the used services [1]. Bad smells are indicators of multiple and different incidences, such as undesired patterns, antipatterns, and bad practices. They negatively affect the quality attributes, such as understandability, testability, extensibility, reusability, and maintainability of the system under development [2]. In addition to traditional smells, there are microservice-specific smells that are also problematic for the development and maintenance of microservice-based systems. [PERSON] et al. [47] proposed a catalog of microservices architectural smells, and they classified them based on modularity, hierarchy, and healthy dependency structure. These principles are defined as follows [47],  
* _Modularity:_ The system property complies with cohesive and loosely coupled building components. * _Hierarchy:_ The ranking of boundaries between the different layers of abstraction. * _Healthy Dependency Structure:_ Indication of the chain of changes that happen in the system each time it is modified. Moreover, [PERSON] et al. [2] collected evidence of microservices bad practices by interviewing developers experienced with microservice-based systems. They provided a catalog of rated bad smells together with possible solutions to overcome them. Five smells are summarized as the most mentioned during the interviews, as follows: Wrong Cuts, Hard Coded Endpoints, Shared Persistency, Cyclic Dependency, and Not Having an API Gateway. They are described and summarized in Table 3.  
Some code smells are technically detectable; however, that requires employing the appropriate strategy and technique based on the smell type. [PERSON] et al. [1] utilized the reconstructed representation to automatically detect four smells, Strong Coupling, Cyclic Dependency, Microservice Size, and Number of Interfaces, see Table 3. [PERSON] et al. [6] detected the cyclic dependency by applying [PERSON]'s Strongly Connected Component algorithm [49] to the extracted representation. Several studies [2; 6; 47] considered that Cycle Dependency is the one more critical, such that it deeply affects software maintenance, and it causes unlimited service calls to make the system function improperly. However, Code Clone smell has a serious impact on the system maintainability and its code consistency. It appears by copying and pasting source code into different components, even with minor modifications [34]. Code clones are considered more critical in microservice-based and enterprise systems; as these systems tend to be repetitive in their distributed structure [34]. Several code clone detection techniques are proposed; however, there is a lack of them targeting enterprise and microservice-based systems. [PERSON] et al. [34] proposed a semantic clone detection technique for distributed systems. They use Java Reflection and Javassist to produce CFG.