The microservices architectural style offers many advantages such as scalability, reusability and ease of maintainability. As such microservices has become a common architectural choice when developing new applications. Hence, to benefit from these advantages, monolithic applications need to be redesigned in order to migrate to a microservice based architecture. Due to the inherent complexity and high costs related to this process, it is crucial to automate this task. In this paper, we propose a method that can identify potential microservices from a given monolithic application. Our method takes as input the source code of the source application in order to measure the similarities and dependencies between all of the classes in the system using their interactions and the domain terminology employed within the code. These similarity values are then used with a variant of a density-based clustering algorithm to generate a hierarchical structure of the recommended microservices while identifying potential outlier classes. We provide an empirical evaluation of our approach through different experimental settings including a comparison with existing human-designed microservices and a comparison with 5 baselines. The results show that our method succeeds in generating microservices that are overall more cohesive and that have fewer interactions in-between them with up to 0.9 of precision score when compared to human-designed microservices.
翻译:微观服务建筑风格提供了许多优势,例如可伸缩性、可再使用性和易于维持性等。由于这种微观服务在开发新应用程序时已成为一种常见的建筑选择。因此,为了从这些优势中受益,需要重新设计单一应用软件,以便迁移到以微观服务为基础的建筑结构。由于这一过程固有的复杂性和高成本,因此有必要使这项任务自动化。在本文件中,我们提出了一个方法,可以从给定的单体应用中确定潜在的微观服务。我们的方法将源应用的源代码作为输入,以便用它们的互动和代码中使用的域名来衡量系统中所有类别之间的异同和依赖性。这些类似值随后与基于密度的群集算法变量一起使用,以产生推荐的微观服务等级结构,同时确定潜在的离群等级。我们通过不同的实验环境对我们的方法进行了经验评估,包括与现有的人类设计的微观服务进行比较,并与5个基准进行比较。结果显示,我们的方法成功地生成了微观服务,这种服务在总体上更加紧密,在与0.9之间,将人类的精确度与0.9级进行比较时,对微观服务进行了更小的对比。