Escape from Callback Hell! A New Programming Paradigm for Network Simulation
Yuanyi Zhu, Zijian Li, Xin Ai, Zixuan Chen, Sen Liu, Yang Xu

TL;DR
The paper introduces CoDES, a coroutine-based paradigm for network simulation that simplifies development, improves code maintainability, and reduces complexity without sacrificing accuracy, demonstrated through extensions to NS-3.
Contribution
It pioneers a coroutine-based approach for network simulation, addressing callback limitations and enhancing development efficiency and code clarity.
Findings
Up to 62.3% reduction in code volume
Up to 82.6% reduction in code complexity
Maintains simulation accuracy and performance
Abstract
Network simulation plays a crucial role in both networking research and industry. Existing commonly-used Discrete Event Simulations (DES) are based on callback mechanisms for discrete event (DE). However, due to the inability of callbacks to naturally simulate network events, programs in network simulation cannot be written in a sequential workflow. This leads to inherent complexity and poor maintainability, resulting in stack ripping and callback hell. These problems significantly increase simulation development workloads and introduce substantial cognitive loads associated with programming and debugging. To enable more efficient development of network simulation and facilitate the rapid evaluation and evolution of network functions, we propose a novel development paradigm for network simulation named ``CoDES" (\textbf{Co}routine-based \textbf{DES}). To the best of our knowledge, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
