I am Maximilian Irro and this is my master thesis ("Diplomarbeit") that I worked on in 2017/2018 as a requirement for the completion of my master curriculum Software Engineering & Internet Computing at TU Wien. The supervisor was Franz Puntigam from the Institute for Information Systems Engineering, Compilers and Languages Group. This repository contains all materials related to my master thesis project (documents and implementation source codes, measurement data, etc.).
Common problems require applications to manage multiple concerns simultaneously. A convenient approach is the concept of concurrent programming. In this thesis, we investigate two different models for introducing concurrent computational units into software architectures. One approach is the actor model that defines theoretically well-known constructs supporting concurrent, parallel and distributed execution in a transparent way. The other approach is an architectural style based on microservices, a recent trend that gained academic and industrial popularity. Microservices facilitate many principles of the old Unix philosophy by composing complex functionality through small, independent, highly cohesive and loosely coupled executables. These programs interoperate via lightweight, technology-heterogeneous messaging channels. The deployment modality of microservices conceives concurrent execution through the operating system scheduler. This thesis compares the programming of concurrent computation through actors and microservices with respect to a non-trivial concurrent system scenario. We argue that both approaches share many conceptual similarities and show few but significant differences. Both models have the same expressive capabilities regarding concurrent programming concerns like communication and scalability, but are subject to different trade-offs. We provide implementations of the system scenario based on actor and microservice architectures. Benchmark results of these implementations suggest that actors provide better system efficiency through a smaller codebase. Microservice architectures consume significantly more system resources and suffer especially from purely synchronous communication mechanisms.
This repository is structured as follows:
- π /docs/ β document source files (thesis, poster, slides, graphics, etc.)
- π /eval/ β evaluation material (measurement data, R scripts)
- π /src/ β program artifact source codes (actor and microservice architecture, domain library, web interface)
The subdirectories have separate README.md
files with detailed information.
This master project originated a thesis document. It is available in the following file versions:
If you want to cite the original thesis, please use the following BibTeX entry:
@mastersthesis{Irro18,
author = {Maximilian Irro},
title = {Concurrent Programming with Actors and Microservices},
school = {TU Wien},
year = {2018},
keywords = {concurrent programming, actors, microservices},
timestamp = {20180930},
url = {https://repositum.tuwien.ac.at/urn:nbn:at:at-ubtuw:1-115820}
}
For a lists errors found in the submitted version of the thesis, see the errata file.
This thesis uses a non-trivial system scenario for evaluating the programming of concurrency with actors and microservices. The scenario is a podcast search engine called Echo. Several implementation artifacts for Echo were produced in the course of this project. The four main parts are:
π /src/echo-core/
A library for all domain-specific functionality.
π /src/echo-actors/
An implementation of Echo's backend based on an architecture that uses the actor model. The programming language is Scala. The actor library is Akka. This system implements the whole search engine within a single executable artifact (monolith).
An implementation of Echo's backend based on a microservice architecture. This system is composed of several executable artifacts (the microservices). These distinct programs communicate via network mechanism, either REST or RabbitMQ (an AMQP-compatible messaging system). All microservices build on Spring Boot as the application foundation and various components of Spring Cloud.
The microservice applications are:
- app-catalog
- app-cli
- app-crawler
- app-gateway
- app-index
- app-parser
- app-registry
- app-searcher
- app-updater
π /src/echo-web/
The web-frontend for the Echo search engine. This web app builds on Angular.
The indexing phase facilitates asynchronous communication. The efficiency benchmark results show that the execution modality of actors is more efficient. Microservices have a higher runtime over- head, since they are separate system processes.
The time constraints of the retrieval phase favours synchronous interaction. Actors use a request/asynchronous response style (Akka's ask
message dispatch). This semi-synchronous strategy shows better efficiency than the strictly synchronous communication via REST in the microservice architecture.