论文标题
外部调试:物联网的现场调试方法
Out-of-Things Debugging: A Live Debugging Approach for Internet of Things
论文作者
论文摘要
上下文:由于配备了不同网络技术的廉价嵌入式设备,物联网(IoT)已成为一种重要的分布式系统。尽管无处不在,但开发的物联网系统仍然具有挑战性。 查询:最近与194个物联网开发人员确定调试是开发物联网系统面临的主要挑战之一的现场研究。这是由于缺乏调试工具考虑了物联网系统的独特属性,例如非确定性数据和硬件限制设备。一方面,离线调试者允许开发人员分析录制后记录的程序信息,但在生成此类信息的同时,在设备上强加了太多的开销。 此外,分析过程也很耗时,可能会错过上下文信息,以找到错误的根本原因。另一方面,在线调试者确实允许在提供上下文信息(例如堆栈跟踪)时在失败时调试程序。特别是,远程在线调试者可以在不访问设备的情况下进行调试。但是,由于网络延迟导致的调试干扰,这会使错误可重复性复杂化,并且对远程设备上动态软件更新的支持有限。 方法:本文提出了专门为物联网系统设计的在线调试方法的淘汰调试。调试器始终是持续的,因为它可以确保持续不断的可用性,例如调试后部署情况。在故障或断点时,调试外部调试将已部署应用程序的状态移至开发人员的机器上。然后,开发人员可以通过将操作(例如,步骤命令)应用于检索状态来在本地调试应用程序。调试完成后,开发人员可以通过实时更新功能对设备进行错误修复。最后,通过用于访问远程资源的细粒度灵活界面,开发人员可以完全控制设备上施加的调试间接费用,以及对本地调试期间所需的设备硬件资源(例如,传感器)的访问。 知识:零工调试可保持远程调试的良好属性,因为它不需要对设备进行调试的物理访问,同时减少了调试干扰,因为这些操作没有网络延迟(例如,在调试器上发出的阶梯),因为这些发生在本地发生。此外,只有在用户要求时才能访问设备资源,从而进一步减轻开销,并为嘲笑或模拟未接收资源的途径开放。 接地:我们实施了一个不合格的调试器,以扩展到WebAssembly虚拟机,并基于对物联网的适用性。特别是,我们将解决方案与基于网络开销,内存使用,可扩展性和生产设置中的可用性等指标的远程调试替代方案进行了比较。从基准测试中,我们得出的结论是,我们的调试器除了限制开销外,还没有牺牲调试便利性和灵活性。 重要性:在讨论经典的在线操作(例如,逐步执行)的情况下,在解决特定于IoT的问题(例如硬件限制)时,可以通过经典的在线操作(例如,逐步执行)对物联网系统进行调试。我们表明,始终进行调试器不必以绩效损失或增加开销的费用,而是可以实施对物联网系统的平稳且灵活的调试体验。
Context: Internet of Things (IoT) has become an important kind of distributed systems thanks to the wide-spread of cheap embedded devices equipped with different networking technologies. Although ubiquitous, developing IoT systems remains challenging. Inquiry: A recent field study with 194 IoT developers identifies debugging as one of the main challenges faced when developing IoT systems. This comes from the lack of debugging tools taking into account the unique properties of IoT systems such as non-deterministic data, and hardware restricted devices. On the one hand, offline debuggers allow developers to analyse post-failure recorded program information, but impose too much overhead on the devices while generating such information. Furthermore, the analysis process is also time-consuming and might miss contextual information relevant to find the root cause of bugs. On the other hand, online debuggers do allow debugging a program upon a failure while providing contextual information (e.g., stack trace). In particular, remote online debuggers enable debugging of devices without physical access to them. However, they experience debugging interference due to network delays which complicates bug reproducibility, and have limited support for dynamic software updates on remote devices. Approach: This paper proposes out-of-things debugging, an online debugging approach especially designed for IoT systems. The debugger is always-on as it ensures constant availability to for instance debug post-deployment situations. Upon a failure or breakpoint, out-of-things debugging moves the state of a deployed application to the developer's machine. Developers can then debug the application locally by applying operations (e.g., step commands) to the retrieved state. Once debugging is finished, developers can commit bug fixes to the device through live update capabilities. Finally, by means of a fine-grained flexible interface for accessing remote resources, developers have full control over the debugging overhead imposed on the device, and the access to device hardware resources (e.g., sensors) needed during local debugging. Knowledge: Out-of-things debugging maintains good properties of remote debugging as it does not require physical access to the device to debug it, while reducing debugging interference since there are no network delays on operations (e.g., stepping) issued on the debugger since those happen locally. Furthermore, device resources are only accessed when requested by the user which further mitigates overhead and opens avenues for mocking or simulation of non-accessed resources. Grounding: We implemented an out-of-things debugger as an extension to a WebAssembly Virtual Machine and benchmarked its suitability for IoT. In particular, we compared our solution to remote debugging alternatives based on metrics such as network overhead, memory usage, scalability, and usability in production settings. From the benchmarks, we conclude that our debugger exhibits competitive performance in addition to confining overhead without sacrificing debugging convenience and flexibility. Importance: Out-of-things debugging enables debugging of IoT systems by means of classical online operations (e.g., stepwise execution) while addressing IoT-specific concerns (e.g., hardware limitations). We show that having the debugger always-on does not have to come at cost of performance loss or increased overhead but instead can enforce a smooth-going and flexible debugging experience of IoT systems.