Background: Microservices are an architectural approach of growing use, and the optimal granularity of a microservice directly affects the application’s quality attributes and usage of computational resources. Determining microservice granularity is an open research topic. Methodology: We conducted a systematic literature review to analyze literature that addresses the definition of microservice granularity. We searched in IEEE Xplore, ACM Digital Library and Scopus. The research questions were: Which approaches have been proposed to define microservice granularity and determine the microservices’ size? Which metrics are used to evaluate microservice granularity? Which quality attributes are addressed when researching microservice granularity? Results: We found 326 papers and selected 29 after applying inclusion and exclusion criteria. The quality attributes most often addressed are runtime properties (e.g., scalability and performance), not development properties (e.g., maintainability). Most proposed metrics were about the product, both static (coupling, cohesion, complexity, source code) and runtime (performance, and usage of computational resources), and a few were about the development team and process. The most used techniques for defining microservices granularity were machine learning (clustering), semantic similarity, genetic programming, and domain engineering. Most papers were concerned with migration from monoliths to microservices; and a few addressed green-field development, but none address improvement of granularity in existing microservice-based systems. Conclusions: Methodologically speaking, microservice granularity research is at a Wild West stage: no standard definition, no clear development—operation trade-offs, and scarce conceptual reuse (e.g., few methods seem applicable or replicable in projects other than their initial proposal). These gaps in granularity research offer clear options to investigate on continuous improvement of the development and operation of microservice-based systems.
The microservice granularity directly affects the quality attributes and usage of computational resources of the system, determining optimal microservice granularity is an open research topic. Microservices granularity is defined by the number of operations exposed by the microservice, the number of microservices that compose the whole application, and its complexity and dependencies. This paper describes “Microservice Backlog (MB)”, a semiautomatic model for defining and evaluating the granularity of microservice-based applications; MB uses genetic programming technique to calculate at design time the granularity of each microservice from the user stories in the “product backlog” or release planning; the genetic algorithm combined coupling, cohesion, granularity, semantic similarity, and complexity metrics to define the number of microservices, and the user stories associated with each microservice. MB decomposes the candidate microservices, allowing to analyze graphically the size of each microservice, as well as its complexity, dependencies, coupling, cohesion metrics, and the number of calls or requests between microservices. The resulting decomposition (number of microservices and their granularity) performed by MB shows less coupling, higher cohesion, less complexity, fewer user stories associated with each microservice, and fewer calls among microservices. MB was validated against three existing methods, using two state-of-the-art applications (Cargo Tracking and JPet-Store), and one real-life application (Foristom Conferences). The development team and/or architect can use metrics to identify the critical points of the system and determine at design time how the microservice-based application will be implemented.
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”,i.e., 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.
1 November 2018 in Journal of Physics: Conference Series
This paper presents a development process of enterprises applications with microservices. We identify the construction phases, practices, fundamentals, methods and tools that are being used in the development of microservices based enterprise applications. After identifying and proposing the development process, it is validated and tested in the construction of an application called Sinplafut. By using microservices the size of enterprise applications is reduced and easier to manage, deployment, scaling, test and replace using the resources offered by cloud computing. In this way the costs and efforts necessary to maintain the application in the cloud are considerably reduced.
In agile software development processes, user stories (US) had been used to specify application functionalities from the users’ perspective. For intelligent applications leveraging artificial intelligence (AI), the Smart Product Backlog (SPB) has included both AI-implementable and non-AI functionalities. This paper had proposed a model employing supervised machine learning techniques to classify US descriptions based on their technical feasibility for AI implementation. This model had aimed to assist in constructing smart product backlogs (SPB). Classifying US in agile development, particularly with AI, had been a labor-intensive process demanding significant time and expert involvement. Additionally, the lack of a dedicated dataset for this task had limited the applicability of automated methods. This study addressed this challenge by having experts classify the Mendeley US dataset using binary classification (AI and non-AI). The proposal had involved developing an automatic classification model to process US descriptions and distinguish those suitable for AI implementation. This model had leveraged advanced text processing techniques to refine the textual features of the US. Additionally, it had employed three binary classification techniques: logistic regression, k-nearest neighbors (k-NN), and support vector machines (SVM). The model’s performance had been evaluated using metrics such as accuracy, loss (Log-Likelihood Loss), precision, recall, F1 score, area under the ROC curve, and specificity to identify the best-performing technique in binary classification. Logistic regression and SVM models had demonstrated high accuracy, with scores of 0.748 and 0.740, respectively. These results had highlighted the potential of an automated tool for recommending US feasible for AI development, thereby supporting decision-making in agile software projects.