# Efficient Actor Recovery Paradigm for Wireless Sensor and Actor Networks
## 4 Problem Statement and Optimized Deterministic Actor Recovery System Model
### Optimized Deterministic Actor Recovery System Model
Depending on RSSI value (extracted from mathematical model), the non-critical node with the least node degree is preferred to be chosen as a backup node. In case there is more than one neighbor with the same node degree, the neighbor with the least distance is preferred. For each critical actor, a pre-assigned backup actor node is selected which is called Critical Backup Nodes CBN. Consequently, CBN monitors its critical node through heartbeats messages and handles the backup process in case the failure of its critical node. Missing a number of successive heartbeats messages at CBN indicates the failure of the primary. The topology of the WSAN can be changed during the network lifetime due to the mobility feature of actors, actor node failure, or event handling. Backup nodes are subject to failure as well. Therefore, there are primary backup nodes that select other backup nodes in case of primary backup nodes fail or move beyond the range of ND. To ensure the effectiveness and availability of backup node, we introduce novel backup node selection process in case of primary backup is either failed or in critical condition given in Algorithm 1. Algorithm 1 shows the backup selection process. In this process, the condition of primary backup \(P_{b}\) node is checked. If a primary backup node is in critical condition or ready to move, then a secondary backup node \(S_{b}\) is chosen. However, if a secondary backup node \(S_{b}\) is in critical condition or ready to move, then tertiary backup node \(T_{b}\) is notified to play a role as primary backup node. If the tertiary backup node is in critical condition then the backup assignment algorithm executes and a backup node is assigned. Since actor nodes are rich-resource nodes, we further use the least square approximation formulation to identify the power strength. This involves little computational overhead which can be easily attuned in an actor so that we identify the power strength because there is a probability of the node to mislay the power at some particular time. ```
\(P_{p}\): Primary Backup; \(Pb_{C}\): Critical Primary Backup; \(Pb_{m}\): Moving Primary Backup; \(S_{b}\): Secondary Backup; \(Sb_{C}\): Critical Secondary Backup; \(Sb_{m}\): Moving Secondary Backup; \(T_{b}\): Tertiary Backup. 1.Input (\(P_{p}\))
2.Output (\(S_{b}\), \(T_{b}\))
3.If\(P_{b}=Pb_{C}\ \mid\ \mathit{Pb}_{m}//\)The condition of primary backup node is checked. 4.Notify \(S_{b}\) and Set (\(S_{b}\), \(P_{b}\))//Secondary backup node is assigned as primary backup node
5.endif
6.If\(S_{b}==S_{C}\ \mid\ \mathit{Sb}_{m}//\)The condition of Secondary backup node is checked. 7.Notify \(S_{b}\) and Set (\(S_{b}\), \(P_{b}\))//Tertiary backup node is notified to play a role as primary backup node
8.endif
```  
**Algorithm 1**Backup Node Selection Process  
We use node monitoring process to monitor the node pre-failure causes, the post-failure causes and allocates the recovery options. Once each critical actor node picks a suitable backup, then it is informed through regular heartbeat messages (Special signals are sent to neighbor node to play a role as backup node for critical node). Furthermore, the pre-designated backup initiates monitoring its primary actor node through heartbeats. If a number of consecutive heartbeats are missed from the primary actor, then it notifies that the primary actor failed. Thus, a backup node replacement process is started as given in algorithm 1. Before substantiating the post failure process, we must ensure that connection is not interrupted because of the network. In addition, any redundant action of the network must be controlled to avoid any possible increase of the network overhead. The pre-failure backup node process is given in Algorithm 2.