Algorithmic Identification of Microservice Candidates

Loading...
Thumbnail Image
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu | Master's thesis
Date
2023-01-23
Department
Major/Subject
Computer Science
Mcode
SCI3042
Degree programme
Master’s Programme in Computer, Communication and Information Sciences
Language
en
Pages
45
Series
Abstract
Throughout the last decade the microservice architecture has grown in popularity due to organizations facing scaling related issues with their monolithic systems. The process of transitioning from a monolith to microservices is not a straightforward one to carry through. Among the first questions that arise when beginning the transition process is: what kind of microservices should the monolith be decomposed into? These microservice boundaries are traditionally defined by a developer or system architect working on the codebase. The aim of this master's thesis is to unveil what kind of algorithmic approaches to microservice candidate identification exist and evaluate how applicable they are in a real use case. Most fully-automatic approaches in previous research are based on reducing the problem into a two step graph-problem. This thesis introduces some of the approaches to constructing and clustering the graph representation that have been proposed in previous literature. Additionally, some of the methods are applied to case Delivery Platform — a technology company that is in the process of deprecating its monolithic web service. A graph representation is built using the source control history of the monolith's codebase and clustered using three different clustering approaches. To evaluate the resulting microservice decompositions, coupling metrics are computed for them and they are compared to an initial design that has been created at Delivery Platform beforehand. The Louvain community detection algorithm proved to be the most suitable clustering approach when it comes to the problem of microservice identification. However, none of the decompositions obtained as a result are implementable as is. A part of the microservice candidates were questionable in terms of their logical contents and some of them shared common responsibilities. Ultimately, the decomposition process requires broader knowledge of the domain of the application, which can not be obtained solely based on the source control history of the codebase.

Viimeisen vuosikymmenen aikana mikropalveluarkkitehtuuri on kasvattanut suosiotaan yritysten kohdatessa monoliittisen arkkitehtuurin aiheuttamia ongelmia organisaation sekä asiakasmäärien kasvaessa. Siirtymäprosessi monoliittisesta arkkitehtuurista mikropalveluarkkitehtuuriin ei ole kuitenkaan yksinkertainen toteuttaa. Prosessin alkaessa usein ensimmäinen esiin nouseva kysymys on: minkälaisiin mikropalveluihin monoliitti tulisi hajottaa? Mikropalveluiden rajojen määrittelyn tekee perinteisesti sovelluksen parissa työskennellyt kehittäjä tai järjestelmäarkkitehti. Tämän diplomityön tavoitteena on selvittää, minkälaisia algoritmisia lähestymistapoja mikropalveluehdokkaiden tunnistamiseen on esitetty edeltävissä tutkimuksissa sekä arvioida kuinka varteenotettavia ne ovat oikeassa käyttötapauksessa. Useimmat täysin automaattiset tavat mikropalveluehdokkaiden tunnistamiseen perustuvat ongelman pelkistämiseen kaksivaiheiseksi graafiongelmaksi. Työssä esitellään erilaisia tapoja monoliitin graafiesitysmuodon rakentamiseen sekä klusterointiin. Lisäksi osaa näistä metodeista sovelletaan tapaustutkimuksen muodossa. Tapaustutkimuksen kohteena on verkkoalustallaan kuljetuspalveluita tarjoavan teknologiayrityksen monoliittinen palvelu, josta yritys on siirtymässä kohti mikropalveluarkkitehtuuria. Monoliitin graafiesitys rakennetaan käyttäen hyödyksi sovelluksen versionhallintahistoriaa, minkä jälkeen graafiesitys klusteroidaan kolmella eri tavalla. Tuloksena saatuja mikropalveluhajotelmia arvioidaan käyttäen laskettuja kytkentämetriikoita sekä vertailemalla palveluehdokkaiden sisältöjä olemassa olevaan monoliitin hajotussuunnitelmaan, jonka yritys on jo aiemmin laatinut. Louvain-yhteisöntunnistusalgoritmi osoittautui kolmesta käytetystä klusterointitavasta parhaiten mikropalveluiden tunnistus -ongelmaan soveltuvaksi. Kuitenkaan yksikään tuotetuista mikropalveluhajotelmista ei ole toteuttamiskelpoinen sellaisenaan. Osa mikropalveluehdokkaista oli kyseenalaisia sisältönsä puolesta, ja jotkin niistä jakoivat samoja vastuualueita. Tulosten perusteella voidaan sanoa, että monoliitin hajotusprosessi vaatii kokonaisuudessaan laajempialaista ymmärrystä sovelluksen rakenteesta kuin voidaan pelkän versionhallintahistorian perusteella saavuttaa.
Description
Supervisor
Haaranen, Lassi
Thesis advisor
Sjölund, Kristian
Keywords
monolithic architecture, microservice architecture, microservices, web service architecture, microservice transition, monolith decomposition
Other note
Citation