# Design and Analysis of an Efficient Energy Algorithm in Wireless Social Sensor Networks
## 6 Checkpointing and Recovery Algorithms
### Algorithm for Failure Recovery
In the distributed system, the performance indexes for measuring checkpoints mainly include the number of communication messages, storage overhead, recovery overhead and time for checkpointing coordination, so it can choose between coordinated or uncoordinated checkpointing according to the characteristics of application environment. However, there is no support for fixed networks and the kinds of resources are very limited in mobile ad hoc networks. For example, the wireless bandwidth is lower and the CPU capability is weak in mobile ad hoc networks, so the checkpointing technologies for this kind of network cannot only consider any index alone, and a trade off method which takes kinds of performance indexes (such as checkpoint time, rollback recovery time, storage space and number of additional messages) into account synthetically should be designed. Therefore, this paper designs a hybrid checkpointing model and algorithm which combines the synchronization with asynchronization technology. This hybrid checkpointing algorithm not only avoids the major cascade rollback among \(\text{MH}_{\text{s}}\) in the same cluster and too much message transmissions among the \(\text{MH}_{\text{s}}\) in different clusters, but also reduces communication delay. What is more, this hybrid model has little dependence on \(\text{CH}_{\text{s}}\), so it has good flexibility. Compared to the pure synchronous and asynchronous checkpointing strategy, this paper does plenty of performance tests for the hybrid checkpointing strategy. The results show that the hybrid checkpointing strategy is a good trade off method between the synchronous and asynchronous checkpointing strategy. What is more, it has shorter recovery time compared with the two methods. Our next work is to analyze the multicast communication protocols and kinds of routing protocols and then design a new checkpointing algorithm which is suitable to the multicast environment and adapts to the different routing protocols. To do so, the fault tolerance and reliability of ad hoc networks will be further improved. Figure 17: Impact of R on ACFM. **Acknowledgments:** This work is supported by The Fundamental Research Funds for the Central Universities (Grant No. YWF-14-YQGD-007) and The National Natural Science Fund (NSFC-61473022). The authors extend their appreciation to the International Scientific Partnership Program ISPP at King Saud University for funding this research work through ISPP# 0033. **Author Contributions:** For this article with several authors, [PERSON] developed the idea to use mode splitting for angular-rate sensing. [PERSON] and [PERSON] constructed the measurement model, carried out the simulations, and wrote the manuscript. [PERSON] and [PERSON] helped with the analysis of the rate equations. **Conflicts of Interest:** All authors declare no conflict of interest. ## References

* (1) [PERSON]; [PERSON]; [PERSON]; [PERSON] Fast and accurate near-duplicate image elimination for visual sensor networks. _Int. J. Distrib. Sens. Netw._**2017**, _13_. [CrossRef]
* (2) [PERSON]; [PERSON]; [PERSON] Efficient Algorithm for K-Barrier Coverage Based on Integer Linear Programming. _China Commun._**2016**, _13_, 16-23. [CrossRef]
* (3) [PERSON]; [PERSON] Distributed snapshots: Determining global state of distrubuted systems. _ACM Trans. Comput. Syst._**1985**, \(3\), 63-75. [CrossRef]
* (4) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] A lightweight multi-layer authentication protocol for wireless body area networks. _Future Gener. Comput. Syst._**2016**. [CrossRef]
* (5) [PERSON]; [PERSON] A Review of Current Multicast Routing Protocol of Mobile Ad Hoc Network. In Proceedings of the Second International Conference on Computer Modeling and Simulation, Sanya, China, 22-24 January 2010; pp. 207-211. * (6) [PERSON]; [PERSON]; [PERSON]; [PERSON] Temperature Error Correction based on BP Neural Network in Meteorological WSN. _Int. J. Sens. Netw._**2017**, _23_, 265-278. [CrossRef]
* (7) [PERSON] A min-process checkpointing protocol for deterministic mobile Ad hoc networks. _Int.