Electronic Thesis and Dissertation Repository

Thesis Format

Monograph

Degree

Master of Science

Program

Computer Science

Supervisor

Konstantinos Kontogiannis

Abstract

Microservice architecture is an architectural style that supports the design and implementation of very scalable systems by distributing complex functionality to highly granular components. These highly granular components are referred to as microservices and can be dynamically deployed on Docker containers. These microservice architecture systems are very extensible since new microservices can be added or replaced as the system evolves. In such highly granular architectures, a major challenge that arises is how to quickly identify whether any changes in the system’s structure violate any policies or design constraints. Examples of policies and design constraints include whether a microservice can call or pass data to another microservice, and whether data handled by one microservice can be stored in a specific database. In order to perform such type of analysis a model that denotes call and data dependencies between microservices must be constructed. In this thesis, we present a technique that is based on log analysis and probabilistic reasoning to harvest, model, and associate logged events, in order to compile a labeled, typed, directed multigraph that represents call and data exchanges between microservices in a given deployment. We refer to this graph as the \emph{Microservice Dependency Graph}, or MDG. The nodes of the graph denote microservices, service busses, publish-subscribe frameworks, and databases, while the edges denote data exchanges as well as send and receive requests. The graph contains a different edge for each type of interaction (i.e. data transfer, invocation, or response). We approach the problem of compiling a Microservice Dependency Graph in five major steps. The first step focuses on creating a metamodel for representing logged events and designing a metamodel for representing the MDG schema. The second step focuses on identifying associations and similarities between logged events. These associations create groups of events which may relate in the context of a transaction. The third step focuses on defining domain-specific log analysis logic based on a set of facts and weighted rules which encode complex relationships between events. These facts and rules constitute a knowledge base. The fourth step focuses on the application of a probabilistic reasoning engine to identify related events in the candidate groups of associated events, and impose an ordering relation between these events. Finally, the fifth step focuses on the compilation of the \emph{Microservice Dependency Graph}. The prototype system has been applied on an open source microservice architecture system that simulates the operations of a garage shop. The identification of dependencies between microservices is a pivotal first step towards the implementation of various future frameworks. First, the MDG can be used to develop compliance analysis frameworks for microservice architectures. Second, the MDG can be used to develop \emph{what-if} analysis utilities whereby software engineers can identify, prior to release, any unwanted interactions between the MSA components when changes in the code or new features are introduced during development. Third, the MDG can be used to identify failure risks. A possible avenue of research here would be to train a model to identify interaction patterns that are known to lead to failures. In this respect, when a new feature or a code change is introduced, the new MDG interactions can be fed to the trained model and identify the failure risk proneness if this feature were to be released. This is an important utility for achieving continuous integration and continuous deployment (CI/CD).

Summary for Lay Audience

Microservice architecture is an architectural style that supports the design and implementation of very scalable systems by distributing complex functionality to highly granular components. These microservice architecture systems are very extensible since new microservices can be added or replaced as the system evolves. In such highly granular architectures, a major challenge that arises is how to quickly identify whether any changes in the system’s structure violates any policies or design constraints. In order to perform such type of analysis a model that denotes call and data dependencies between microservices must be constructed. In this thesis, we present a technique that is based on log analysis and probabilistic reasoning to harvest, model, and associate logged events for compiling a labeled, typed, directed multigraph that represents call and data exchanges between microservices in a given deployment. We refer to this graph as Microservices Dependency Graph or MDG. The nodes of the graph denote microservices, service busses, publish-subscribe frameworks, and databases, while the edges denote data exchanges as well as send and receive requests. The identification of dependencies between microservices is a pivotal first step towards the implementation of various future frameworks such as compliance analysis frameworks, what-if analysis utilities so that software engineers can identify what the interactions between the MSA components would be if a new feature is added to the system, and frameworks to train a machine learning model to identify microservice dependency patterns that are known to lead to failures or pose a failure risk.

Creative Commons License

Creative Commons Attribution 4.0 License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS