Processing requests with hierarchical nature of shared resources
The subject of this research is the development and analysis of a data structure and algorithm for managing parallel message execution in a microservice architecture without a message broker. In the context of the transition to a microservice architecture and asynchronous messaging, especially in th...
Uloženo v:
| Vydáno v: | Программные системы и вычислительные методы číslo 3; s. 45 - 58 |
|---|---|
| Hlavní autor: | |
| Médium: | Journal Article |
| Jazyk: | angličtina |
| Vydáno: |
01.03.2025
|
| ISSN: | 2454-0714, 2454-0714 |
| On-line přístup: | Získat plný text |
| Tagy: |
Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
| Shrnutí: | The subject of this research is the development and analysis of a data structure and algorithm for managing parallel message execution in a microservice architecture without a message broker. In the context of the transition to a microservice architecture and asynchronous messaging, especially in the absence of a centralized broker, there is a need for effective methods to ensure the order of processing messages that affect shared resources. The problem lies in the fact that traditional methods, such as segmentation, do not guarantee compliance with the order of message processing during parallel execution and become more complicated when it is necessary to synchronize access to resources. As an alternative to traditional approaches, a method using a shared queue and a thread pool is being considered. The paper explores and proposes a data structure that provides the possibility of parallel message processing provided there are no lock conflicts, thereby ensuring the correct order of operations related to shared resources and avoiding mutual locks. The main goal is to create resource access control mechanisms adapted to the microservice architecture, without complicating the message processing logic and avoiding problems associated with multithreading. The paper uses an analytical approach to the development of a data structure and algorithm based on the formalization of the synchronization problem, as well as a theoretical analysis of the algorithmic complexity and correctness of the proposed solution. The scientific novelty of the work lies in the proposal of a new data structure using ordered sets and waiting lists for effective management of parallel processing of asynchronous messages in microservice architectures, especially where there is no message broker. The proposed algorithm allows to dynamically determine the locks associated with messages, as well as separate blocking and non-blocking messages, which makes it possible to execute them in parallel. The proposed data structure and algorithm make it possible to change the granularity of blocked resources without complicating message processing procedures, and simplify multithreaded programming by allowing each message processing procedure to be considered as single-threaded. The algorithm does not have the problem of mutual blocking of resources, which increases the overall fault tolerance of the system. The identified shortcomings related to resource blocking are proposed to be eliminated in further research. |
|---|---|
| ISSN: | 2454-0714 2454-0714 |
| DOI: | 10.7256/2454-0714.2025.3.72892 |