Content area
The article presents the architecture of the mathematical software of a distributed computing system with open source code for smartphones based on Android OS, united into a common network infrastructure. Building ex-scale systems based on mobile devices is a complex scientific task, since such systems must be potentially infinitely scalable, fault-tolerant, and must allow for a guaranteed scalability assessment when solving a specific problem. The BOINC system is the most well-known infrastructure for personal volunteer computing. However, it also has a number of shortcomings that must be eliminated when building a distributed computing system based on mobile devices with ex-scale-class performance. The proposed architecture allows taking into account the reconfiguration of the network of computing devices and constructing a guaranteed scalability assessment for heterogeneous distributed mobile computing systems. The work focused on the application of the developed computing system to solve problems of the collision of white dwarfs and the explosion of a thermonuclear supernova.
INTRODUCTION
According to modern estimates, the number of smartphones in use is currently comparable to the population of the Earth, while the average time spent using a smartphone is limited to seven hours per day. Along with the high performance of mobile processors, today a distributed computing system based on all mobile devices allows achieving performance of about 10 ex-flops, which exceeds the total performance of all supercomputers in the Top 500 list. Thus, the most promising option for constructing a distributed computing system with potentially infinite scalability are systems based on mobile devices, united into a single mobile or satellite network infrastructure.
The construction of such ex-scale systems is a complex scientific task, since such systems must be potentially infinitely scalable, fault-tolerant, and must allow for the construction of a guaranteed scalability assessment when solving a specific problem. There are also a number of technological challenges: the use of a single software toolkit for different mobile device platforms, growing mobile traffic consumption, and limited network bandwidth.
In this paper, we focus on a distributed computing model based on a reconfigurable heterogeneous computing system of mobile devices aimed at solving optimization and inverse problems. The second section describes in detail the currently used approaches in distributed computing systems. The third section is devoted to the architecture of the distributed computing system and the issue of scaling. The fourth section is devoted to the use of the system for solving some applied and fundamental problems. The fifth section contains a conclusion.
APPLICATIONS OVERVIEW
Currently, distributed computing systems based on mobile devices use a wide variety of approaches. MPI-based systems that do not use the BOINC shell often have the same drawbacks related to scaling and further development:
for the phone to be part of a dynamic network, additional security measures are required, such as VPN;
static configuration of the device cluster;
additional manipulations with memory and access rights.
Note that such architecture can reveal the computing power of smartphones to a greater extent. However, the static configuration of the cluster and the need to obtain administrator rights on each phone used casts doubt on the possibility of adequate expansion (adding new devices) of such systems.
Cloud-based distributed systems offer essentially non-stop computing, largely independent of internet connection and battery life, by allowing computing to switch from a phone to an avatar in the cloud [4, 5]. However, this raises the question of the feasibility of using such a complex system in distributed scientific computing if the data for the calculations is not generated directly by the mobile devices themselves or is not distributed among the devices in advance. It is also difficult to determine the feasibility of using a smartphone for calculations when everything can be transferred to the cloud, given its constant availability and more powerful resources.
The general concept of a distributed computing system based on mobile devices with a client-server architecture is quite common [6–9]. The system often consists of a server part implementing data storage, task management algorithms and resource allocation, and a mobile client for the Android operating system responsible for executing the selected task and sending the result back to the server. General requirements for the system developed over the years, as well as the concept of interaction between the mobile client and the server, allow us to take into account many nuances of the system’s operation. Such systems are often written immediately for a specific platform, or for several platforms, organizing work with the server through API.
The BOINC system is the most well-known infrastructure for personal volunteer computing. Currently, the BOINC implementation for Android is installed and running on tens of thousands of devices. There are also currently wrappers for BOINC for C/C++, Java, and Python. BOINC requires a central manager for deployment. Each time you create a project in BOINC, you need to deploy the application and configure different versions inside it for different types of clients, such as Windows x86, Linux x86, and Android ARM.
BOINC provides an API defined in C/C++ to operate. The API contains methods that a task must execute to start and finish its execution, report progress, access input and output files, and report errors. For a task to run on the BOINC platform, it must use the API or wrappers. If wrappers are available for a given platform, there is no need to rewrite applications to insert BOINC calls. BOINC, like any system, has its shortcomings that must be addressed when building a distributed computing system based on mobile devices with exascale-class performance. Compared to the author’s system, BOINC has the following shortcomings:
Accessibility of projects for mobile devices. The work focuses on Android;
The operation of the computing system in Android 9+. Occurs due to inconsistency with Android security policy;
Network port handling and memory addressing in Android 10+. Occurs due to inconsistency with Android network interface API and rare software updates;
Limited support for various accelerators and instruction sets. The author’s client application can use any type of accelerator, including GPU, as well as an extended SIMD instruction set;
Project security due to task scheduler centralization. The author’s client application is distributed through stores such as ‘‘Google Play’’ with mandatory verification;
Adding new users (computing devices). Unlike the complex setup in the BOINC system, in the author’s development it is enough to install the client application and select a project from the list;
Creating a new project. In the author’s development, it is enough to add the client application to the store and make minimal adjustments to the server operation;
Web application support. The author’s client application is implemented in the Kotlin language, which allows it to be potentially used as a web application;
Lack of scalability assessment. For the author’s system, an assessment of scalability up to the exaflop class has been developed;
Uncontrolled use of user resources. The author’s application is implemented taking into account resource restrictions from Android;
Client application performance. The client procedure in BOINC is transferred from the server and interpreted. In the author’s system, the client code is compiled;
Energy efficiency. Achieved through a combination of uncontrolled resource loading properties and client application performance.
Table 1 briefly presents comparative characteristics of the BOINC system and the author’s system.
Table 1. Comparison of the author’s system and the BOINC system
Characteristic | BOINC System | Author’s system |
|---|---|---|
Accessibility of projects for mobile devices | Partially | Yes |
Functioning of the computing system in Android 9+ | Partially | Yes |
Working with network ports in Android 10+ | Limited | No restrictions |
Memory Addressing in Android 10+ | Limited | No restrictions |
Support for accelerators and instruction sets | GPU | No restrictions |
Project security due to centralization of the task scheduler | Not available | Available |
Adding new users (computing devices) | Complex | Trivial |
Creating a new project | Complex | Trivial |
Web application | No | Partially |
Scalability assessment | No | Yes |
Fault tolerance and correctness of the result | Yes | Yes |
Uncontrolled loading of user resources | Yes | No |
Client application performance | Low | High |
Energy efficiency | Low | High |
The development of BOINC and similar systems demonstrates not only the extreme relevance of the development of computing systems of similar architectures, but also the absence of a universal way to build such systems. Currently, researchers are in the process of searching for optimal architectures. This search is complicated by problems of both fundamental and technological nature.
ARCHITECTURE OF A DISTRIBUTED MOBILE COMPUTING SYSTEM
The DHCA system we offer has a client-server architecture and is tailored for the Android system. The mobile client is written using the latest Android approaches to background computing, which allows for increased productivity and improved end-user security. The system takes into account all the features of the client-server architecture interaction for distributed systems, and also solves the problem associated with the unavailability of computing nodes by automatically redistributing tasks. The Task-Based Execution Model approach allows for a reduction in the amount of information transferred between the server and the node, which in turn increases overall productivity. Open source code increases the trust in the system on the part of end users, which can have a positive effect on the number of active computing participants. The conceptual diagram of the model is presented in Fig. 1.
[See PDF for image]
Fig. 1
Scheme of the problem-oriented model of task execution.
The model is based on the decomposition of a general problem into a set of small similar sub-problems that differ in the set of input parameters. Such sub tasks, despite the simplicity of parallel implementation, cover a wide variety of applications: the classic problem of aircraft engine optimization [10], solving the inverse problem of reconstructing a star profile from the observed remnant of a supernova explosion [11] and developing a framework for solving hydrodynamic problems based on adaptive grids [12]. Each task is characterized by a set of input parameters for some functionality pre-installed on mobile devices. When the next sub task (set of input parameters) arrives, they are sent to the first freely available device. Figure 1 uses the concept of a container as a task formed for calculation, that is, at the moment of packaging into a container, the application installed on the mobile device receives a set of input data and sends them for execution on the mobile device. The result of the task execution (output data) is returned back. It is important to note that the logic of the task scheduler is not limited in any way, i.e., after receiving a certain set of results, the task list can be modified and tasks from the new list will be sent for calculation. In this way, we can extend the system to calculations of iteration and non-stationary processes with the appropriate discretization.
Web Client Architecture
This section describes the implementation of the DHCA system web client. The main functional capabilities of the web client part of the system are as follows:
display of running and completed distributed computing tasks;
creating distributed computing tasks;
loading initial task parameters;
checking for errors in loaded conditions;
tracking the progress of calculations;
unloading results.
The web client is a web application consisting of three HTML forms:
general task table;
form for entering a new task;
form for viewing a task in detail.
The interface is implemented using the JavaScript library jQuery, which allows you to send requests and receive data from the server in asynchronous mode. Interaction with the server is carried out via HTTP requests REST API, written in PHP. The web client is a closed segment of the system with limited access, and is intended for use only by competent, trusted employees. The general diagram of the system’s operation sequence can be seen in Fig. 2.
[See PDF for image]
Fig. 2
System sequence diagram.
Server Architecture
The DHCA system server is a web server with PHP support, with a connected MySQL database. The main functional capabilities of the server part of the system are:
entering project data into the database;
storing project data;
providing project data;
dividing initial information into computational blocks;
storing data on the results of block calculations;
registering mobile clients in the system;
authorizing mobile clients in the system;
distributing computational blocks among mobile clients;
sending informational messages to mobile clients;
combining and providing computational results.
Thanks to the modular architecture of the API used, any relational DBMS that supports the structured query language SQL can be connected to the system. The database class written in PHP is responsible for connecting the database and processing requests. To change the DBMS, it is enough to replace this class, leaving the main functions used. Also, to change the DBMS, the database table scheme must match.
The API functions for the web client are intended for user interaction with the database via the client’s web interface. They include functions that are Map and Reduce implementations of the MapReduce pattern. The Map implementation contains a function for dividing the input data into computational blocks depending on the task type and input parameters. It acts as the initial link of the Map, dividing the original array, but does not participate in its further distribution. The result of the function is an associative array, each element of which contains coordinates and the block size–size. The length of the array is equal to the number of computational blocks of the task. Each element of this array is written to the server database with a unique key consisting of the task identifier and the block ordinal number; in the future, these elements act as the main sources of computational block parameters for the mobile nodes participating in the calculations, along with the original task parameters.
The Reduce method returns the result of solved tasks by combining solved blocks. It receives the project identifier in the database and its type as input. Depending on the type, the combination can occur in different ways.
The API functions for the mobile client are designed for user interaction with the database via the Android application interface. The main functionality of this API is:
registration of mobile clients in the system;
authorization of mobile clients in the system;
distribution of computing blocks among mobile clients;
sending out information messages to mobile clients;
providing data on projects.
Includes functions that are a continuation of the implementation of the Map paradigm, providing dynamic distribution of computing blocks among clients. When called, selects a random block from a limited set of available blocks. Available blocks are those that are not reserved for any user. If a free block exists, it is assigned to the user and sent to him for processing. If there are no free blocks, then the next iteration occurs, where it is checked whether there are blocks without a calculation result. If there are no such blocks, the project is assigned the status ‘‘Completed.’’ If there are such blocks, then the time of sending the block to the client is checked. If after a certain time the result has not entered the database, the system reserves this block for a new user and sends it to him for processing. The entire algorithm is repeated until the project is completed or the client stops the calculations on his device.
An important feature is the fact that this algorithm implements ReMap, which makes this system reliable by redistributing blocks from inaccessible nodes between accessible devices.
Client Architecture
The mobile client is an application installed on a smartphone running the Android operating system version 6.0 (Marshmallow) and higher. The client is written in Kotlin using the MVVM design pattern. Mobile clients are the main computing nodes of the system, where all the main data processing occurs. The main functional capabilities of this block of the system are as follows:
registration in the system;
authorization in the system;
displaying information about available and solved projects;
data caching;
calculation of computing blocks in the background.
The user’s work with the Android application at the first launch begins with the registration window in the system. During registration, the user enters the login and password under which further work will be carried out. When selecting a specific task, a window opens with detailed information about the task: name, type, short description, status, percentage of completed blocks. If the task is not in the ‘‘Completed’’ status, then the ‘‘Start’’ button will be available in the detailed window. It is worth noting that if the user clicked the ‘‘Start’’ button in the absence of an Internet connection, then Work Manager will start the calculations automatically as soon as the connection appears. CoroutineWorker is Class in Android allows you to run processes in a thread-safe mode using Kotlin Coroutines.
If there is no internet connection, sending of results is interrupted until the connection is restored. The loop continues to run until the server returns free blocks, or until the user stops or reduces the calculation by clicking the ‘‘Finish calculations’’ button. To save device resources, when refusing to perform calculations, the local database is cleared of the blocks of this project. When the results arrive at the server, the server checks each time whether there are still calculation blocks for which there is no result; if there are no more such blocks, the task is considered completed. In the server database, the project status changes to ’’Completed’’, and an information message is sent to all mobile clients that participated in its calculations. When this message is received in the local client database, the project status also changes, and the functional buttons become unavailable; also, to save device resources, the local database is cleared of the blocks of this project.
Guaranteed Assessment of System Scalability
Taking into account the presented architecture, we will give an assessment of the system scalability. We assume that to calculate the system operation time, we only need to know the following values: is time required to calculate one block of data; is number of blocks to be calculated; is number of devices participating in the calculation. Then, denoting the system’s operating time as , in ideal form we obtain the following formula
In a real model, we need to take into account a few more parameters: is time required for the initial splitting of the source data into computational blocks; is time to write the initial blocks to the database after splitting; is time required for the client to receive one block of data from the server (send); is time required for the server to receive the calculated block of data from the client (receive); is time required to write the result of the calculated block to the database (save).
We get the calculation time on devices
Let’s write the acceleration
For positive values of all parameters and for , the function defined by the formula has the following properties:
For positive values of all parameters and for , the function defined by the formula has the following properties
The essence of the formula is the number of mobile devices at which maximum acceleration is achieved.
The scalability assessment was verified on a simulation modeling system. During the experiment, the problem of collision of white dwarfs was solved, the details of which will be described further in the next formulation. There are —the number of independent tasks. The task takes 5 real numbers as input and returns one real number as output. We will solve these tasks using a network of mobile devices. Each device processes only one task at a time. The tasks are processed sequentially, each device randomly selects a task from the common pool that has not yet been solved and is not occupied by anyone, assigns it to itself and after processing transfers it to the pool of solved ones. And so on until all tasks are transferred to the pool of solved ones. will be equal to . Let be the average time of solving one task. We will consider three variants of task complexity: s (Large), s (Middle), s (Small). Let be the average time of computation decomposition. This is some constant time for initializing the task database, independent of the number of tasks and mobile devices, let us take it equal to 50 seconds. Next, we need to write the input (before the calculations) and output (after the calculations) parameters of each independent task to the database. Let’s denote these times as —the average time to write (1 ms) the input data of the task and —the average time to save (0.3 ms) the result of the calculations to the database. These times are spent on each of the tasks. Now we must transmit data over the mobile network to each device for the calculation and receive the calculated data from each device of the mobile network. Let’s denote these times as —the average time to send (100 ms) data to devices and —the average time to receive (20 ms) data from devices. These times are spent on sending/receiving to/from each mobile device.
The results are shown in Fig. 3a for complexity s, in Fig. 3b for complexity s, and in Fig. 3c for complexity s. The acceleration obtained on the simulation model (dark line) was compared with theoretical calculations using the formula (light line).
[See PDF for image]
Fig. 3
Comparison of accelerations for task complexity (a) , (b) , and (c) s.
The obtained results show that in all cases the theoretical and practical maximums differ by no more than 6%. Based on the experiments conducted using the simulation model, we can conclude that the calculation time estimate, acceleration, and the number of mobile devices at which the maximum acceleration is achieved quantitatively correspond to the results obtained using the simulation model. Thus, we conclude that the guaranteed scalability assessment of a distributed computing system has been successfully verified.
USING THE SYSTEM TO SOLVE TEST AND APPLIED PROBLEMS
To demonstrate the robustness of the developed system, the focus was on solving the problem of white dwarf collisions with the subsequent explosion of a thermonuclear supernova and the problem of interaction of relativistic wind from the active core of galaxies with molecular clouds. In the formulations of these problems, each elementary sub task has a different load on the processor and on the network infrastructure:
1) The problem of white dwarf collision, which is formulated in a one-dimensional statement and is characterized by the transmission of only six values to describe the state of the dwarfs before the collision and one output value describing the maximum temperature during the collision. The calculation time is comparable to the data transmission time. The problem has an analytical solution that requires the resolution of nonlinear equations and is described in detail in [13].
2) The problem of interaction of relativistic wind with molecular clouds is of interest due to the large number of observations obtained in recent years [14]. A special feature of the problem is that the problem itself is solved in a three-dimensional domain using adaptive grids [15], which allows even mobile processors to be used for calculations. At the same time, the number of transmitted parameters is limited to several values, which are given in the work [14].
Below we will give the details of the solution of the tasks. The problems related to the evolution of the material of white dwarfs are described in detail in the works [13, 16], therefore, when describing them, a brief formulation and the main result will be given, which was obtained by analyzing the multiple solution of the problems using the developed system. For the problem of the interaction of the wind with the cloud, we will analyze the picture of the development of instability.
White Dwarf Collision
The problems are characterized by a small amount of transmitted data (temperature and velocity of white dwarfs), a small amount of returned data (percentage of carbon burned), and a variable amount of computation (depending on the resolution of the 1D computational grid). The one-dimensional formulation of the problem of the central collision of white dwarfs consists in considering the problem of the decay of a discontinuity—a collision of two waves with given parameters of density, temperature, and velocity. An analytical solution to the problem of the decay of a discontinuity using the stellar equation of state is given in [13].
Figure 4 shows the phase plane —the collision velocity and minimum temperature of the white dwarf, in which the regions of explosions of thermonuclear supernovae of different types are marked, separated by a dotted line.
[See PDF for image]
Fig. 4
Phase plane of initial parameters for the explosion of different types of thermonuclear supernovae.
Astrophysical Application
For numerical modeling of Ram-Pressure mechanism of Wind-Cloud interaction we will use the following non-dimensional parameters: , , , , , and . Taking into account the density of the cloud and the flat front, we have a density ratio of the order of twenty, which corresponds to the problem of the collision of two model clouds from the work [17] with the development of Kelvin–Helmholtz type instability. We exactly see this after the front passes in the Fig. 5. Let us estimate the development time of instability using the equation
where because we have only one perturbation by cloud on radius of cloud and .
[See PDF for image]
Fig. 5
The Density for Time is equal to 0 (a), 5 (b), 10 (c), 15 (d), 25 (e), 30 (f).
One can be sure that at the time of order of after the wave of wind density pass through cloud we can observe charctable unstable flow picture. Such a time corresponds to the time of the the Kelvin–Helmholtz instability evolution and to the time of wave propagation.
CONCLUSIONS
The architecture of a distributed computing system based on a multitude of mobile devices united into a common network infrastructure is presented. The distributed computing system is based on a problem-oriented model of task execution. The limitation of the ‘‘lifetime’’ of the device imposes requirements not only on scalability, but also on the integrity of the computing system. The architecture proposed in the work allows us to take into account the reconfiguration of the network of computing devices and build a guaranteed estimate of the scalability of a distributed heterogeneous computing system.
FUNDING
This work was supported by the Russian Science Foundation (project 23-11-00014). https://rscf.ru/project/23-11-00014/.
CONFLICT OF INTEREST
The author of this work declares that he has no conflicts of interest.
Publisher’s Note.
Pleiades Publishing remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
AI tools may have been used in the translation or editing of this article.
REFERENCES
1 Iu. Virtejanu, ‘‘Costica Nitu Programming distributed applications for mobile platforms using MPI,’’ U. P. B. Sci. Bull. 75 (4) (2013).
2 Attia, D. E.; ElKorany, A. M.; Moussa, A. S. High performance computing over parallel mobile systems. Int. J. Adv. Comput. Sci. Appl.; 2016; 7, pp. 99-103.
3 F. Busching, S. Schildt, and L. Wolf, ‘‘DroidCluster: Towards smartphone cluster computing—the streets are paved with potential computer clusters,’’ in Proceedings of the 32nd International Conference on Distributed Computing Systems Workshops (2012), pp. 114–117.
4 M. Armbrust, A. Fox, R. Griffith, A. D. Joseph, R. H. Katz, A. Konwinski, G. Lee, D. A. Patterson, A. Rabkin, I. Stoica, et al., ‘‘Above the clouds: A Berkeley view of cloud computing,’’ Technical Report UCB/EECS-2009-28 (EECS Dep., Univ. of California, Berkeley, 2009).
5 Buyya, R.; Yeo, Ch. Sh.; Venugopal, S.; Broberg, J.; Brandic, I. Cloud computing and emerging IT platforms: Vision, hype, and reality for delivering computing as the 5th utility. Future Generation Comput. Syst.; 2009; 25, pp. 599-616. [DOI: https://dx.doi.org/10.1016/j.future.2008.12.001]
6 M. Prem Kumar, R. R. Bhat, S. R. Alavandar, and V. S. Ananthanarayana, ‘‘Distributed public computing and storage using mobile devices,’’ in Proceedings of the 2018 IEEE Conference on Distributed Computing, VLSI, Electrical Circuits and Robotics DISCOVER (2018), pp. 82–87.
7 Nizamov, N. R.; Shahova, I. S. Mechanisms for using mobile devices in distributed computing. Russ. Dig. Libr. J.; 2019; 22, pp. 200-213. [DOI: https://dx.doi.org/10.26907/1562-5419-2019-22-4-200-213]
8 Fadlallah, G.; Mcheick, H.; Rebaine, D. Layered architectural model for collaborative computing in peripheral autonomous networks of mobile devices. Proc. Comput. Sci.; 2019; 155, pp. 201-209. [DOI: https://dx.doi.org/10.1016/j.procs.2019.08.030]
9 Y. Arslan Mustafa, ‘‘Computing while charging: Building a distributed computing infrastructure using smartphones,’’ in Proceedings of the 8th International Conference on Emerging Networking Experiments and Technologies (2012), pp. 193–204.
10 Pratt, T. K.; Seitelman, L. H.; Zampano, R. R.; Murphy, C. E.; Landis, F. Optimization applications for aircraft engine design and manufacture. Adv. Eng. Software; 1993; 16, pp. 111-117. [DOI: https://dx.doi.org/10.1016/0965-9978(93)90056-Y]
11 Kabanikhin, S. I.; Kulikov, I. M.; Shishlenin, M. A. An algorithm for recovering the characteristics of the initial state of supernova. Comput. Math. Math. Phys.; 2020; 60, pp. 1008-1016.4130175 [DOI: https://dx.doi.org/10.1134/S0965542520060135]
12 Stone, J.; Tomida, K.; White, C.; Felker, K. The Athena++ adaptive mesh refinement framework: Design and magnetohydrodynamic solvers. Astrophys. J. Suppl. Ser.; 2020; 249, 4. [DOI: https://dx.doi.org/10.3847/1538-4365/ab929b]
13 Kulikov, I. M.; Chernykh, I. G.; Tutukov, A. V. Mathematical modeling of a high-speed collision of white dwarfs-the explosion mechanism of type Ia/Iax supernovae. J. Appl. Ind. Math.; 2022; 16, pp. 80-88.4461397 [DOI: https://dx.doi.org/10.1134/S1990478922010070]
14 Sotomayor, P.; Romero, G. E. Nonthermal radiation from the central region of super-accreting active galactic nuclei. Astron. Astrophys.; 2022; 664, A178. [DOI: https://dx.doi.org/10.1051/0004-6361/202243682]
15 Kulikov, I. Using adaptive mesh refinement technique for numerical modeling of relativistic jets. Lobachevskii J. Math.; 2024; 45, pp. 60-66.4751924 [DOI: https://dx.doi.org/10.1134/S1995080224010293]
16 Kulikov, I. M.; Chernykh, I. G.; Ulyanichev, I. S.; Tutukov, A. V. Mathematical simulation of nuclear carbon burning in white dwarfs using a 7-isotope reaction network. J. Appl. Ind. Math.; 2022; 16, pp. 440-448. [DOI: https://dx.doi.org/10.1134/S1990478922030085]
17 Kulikov, I. GPUPEGAS: A new GPU-accelerated hydrodynamic code for numerical simulations of interacting galaxies. Astrophys. J. Suppl. Ser.; 2014; 214, 12. [DOI: https://dx.doi.org/10.1088/0067-0049/214/1/12]
© Pleiades Publishing, Ltd. 2025.