DDR-coin: An Efficient Probabilistic Distributed Trigger Counting Algorithm
Abstract
:1. Introduction
- Message complexity: the total number of exchanged messages among the nodes. For efficiency, this should be low.
- MaxMsgLoad: the maximum number of exchanged (i.e., sent and received) messages in each node. For even distribution of load, this should be low.
- MaxRcvLoad: the maximum number of received messages in each node. For even distribution of load, this should be low.
2. DDR-coin Algorithm
2.1. System Model and Objectives
- When w or more than w triggers occur, the system has a very high probability of raising an alarm. (In other words, the failure probability is negligible.)
- When the system raises an alarm, the probability that the number of triggers is less than w is 0 (i.e., no false positives).
- The average message complexity is .
- The average MaxRcvLoad is .
2.2. Overall of DDR-coin
2.3. Tree-Like Structure
2.4. DDR-coin Algorithm
- (Coin generation routine) Recall that all n nodes are associated at leaf-level (level-h). When a node detects a trigger, it generates a coin message with the probability of , where is the number of not yet received triggers at the beginning of round i. (Initially ) This coin message is sent to the randomly-selected node at level-(h-1).
- (Coin propagation routine) The coin messages are propagated from leaves in the tree-like structure to the root. Eventually, the node for the root vertex detects that n coins have been generated at the leaf-level.
- (End-of-round procedure)n nodes count the number of generated triggers up to now (using the spanning tree). If the number of not yet detected triggers is greater than n, a new round starts by going back to the coin generation routine again (Step 1). Otherwise, it goes to the final round procedure (Step 4).
- (Final round procedure) It counts the remaining triggers (the number of which does not exceed n). Then, it raises an alarm.
2.4.1. Coin Generation Routine
2.4.2. Coin Propagation Routine
- If a coin arrives and is not full (i.e., some entries are false), one entry with false is changed to true.
- Suppose that has received coins. When a new coin arrives at , now becomes full (i.e., all entries are true). sends a full-coin to its parent. Then, the parent node of sets the j-th entry of as true where is j-th child, e.g., in Figure 3, when a new coin is sent to node-8, a full-coin is sent to node-4 and node-4. is set true. If the parent’s array now also becomes full, the full-coin is sent to the grandparent. This work can be repeated until the level-0.
- If a coin arrives at where are already all true, sends an overflow-coin to the randomly chosen node at the upper level. After receiving this, finds a subtree j where is false. This means the corresponding subtree is not fully filled with coins. (If not found, i.e., full, sends this coin to randomly selected node of ’s upper level.) sends overflow-coin down to the root of j-th subtree. In this way, the overflow-coin is going down again and it is eventually sent down to the node at level--1) and puts this coin in the array : false value in the entry is changed to true, e.g., when a new coin is sent to node-2 of Figure 3, because node-2. is already full, the new overflow-coin is sent to a randomly selected node in its upper level, e.g., in Figure 3, there is only node-4 in the upper level of node-2, and the overflow-coin is sent to node-4. In Figure 3, node-4 knows that node-2 is full with 3 coins as node-4. is true, and node-5 and node-8 have rooms for another coins. node-4 forwards overflow-coin to node-5. After node-5 receives the forwarded overflow-coin, node-5.
2.4.3. End-of-Round Procedure
2.4.4. Final Round Routine
3. Analysis
3.1. Failure Probability
3.1.1. Failure Probability for each Round
3.1.2. The Average Number of Rounds
3.1.3. Failure Probability and Success Probability
3.2. False Positive Probability
3.3. Message Complexity
- (i)
- The number of coins (=), which are predistributed in the nodes at level--1) in advance.
- (ii)
- The average number of generated coins from the n leaf nodes at level-h.
- (iii)
- The average number of overflow-coin messages.
- (iv)
- The number of full-coin messages.
- (v)
- The number of trigger-aggregation messages at the end-of-round procedure.
3.4. MaxRcvLoad
- (i)
- The number of predistributed coins.
- (ii)
- The number of generated coins from the n leaf nodes at level-h.
- (iii)
- The number of overflow-coin messages.
- (iv)
- The number of full-coin messages.
- (v)
- The number of trigger-aggregation messages at the end-of-round procedure.
4. Experimental Results
4.1. Prototype Implementation
4.2. Comparison of Simulation Results with Mathematical Analysis
4.3. Comparison with Previous Work
4.4. Discussion
5. Related Work
6. Conclusions
Author Contributions
Funding
Conflicts of Interest
Appendix A
- Initial condition: . The tree-like structure is shown in Figure 1.
- Round 1 starts:
- –
- (Section 2.4.1:) .
- –
- (Section 2.4.2:) coins are pre-distributed at level-1, which is shown in Figure 3. As node-2 has 3 coins, its array, , is full and a full-coin is sent to the root (node-4).
- –
- (Section 2.4.1:) Note that in Round 1, for each detected trigger, a coin is generated with the prob. of .
- –
- (Section 2.4.1:) Suppose that all nodes have detected 9 triggers, which implies that a coin is generated and sent to level-1, e.g., node-5.
- –
- (Section 2.4.1:) Suppose that all nodes have detected 9 triggers, which implies that a coin is generated and sent to level-1, e.g., node-8. Now, node-8’s array, , is full, so a full-coin is sent to node-4 (Section 2.4.2).
- –
- (Section 2.4.1:) Suppose that all nodes have detected 9 triggers, which implies that a coin is generated and sent to level-1, e.g., node-2. Since node-2 is already full, an overflow-coin is sent to node-4 (Section 2.4.2). This coin is forwarded to node-5. After receiving this coin, node-5’s array, , is now full. Hence, a full-coin is sent to the root, node-4.
- –
- The root, node-4, has received 3 full-coins and its array, , is full. (Section 2.4.2:) Therefore, node-4 initiates the end-of-round procedure.
- –
- In End-of-round procedure (Section 2.4.3), the root knows that in Round 1, triggers have been detected. . It goes to Round 2.
- Round 2 starts:
- –
- (Section 2.4.1:) .
- –
- (Section 2.4.2:) coins are predistributed at level-1, which is shown in Figure 3. As node-2 has 3 coins, its array, , is full and a full-coin is sent to the root (node-4).
- –
- (Section 2.4.1:) Note that in Round 2, for each detected trigger, a coin is generated with the prob. of .
- –
- (Section 2.4.1:) Suppose that all nodes have detected 6 triggers, which implies that a coin is generated and sent to level-1, e.g., node-5.
- –
- (Section 2.4.1:) Suppose that all nodes have detected 6 triggers, which implies that a coin is generated and sent to level-1, e.g., node-8. Now, node-8’s array, , is full, so a full-coin is sent to node-4 (Section 2.4.2).
- –
- (Section 2.4.1:) Suppose that all nodes have detected 6 triggers, which implies that a coin is generated and sent to level-1, e.g., node-2. As node-2 is already full, an overflow-coin is sent to node-4 (Section 2.4.2). This coin is forwarded to node-5. After receiving this coin, node-5’s array, , is now full. Therefore, a full-coin is sent to the root, node-4.
- –
- The root, node-4, has received 3 full-coins and its array, , is full. (Section 2.4.2:) Hence, node-4 initiates the end-of-round procedure.
- –
- In End-of-round procedure (Section 2.4.3), the root knows that in Round 1, triggers have been detected. . It goes to Round 3.
Appendix B
References
- Chakaravarthy, V.; Choudhury, A.; Sabharwal, Y.; Garg, V. An Efficient Decentralized Algorithm for the Distributed Trigger Counting Problem. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6522, pp. 53–64. [Google Scholar]
- Chakaravarthy, V.T.; Choudhury, A.R.; Sabharwal, Y. Improved algorithms for the distributed trigger counting problem. In Proceedings of the 25th IEEE International Parallel & Distributed Processing Symposium, Anchorage, AK, USA, 16–20 May 2011; pp. 515–523. [Google Scholar]
- Garg, R.; Garg, V.K.; Sabharwal, Y. Efficient algorithms for global snapshots in large distributed systems. IEEE Trans. Parallel Distrib. Syst. 2010, 21, 620–630. [Google Scholar] [CrossRef]
- Chandy, K.M.; Lamport, L. Distributed snapshots: Determining global states of distributed systems. ACM Trans. Comput. Syst. 1985, 3, 63–75. [Google Scholar] [CrossRef]
- Lai, T.H.; Yang, T.H. On distributed snapshots. Inf. Process. Lett. 1987, 25, 153–158. [Google Scholar] [CrossRef]
- Mattern, F. Efficient algorithms for distributed snapshots and global virtual time approximation. J. Parallel Distrib. Comput. 1993, 18, 423–434. [Google Scholar] [CrossRef]
- Akanbi, A.; Muthoni Masinde, M. A Distributed Stream Processing Middleware Framework for Real-Time Analysis of Heterogeneous Data on Big Data Platform: Case of Environmental Monitoring. Sensors 2020, 20, 3166. [Google Scholar] [CrossRef] [PubMed]
- Ko, J.W.; Choi, Y. A Grid-Based Distributed Event Detection Scheme for Wireless Sensor Networks. Sensors 2011, 11, 10048–10062. [Google Scholar] [CrossRef] [PubMed]
- Leon-Garcia, F.; Palomares, J.M.; Olivares, J. Data—Domain Reduction Model for Threshold-Based Event Detection in Sensor Networks. Sensors 2018, 18, 3806. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Papan, J.; Segec, P.; Yeremenko, O.; Bridova, I.; Hodon, M. Enhanced Multicast Repair Fast Reroute Mechanism for Smart Sensors IoT and Network Infrastructure. Sensors 2020, 20, 3428. [Google Scholar] [CrossRef] [PubMed]
- Tundis, A.; Kaleem, H.; Mühlhäuser, M. Detecting and Tracking Criminals in the Real World through an IoT-Based System. Sensors 2020, 20, 3795. [Google Scholar] [CrossRef] [PubMed]
- Changlei, L.; Guohong, C. Distributed monitoring and aggregation in wireless sensor networks. In Proceedings of the 2010 IEEE INFOCOM, San Diego, CA, USA, 14–19 March 2010; pp. 1–9. [Google Scholar]
- Chitnis, L.; Dobra, A.; Ranka, S. Aggregation methods for large-scale sensor networks. ACM Trans. Sen. Netw. 2008, 4, 1–36. [Google Scholar] [CrossRef]
- Massie, M.L.; Chun, B.N.; Culler, D.E. The ganglia distributed monitoring system: Design, implementation, and experience. Parallel Comput. 2004, 30, 817–840. [Google Scholar] [CrossRef]
- Park, K.; Pai, V.S. Comon: A mostly-scalable monitoring system for planetlab. SIGOPS Oper. Syst. Rev. 2006, 40, 65–74. [Google Scholar] [CrossRef]
- Wensheng, Z.; Guohong, C. Dctc: Dynamic convoy tree-based collaboration for target tracking in sensor networks. IEEE Trans. Wirel. Commun. 2004, 3, 1689–1701. [Google Scholar]
- Kim, S.; Lee, J.; Park, Y.; Cho, Y. An optimal distributed trigger counting algorithm for large-scale networked systems. Simulation Trans. Soc. Model. Simul. Int. 2013. [Google Scholar] [CrossRef]
- Emek, Y.; Korman, A. Efficient threshold detection in a distributed environment: Extended abstract. In Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC ’10, Zurich, Switzerland, 25–28 July 2010; ACM: New York, NY, USA, 2010; pp. 183–191. [Google Scholar]
- Chang, C.C.; Tsai, J. Distributed trigger counting algorithms for arbitrary network topology. Wirel. Commun. Mob. Comput. 2016, 16, 2463–2476. [Google Scholar] [CrossRef] [Green Version]
- Hoeffding, W. Probability inequalities for sums of bounded random variables. J. Am. Stat. Assoc. 1963, 58, 13–30. [Google Scholar] [CrossRef]
- Ibe, O.C. Markov Processes for Stochastic Modeling; Elsevier B.V., Registered Office: Amsterdam, The Netherlands, 2013. [Google Scholar]
- NetLogo. Available online: http://ccl.northwestern.edu/netlogo/ (accessed on 7 November 2020).
- Source Code of DDR-coin. Available online: https://github.com/SeokhyunKim/dtc-algos (accessed on 7 November 2020).
- Kshemkalyani, A.D. Fast and message-efficient global snapshot algorithms for large-scale distributed systems. IEEE Trans. Parallel Distrib. Syst. 2010, 21, 1281–1289. [Google Scholar] [CrossRef]
- Tsai, J. Flexible symmetrical global-snapshot algorithms for large-scale distributed systems. IEEE Trans. Parallel Distrib. Syst. 2013, 24, 493–505. [Google Scholar] [CrossRef]
Algorithm | Message | MaxRcvLoad | MaxMsgLoad | Exact or |
---|---|---|---|---|
Complexity | Probabilistic | |||
Centralized [3] | − | − | Exact | |
Tree-based [3] | Exact | |||
LayeredRand [1] | − | Exact | ||
CompTreeRand [18] | − | − | Probabilistic | |
CompTreeDet [18] | Exact | |||
CoinRand [2] | − | Exact | ||
RingRand [2] | Probabilistic | |||
TreeFill [17] | − | Exact | ||
DDR-coin | − | Probabilistic |
Category | Variable | Description |
---|---|---|
n | The number of nodes. | |
Overall | w | The number of triggers to be detected. |
Security parameter to adjust the failure probability (refer to Section 2.4.2 and Section 3.1). | ||
The number of remaining triggers to be detected at the beginning of Round i. | ||
, . | ||
Round i | The number of detected triggers at Round i. | |
The number of remaining triggers in the beginning of the final (=f) round. | ||
h | The height of the tree-like structure. | |
k | Each internal vertex has k children. | |
, node-j | Node j corresponding to the vertex j in the tree-like structure. | |
The number of received triggers in . | ||
The node u for the internal vertex in the tree-like structure. | ||
Tree-like | The Boolean array of length k in . | |
structure | coin | When at level-h receives a trigger, it generates a coin message with the |
probability of . This coin is sent to a randomly-selected node in level-(h-1). | ||
full-coin | When becomes full (i.e., all entries are true), | |
sends a full-coin to its parent. | ||
If a coin arrives at where are already all true, sends | ||
overflow-coin | an overflow-coin to the randomly chosen node at the upper level. | |
(This coin will go up to a certain level and then go down to arrive | ||
at level-(h-1) eventually. Refer to Section 2.4.2) |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kim, S.; Park, Y. DDR-coin: An Efficient Probabilistic Distributed Trigger Counting Algorithm. Sensors 2020, 20, 6446. https://doi.org/10.3390/s20226446
Kim S, Park Y. DDR-coin: An Efficient Probabilistic Distributed Trigger Counting Algorithm. Sensors. 2020; 20(22):6446. https://doi.org/10.3390/s20226446
Chicago/Turabian StyleKim, Seokhyun, and Yongsu Park. 2020. "DDR-coin: An Efficient Probabilistic Distributed Trigger Counting Algorithm" Sensors 20, no. 22: 6446. https://doi.org/10.3390/s20226446
APA StyleKim, S., & Park, Y. (2020). DDR-coin: An Efficient Probabilistic Distributed Trigger Counting Algorithm. Sensors, 20(22), 6446. https://doi.org/10.3390/s20226446