# Roadmap to Reasoning in Microservice Systems: A Rapid Review
## 4 Architecture Reconstruction
### Conclusion and RQ1 Answer  
The analysis process aims to extract a holistic architecture from the distributed microservices to allow reasoning about the system as a whole. The microservice-based systems emphasize the importance of considering the multiple perspectives of service, interaction, and infrastructure. Therefore, static and dynamic analysis are complementary techniques, the dynamic analysis reveals subtle defects or vulnerabilities whose cause is complex to be discovered by static analysis; therefore, it requires the system to be deployed first.  
The static analysis examines all possible execution paths--not only those invoked during execution. Although microservices allow the use of different languages and technologies, the distribution and heterogeneity are the most challenging characteristics of microservice-based analysis techniques. Facing these challenges requires an approach that comprises a generic way to retrieve the necessary static and dynamic data from different distributed microservices in addition to combining the data into a centric perspective [1].  
In other words, a universal intermediate representation is needed across different languages and technologies. Although the static construction of this universal representation is more challenging, utilizing the techniques of component extraction can advance the current static analysis techniques to better face the development practices in a higher level perspective [28; 29].  
There are highlighted barriers in the proposed approaches that limit the applicability of the approaches as summarized in Table 2. The dependency on specific language features, such as the reflections in [6] and the interceptors for service calls in [1]. Furthermore, the dependency on external frameworks as Swagger integration in [6] and the data collection development library in [1].  
On the other hand, the evaluation process for the proposed techniques lacked several details, such as the unavailability of enough testbencts that share similar characteristics to real-life systems. This makes the approaches limited, such as the approach in [1] that was validated over a small number of microservices, which is not common in real-life systems. In [6], the approach was validated over randomly generated testbencts, which impacts the evaluation efficiency. In addition there were unclear and missing derived studies details, such as the study design type, setup details, participants, and tasks. Furthermore, the characteristics of the representation format affect the usability and interoperability of the produced intermediate views.  
Utilizing this information leads to designing an approach to face the main mentioned challenges. It aims to construct a universal intermediate representation across different languages and technologies; and this is concluded in three steps as depicted in Figure 3 starting with extracting the AST per each microservice codebase. The second step is applying a mechanism to convert each language-related AST to a unified structure and then combining these distributed representations to represent the holistic system. This unified structure follows readable standard formats, such as JSON, XML, and SQL. This structure takes advantage of being human-interpreted and computer interpreted at the same time. The third step introduces extraction and filtration techniques; they extract components and different intermediate representations through this universal structure.  
Figure 3: Architecture reconstruction designed approach.