Scalable and Interactive Simulation for IoT Applications with TinySim.
Gonglong Chen,Wei Dong,Fujian Qiu,Gaoyang Guan,Yi Gao,Siyu Zeng
DOI: https://doi.org/10.1109/jiot.2023.3285244
IF: 10.6
2023-01-01
IEEE Internet of Things Journal
Abstract:Recent years, the rapid development of Internet of Things (IoT) technologies and applications have been witnessed. Three important features are characterized in modern IoT applications: 1) device heterogeneity; 2) long-range communication; and 3) cloud/edge-device integration. Difficulties are raised by the above features toward IoT application developers, e.g., predicting and evaluating the performance of the entire IoT application system. To deal with the above difficulties, we design and implement an IoT simulator, TinySim, which satisfies the requirements of high fidelity, high scalability, and seamless transplantation. TinySim takes advantage of the hardware-independent features of TinyLink programming language. Hence, a similar code can be used for both simulation and execution on real hardware platforms. Many virtual IoT devices can be simulated by TinySim at the PC end. These IoT devices can send or receive messages from the cloud or smartphones, making it possible for the developers to evaluate the entire system without the actual IoT hardware. We connect TinySim with Unity 3-D to provide high interactivity. To reduce the event synchronization overhead between TinySim and Unity 3-D, a dependence graph-based approach is proposed. We design an approximation-based approach to reduce the number of simulation events, greatly speeding up the simulation process. We carefully evaluate TinySim using benchmarks and two concrete case studies. TinySim can simulate representative IoT applications, such as smart flowerspot and shared bikes. We conduct extensive experiments to evaluate the performance of TinySim. Results show that TinySim can achieve high accuracy with an error ratio lower than 9.52% in terms of energy and latency. Further, TinySim can simulate 4000 devices within 11.2 physical-minutes for ten simulation-minutes, which is about $3\times $ faster than the state-of-art approach.