Vera-Rivera Fredy H, Puerto Cuadros Eduard Gilberto, Perez Boris, Astudillo Hernán, Gaona Carlos
Grupo de Investigación GIA, Universidad Francisco de Paula Santander, Cúcuta, Norte de Santander, Colombia.
Departamento de Informática, Universidad Técnica Federico Santa María, Santiago, Santiago, Chile.
PeerJ Comput Sci. 2023 May 12;9:e1380. doi: 10.7717/peerj-cs.1380. eCollection 2023.
Microservices is an architectural style for service-oriented distributed computing, and is being widely adopted in several domains, including autonomous vehicles, sensor networks, IoT systems, energy systems, telecommunications networks and telemedicine systems. When migrating a monolithic system to a microservices architecture, one of the key design problems is the "microservice granularity definition", ., deciding how many microservices are needed and allocating computations among them. This article describes a semantic grouping algorithm (SEMGROMI), a technique that takes user stories, a well-known functional requirements specification technique, and identifies number and scope of candidate microservices using semantic similarity of the user stories' textual description, while optimizing for low coupling, high cohesion, and high semantic similarity. Using the technique in four validation projects (two state-of-the-art projects and two industry projects), the proposed technique was compared with domain-driven design (DDD), the most frequent method used to identify microservices, and with a genetic algorithm previously proposed as part of the Microservices Backlog model. We found that SEMGROMI yields decompositions of user stories to microservices with high cohesion (from the semantic point of view) and low coupling, the complexity was reduced, also the communication between microservices and the estimated development time was decreased. Therefore, SEMGROMI is a viable option for the design and evaluation of microservices-based applications. The proposed semantic similarity-based technique (SEMGROMI) is part of the Microservices Backlog model, which allows to evaluate candidate microservices graphically and based on metrics to make design-time decisions about the architecture of the microservices-based application.
微服务是一种面向服务的分布式计算的架构风格,正在多个领域中广泛应用,包括自动驾驶车辆、传感器网络、物联网系统、能源系统、电信网络和远程医疗系统。当将单体系统迁移至微服务架构时,关键设计问题之一是“微服务粒度定义”,即确定需要多少个微服务 并在它们之间分配计算任务。本文描述了一种语义分组算法(SEMGROMI),该技术采用用户故事(一种广为人知的功能需求规范技术),并利用用户故事文本描述的语义相似性来识别候选微服务的数量和范围,同时针对低耦合、高内聚和高语义相似性进行优化。在四个验证项目(两个先进项目和两个行业项目)中使用该技术,将所提出的技术与领域驱动设计(DDD)(用于识别微服务的最常用方法)以及先前作为微服务待办事项模型一部分提出的遗传算法进行比较。我们发现,SEMGROMI 能够将用户故事分解为具有高内聚性(从语义角度)和低耦合性的微服务,降低了复杂性,减少了微服务之间的通信,也缩短了估计的开发时间。因此,SEMGROMI 是基于微服务的应用程序设计和评估的可行选择。所提出的基于语义相似性的技术(SEMGROMI)是微服务待办事项模型的一部分,该模型允许以图形方式并基于指标评估候选微服务,以便在设计时对基于微服务的应用程序架构做出决策。