Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dynamic IoT Applications and Isomorphic IoT Sys...

Dynamic IoT Applications and Isomorphic IoT Systems Using WebAssembly

My presentation slides at IEEE WFIoT 2023
https://wfiot2023.iot.ieee.org/

The video of my presentation is available at:
https://youtu.be/IGAfZATbgnQ

Kentaro Kuribayashi

October 18, 2023
Tweet

More Decks by Kentaro Kuribayashi

Other Decks in Research

Transcript

  1. 1 Dynamic IoT Applications and Isomorphic IoT Systems Using WebAssembly

    Kentaro Kuribayashi / GMO Pepabo, Inc., Japan Advanced Institute of Science and Technology Yusuke Miyake / GMO Pepabo, Inc. Kenji Rikitake / GMO Pepabo, Inc., Kenji Rikitake Professional Engineer's Office Kiyofumi Tanaka / Japan Advanced Institute of Science and Technology Yoichi Shinoda / Japan Advanced Institute of Science and Technology IEEE WFIoT 2023 https://wfiot2023.iot.ieee.org/
  2. 4 1. Introduction The proliferation of IoT devices has led

    to development challenges. [1] Number of connected IoT devices growing 16% to 16.7 billion globally https://iot-analytics.com/number-connected-iot-devices/ Problem 1: Requirement for frequent updates Developers need to develop and update IoT devices quickly and frequently to meet the diverse and rapidly changing needs of users. Problem 2: Complicated technology stack In the development of IoT systems, the use of different technologies in layers that are composed of different platforms and architectures leads to efficiency and maintainability problems. [1] WebAssembly https://webassembly.org/ WebAssembly [1] can be a savior for these problems!
  3. 5 1. Introduction Dynamic IoT applications must be realized as

    a suitable form for current multi-layer IoT systems. [2] P. Ruckebusch et al., “Modelling the energy consumption for over-the-air soft- ware updates in LPWAN networks: SigFox, LoRa and IEEE 802.15.4g,” Internet of Things, vol. 3-4, pp. 104–119. [3] T. Mikkonen et al., “Isomorphic Internet of Things Architectures With Web Technologies,” Computer, vol. 54, no. 7, pp. 69–78, Jul. 2021. Point 1: WebAssembly can be used for dyn IoT apps [2] organizes software update methods for IoT devices (the table below). Wasm that is overlooked can be used for the purpose. Point 2: Be suitable for multi-layer IoT Systems Current IoT devices work as a part of multi-layer IoT systems (the right figure). Wasm also suitable for such systems [3].
  4. 6 1. Introduction We propose two methods to solve the

    aforementioned problems using WebAssembly . Dynamic IoT applications allow on-demand partial updating of IoT device behavior without restarting the device using Wasm. Using the same Wasm binary from a common code base across IoT system layers, which represents the isomorphism of the running code between the layers. Issue 1: Requirement for frequent updates Issue 2: Complicated technology stack Proposal 1: Dynamic IoT applications Proposal 2: Isomorphic IoT Systems Device Edge Cloud Device Build server Update device functionality dynamically
  5. Hardware 9 3.1. Dynamic IoT Applications We propose a method

    where IoT devices are implemented as a combination of core applications and the Wasm runtime. Hardware OS Application runtime Core application Wasm runtime IoT device Core component of IoT applications, which is usually deployed statically, typically as firmware. Wasm provides computational procedures as a part of the application and can be deployed dynamically.
  6. 10 We implemented the proposed approach using Elixir, Nerves, and

    a custom library we developed. 3.1. Dynamic IoT Applications Hardware Raspberry Pi 4 Linux Elixir on Erlang VM Elixir app Wasm runtime IoT Device Nerves[1] is a platform for IoT development that provides a tiny Linux environment that is crafted to work well with Erlang VM. [1] Nerves, Nerves Project https://nerves-project.org/ Wasmtube Wasmtube, created by the authors, is a bridging library between the Elixir app and Wasm runtime.
  7. 11 Sequence diagram of how to update the Wasm dynamically

    3.1. Dynamic IoT Applications 1. Developer deploys a modified Wasm file. 2. OS notifies of the file update using inotify(2) system call. 3. Wasmtube reloads the updated Wasm binary. 4. It discards the old sandbox 5. It recreates a new sandbox with the new file.
  8. Hardware 13 3.2. Isomorphic IoT Systems We propose an approach

    to apply the abovementioned structure across all layers of IoT systems. FreeRTOS, Linux, etc. App(C/C++, Rust, Elixir, etc.) Wasm runtime IoT device ESP32, Raspberry Pi, etc. Hardware iOS, Android, etc. App(Swift, Kotolin Flutter, Elixir, etc.) Mobile device iPhone, Android, etc Hardware Linux, etc. App(C/C++, Rust, Elixir, etc.) Edge/Gateway Raspberry Pi, Baremetal, etc. Hardware Linux, etc. App(Node.js, Python, Elixir, etc.) Cloud Virtual Machine, Container, etc. Wasm runtime Wasm runtime Wasm runtime The same Wasm binary is deployed throughout the layers Bridging library Bridging library Bridging library Bridging library
  9. 14 Example of the proposed method for isomorphic architecture based

    on practical usecase 3.2. Isomorphic IoT Systems Hardware Hardware, OS, language, app Wasm runtime Hardware Hardware, OS, language, app Wasm runtime IoT device Other layers Build pipeline to compile machine learning models to Wasm Abovementioned update flow
  10. 16 4. Evaluation Dynamic IoT applications using Wasm can be

    effective. Experimental methodology We measure the extent of processing delay brought by the bottlenecks that the proposed method inevitably introduces. Experiment The proposed method causes approximately 200 μs of delay in comparison with the app implemented only in Elixir. Discussion The proposed method of dynamically updating IoT devices using Wasm is sufficiently effective if the performance requirements of the IoT devices can tolerate an overhead of approximately 200 μs.
  11. 17 4. Evaluation Isomorphic IoT systems using Wasm can be

    effective. Experimental methodology We measure the performance of the image classification tasks using ML models compiled in the Wasm binaries on several environments. Experiment The average execution time of MobileNetV2 was 588.69 ms, even at the most inefficient device layer that consists of Raspberry Pi 4. Discussion The proposed method can be effective for building isomorphic IoT systems using the same Wasm binary that is built from a common code base, provided that a processing speed of approximately 1 FPS is acceptable.
  12. 19 5. Conclusion Our contributions 1. We propose dynamic IoT

    applications and isomorphic IoT systems using Wasm. 2. We implement the proposed methods based on a practical use case of IoT systems, namely the execution of machine learning models. 3. We quantitatively evaluate the actual implementations to confirm the effectiveness of the proposed methods. Further research 1. MLOps flow can be constructed using the proposed method. 2. Processing can be offloaded across layers in IoT systems using the proposed method. 3. The proposed method can be applied to federated learning.