Abstract:
This article discusses an innovative algorithm designed for efficient blocking of access to
shared resources in microservices. The main feature of this algorithm lies in unifying the processes of
resource blocking and operation execution in multithreaded microservices with a hierarchical structure of
shared resources. The use of this algorithm significantly simplifies the development of a resource locking
system and allows the customization of the level of detail in the blocked resources according to the
requirements imposed on the processed microservice messages. One major advantage of the algorithm is
the ability to block access to multiple resources without the risk of thread deadlock. This ensures
reliability and security in message processing by microservices, especially in cases where simultaneous
access to multiple shared resources is required. The research results demonstrate that the proposed
algorithm can significantly improve the efficiency of resource locking systems in a microservices
architecture, reduce the likelihood of errors, and simplify software development. In the long term, the use
of this algorithm can contribute to enhancing the performance and reliability of distributed systems based
on microservices.