# Research on SWIM Services Dynamic Migration Method +
## 4 SWIM Service Dynamic Migration Method
### Destination Node Selection Mechanism  
In order to guarantee the random selection of migration destination nodes and consider the needs of SWIM network security, the destination node selection algorithm adopts the strategy of combining optimal quality of service (QoS) index with the Brownian movement model. When the model is trigged by a pseudo-random sequence, the Brownian movement model is used to randomly select SP from migration cluster to provide SWIM services; when trigged by the time interval timeout, the SP is selected by the optimal QoS value to provide SWIM services. The SWIM core service can monitor the services provided by the SWIM service provider [8]. This paper uses the service quality value as the indicator for selecting the target node. The QoS evaluation index system is shown in Table 1.  
Capacity refers to the extent to which the SWIM service provider service is as described to the maximum extent of its description. As shown in Equation (2). \[C_{a}=1-\left(\frac{C_{ar}}{C_{as}}\right). \tag{2}\]  
Among them, \(C_{ar}\) is the number of times the SWIM subscribes to the SP in the actual running process, and \(C_{as}\) is the description of the service capacity when the SP service is registered. Time behaviour refers to the extent to which the response, processing time, and throughput of the SWIM service in performing its services meet the requirements described in its description. As shown in Equation (3). \[TB=1-0.5\times\left(\left(\frac{PT_{r}}{PT_{s}}\right)+\left(\frac{TP_{r}}{ TP_{s}}\right)\right), \tag{3}\] \begin{table}
\begin{tabular}{c c c} \hline
**Goal** & **Indicators** & **Description** \\ \hline \multirow{6}{*}{QoS} & capacity & limit the maximum number of the SC \\ \cline{2-3}  & time behaviour & the response and processing times and throughput rates \\ \cline{2-3}  & availability & reliability requirements under normal operation \\ \cline{2-3}  & fault tolerance & the ability to continue to complete a service despite a hardware or software failure \\ \cline{2-3}  & authenticity & the identity of a subject or resource can be proved to be the one claimed \\ \cline{2-3}  & confidentiality & ensure that data are accessible only to those authorized to have access \\ \cline{2-3}  & integrity & prevent unauthorized access to, or modification of data \\ \cline{2-3}  & non-repudiation & the events or actions cannot be repudiated later \\ \hline \end{tabular}
\end{table} 
Table 1: The quality of service (QoS) evaluation index system. Figure 7: SWIM service dynamic migration trigger mechanism process. Among them, \(PT_{r}\) represents the actual service response and processing time, \(PT_{s}\) represents the description of response and processing time when the service is registered, \(TP_{r}\) and \(TP_{s}\) represent actual throughput and describe throughput, respectively. Availability Av refers to the degree to which the service is required for reliability under normal operation. As shown in Equation (4). \[A_{v}=\frac{MTBF}{MTTR+MTBF}. \tag{4}\]  
Among them, \(MTBF\) is the average time between failures, and \(MTTR\) is the average recovery time. Fault-tolerant refers to the degree to which redundancy backup infrastructure guarantees tolerance even if there is a hardware or software failure and the service is still operating as expected. As shown in Equation (5). \[FT= \begin{cases}1&\text{$If$ there is a backup}\\ 0&\text{$If$ there is no backup}\end{cases} . \tag{5}\]  
Authenticity refers to the extent to which the identity of a topic or resource can be proven to be its claimed identity. As shown in Equation (6). \[A_{u}= \begin{cases}1&\text{$requires$ a certification}\text{ $for$ authentication}\\ 0&\text{$doesn^{\prime}t$ require a certification}\text{ $for$ authentication}\end{cases} . \tag{6}\]  
Confidentiality refers to the extent to which information access requires user authentication and communication encryption to ensure that data can only be accessed by authorized accesses. As shown in Equation (7). \[C_{on}=