Larin V. Domain-specific approach to the actor systems.

Українська версія

Thesis for the degree of Doctor of Philosophy (PhD)

State registration number

0821U102140

Applicant for

Specialization

  • 113 - Математика та статистика. Прикладна математика

07-07-2021

Specialized Academic Board

ДФ 26.001.164

Taras Shevchenko National University of Kyiv

Essay

The thesis considers the types of parallel and distributed systems and their characteristics, in particular the models of actors and Map-Reduce, as universal models of parallel computations, with wide practical application. At the same time, it is shown that the actor model, although flexible and secure when working with data, it lacks effective ways of instant interaction - parallel writing or reading shared memory, which is an important feature not only for practical application, but as is also shown for a separate class of problems - stochastic global optimization, on the example of the problem of a swarm of particles. To introduce primitives of shared memory into the actor model, it is proposed to use a domain-specific approach – thus the syntax and grammar of the domain-specific language Strumok are defined. This language is a continuation of the ideas of visual (Visual Akka) and domain-specific (Flow) definitions of the actor model on the Akka framework. These models extended the basic actor model by defining an actor interaction interface. This interface defines a list of messages that can be processed by the actor - the so-called list of methods of the actor; strictly typed format of arguments of these methods; message format (return values) that can be created as a result of processing this message. This allows to perform a static type check in all interactions of actors at the stage of translation / compilation of visual or domain-specific language. In addition, the method calls and results in this model are abstracted - thus the individual actor becomes isolated from his external execution context, delegating the specific linking of the actor's methods to the higher-level actor. This mechanism makes it possible to compose many actors; allows to reuse already developed actors in other software systems. The Strumok hybrid model, in turn, extends the domain-specific actor model Flow by adding primitives of shared memory and asynchronous execution of methods. For each shared memory cell, the actor determines one of the possible modifiers of the way it is shared (usage intent): read-only, write-only, read-write. For variables that are only available for inter-actor sharing or writing, it is possible to define a separate area that will allow parallel read or write within the node without the need for inter-actor synchronization via messages, while on other nodes this area will be replicated in real time (replicated nodes will have a write delay, or lag time of the last available data to read, which will be the network delay time between two nodes in the network). For shared variables with a mixed usage modifier, additional level of abstraction introduced to ensure secure access to the shared data. Based on all read and write interaction of the mixed cell of shared data, a finite automaton is generated, which describes the states of the sub-actor in which the interaction with the cell of shared data is isolated. In this way, each mixed cell of shared data creates a finite set of secure areas for parallel writing or reading. But unlike the unidirectional case, in a mixed cell, each area can only execute a specific subroutine (set of operators). That is, those parts of the actor's program logic that fall into the area of a finite automaton are executed on a separate sub-actor with an isolated cell of shared memory. In the case of simultaneous overlapping areas, the sub-actor message queue is used to ensure the synchronization of the shared data cell. At the level of the syntax of the domain-specific Strumok language, each variable of the shared data is described by adding the modifier keyword. Depending on the selected modifier, the translator selects the desired model for representing this shared variable. It is important to note that the generated finite automaton for the representation of a common variable, allows in an asynchronous (non-blocking) style to control the execution of methods of all actors who are in the area of a mixed common data cell. That is, if multiple actors need to be synchronized to process a cell, their program threads will not be occupied, and the context of the current execution will be saved (closure is created) to continue processing after receiving the results of the computations on the shared variable. The thesis shows that such asynchrony can also be introduced for the interaction of different actors with each other, and thus allow in the actor method to freely call the methods of other actors with asynchronous awaiting of the results of their execution.

Files

Similar theses