## 5 Service Management in the Cloud Continuum
### Problem Formulation  
In this work, we followed the infrastructure provider perspective, which needs to find a deployment for the application components \(c\in C\) that maximizes their performance. The infrastructure provider needs to solve the following optimization problem:  
\[\operatorname*{arg\ max}_{C,D} f(x) \tag{8}\]where \(C\) represents the applications that need to be deployed, \(D\) is the set of devices where to allocate applications, and \(x\) is the service component deployment. Finally, the objective function \(f(x)\) is defined as follows:  
\[f(x)=\sum_{k=1}^{m}\Theta_{k}\times PSR(c_{k},x) \tag{9}\]  
where each \(\Theta_{i}\) component is a weight factor that identifies the criticality of a specific application \(c_{i}\in C\) and \(PSR(c_{i},x)\) is the percentage of satisfied requests for application \(c_{i}\) using configuration \(x\).  
It is worth specifying that it is the responsibility of the infrastructure provider to select proper values for the \(\Theta_{i}\) components, which represent the utility that an infrastructure provider gains for running a particular application component of type \(c_{i}\). Although it is a relatively simple approach, we believe that it could be reasonably effective to treat several service components with different priorities. Specifically, we envision the \(\Theta_{i}\) values to be fixed at a certain time \(t\). To maximize the value of (9), the infrastructure provider needs to improve the current service deployment configuration in a way that the percentage of satisfied requests of the most-important services is prioritized.  
To solve the above service management problem, we define a representation that describes how the instances of applications \(c_{i}\in C\) are deployed on device \(d\in D\). Therefore, we propose an array-like service configuration with integer values, which extends the one presented in [70] as follows:  
\[SC=\{X_{c_{1},d_{1}},X_{c_{2},d_{1}},\ldots,X_{c_{k-1},d_{n-1}},\ldots,X_{c_{k },d_{n}}\} \tag{10}\]  
where the value of the element \(X_{c_{i},d_{j}}\) describes the number of application components of type \(c_{i}\) that are allocated on device \(d_{j}\) for processing requests' application \(c_{i}\), \(n\) is the number of devices, and \(k\) the \(|C|\). Finally, to improve the readability of the problem formulation, we show in Table 2 a summary of the notation used.  
\begin{table}
\begin{tabular}{p{142.3 pt} p{142.3 pt}} \hline \hline
**Symbol** & **Description** \\ \hline PSR & Percentage of Satisfied Requests \\ \hline \(t\) & Time window in which requests are counted \\ \hline \(\mathbb{C}\) & Set of application components \\ \hline \(a_{res}\) & Fixed resource requirements of an application component (number of CPU/GPU cores) \\ \hline \(c_{i}\) & An individual application in set \(\mathbb{C}\) \\ \hline \(\mathrm{M/M/1}\) FCFS queue & Independent queue model for processing requests in First-Come First-Served fashion \\ \hline \(\mathbb{D}\) & Set of devices \\ \hline \(d_{i}^{k}\) & Individual device with type \(k\) (Cloud, Fog, Edge) \\ \hline \(D_{i}^{\prime\prime\prime}\) & Number of computing resources (CPU/GPU cores) for device \(d_{i}\) \\ \hline \(C\) & Applications that need to be deployed \\ \hline \(D\) & Set of devices where applications are allocated \\ \hline \(x\) & Service component deployment \\ \hline \(SC\) & Array-like service configuration \\ \hline \(X_{c_{i},d_{j}}\) & Number of components of type \(c_{i}\) allocated on device \(d_{j}\) \\ \hline \(n\) & Number of devices \\ \hline \(k\) & Cardinality of set \(\mathbb{C}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Summary of notation used for the service management problem.