Design of Microservices with focus on granularity

Thesis title: Design of Microservices with focus on granularity
Author: Jochim, Václav
Thesis type: Diploma thesis
Supervisor: Feuerlicht, Jiří
Opponents: Buchalcevová, Alena
Thesis language: English
Abstract:
Determining the “right sized” boundaries of a microservices architecture remains one of the most persistent design challenges in modern software engineering. Services that are too coarse resemble a monolith, while overly fine grained “nano services” introduce excessive coordination overhead. This thesis proposes a six step, metrics driven methodology that unites qualitative domain analysis with quantitative evaluation to guide architects toward balanced service granularity. The process begins with a thorough gathering of functional and non functional requirements, followed by domain partitioning that leverages domain driven, data centric, event-driven, or hybrid strategies. A lightweight prototype is then produced to surface hidden dependencies before three key metrics—Lack of Cohesion of Methods (LCOM), Structural Coupling (SC), and the Service Granularity Metric (SGM)—are collected to evaluate service boundaries. Decision rules grounded in these measurements indicate when to split, merge, retain or refactor services, and an iterative refinement loop embeds boundary checks into routine development cycles. The methodology is validated through a logistics-marketplace (freight-auction) case study. Metric values confirmed that the initial domain-driven split produced cohesive, loosely coupled services; subsequent monitoring demonstrated how the approach detects boundary drift as the system evolves. The results suggest that integrating domain understanding with focused metrics offers a repeatable, evidence-based path to microservices architectures that remain maintainable, scalable, and aligned with business goals.
Keywords: metrics based evaluation; microservices; service granularity; coupling; cohesion
Thesis title: Návrh mikroslužeb se zaměřením na granularitu
Author: Jochim, Václav
Thesis type: Diplomová práce
Supervisor: Feuerlicht, Jiří
Opponents: Buchalcevová, Alena
Thesis language: English
Abstract:
Určení „správné velikosti“ mikroslužeb zůstává jedním z nejtrvalejších problémů návrhu moderního softwarového inženýrství. Příliš hrubé služby připomínají monolit, zatímco příliš jemné „nanoslužby“ přinášejí nadměrnou koordinační režii. Tato práce navrhuje šestikrokovou metodiku založenou na metrikách, která spojuje kvalitativní analýzu domény s kvantitativním hodnocením a vede architekty k vytváření mikroslužeb s vyváženou granularitou. Tento proces začíná důkladným shromážděním funkčních a nefunkčních požadavků, po níž následuje rozdělení domény, které využívá doménově orientované, datově orientované, událostmi řízené nebo hybridní strategie. Poté je vytvořen odlehčený prototyp, který odhalí skryté závislosti, a teprve poté jsou shromážděny tři klíčové metriky - nedostatek soudržnosti metod (LCOM), strukturální propojení (SC) a metrika granularity služeb (SGM) - pro vyhodnocení hranic služeb. Rozhodovací pravidla založená na těchto měřeních určují, kdy služby rozdělit, sloučit, zachovat nebo přeformulovat, a iterativní smyčka začleňuje kontroly hranic do běžných vývojových cyklů. Metodika je ověřena na případové studii logistického tržiště (nákladní aukce). Metriky potvrdily, že počáteční rozdělení řízené doménou vedlo k vytvoření soudržných, volně provázaných služeb; následné sledování ukázalo, jak přístup odhaluje posun hranic v průběhu vývoje systému. Výsledky naznačují, že integrace porozumění doméně se zaměřenými metrikami nabízí opakovatelnou, na důkazech založenou cestu k architektuře mikroslužeb, která zůstává udržovatelná, škálovatelná a v souladu s obchodními cíli.
Keywords: Mikroslužby; Granularita; Koheze; Spojení; Hodnocení založené na metrikách

Information about study

Study programme: Informační systémy a technologie/Vývoj informačních systémů
Type of study programme: Magisterský studijní program
Assigned degree: Ing.
Institutions assigning academic degree: Vysoká škola ekonomická v Praze
Faculty: Faculty of Informatics and Statistics
Department: Department of Information Technologies

Information on submission and defense

Date of assignment: 25. 4. 2024
Date of submission: 5. 5. 2025
Date of defense: 2025

Files for download

The files will be available after the defense of the thesis.

    Last update: