For Educatuion and Research
Stefan Bosse1,*
1University of Bremen, Dept. Mathematics & Computer Science, Bremen, Germany
*Presenting author
Stefan Bosse - Sensor Network Operating Environment - Overview
How can we compose and evaluate distributed sensor networks?
Stefan Bosse - Sensor Network Operating Environment - Overview
How can we compose and evaluate distributed sensor networks?
How can we design an universal and simple operating system for distributed sensor networks?
Stefan Bosse - Sensor Network Operating Environment - Overview
How can we compose and evaluate distributed sensor networks?
How can we design an universal and simple operating system for distributed sensor networks?
We have to address education as well as research as well as application!
Stefan Bosse - Sensor Network Operating Environment - Overview
Dealing with distributed and parallel computing in strong heterogeneous environments, e.g., distributed sensor networks, is still a challenge at the:
Heterogeneity is related to different computer and network (communication) architectures
Virtualization can hide and unify heterogeneity.
Stefan Bosse - Sensor Network Operating Environment - Overview
Besides inter-process communication and synchronization, the unified access and monitoring of computing nodes (devices, computers, processors) is required to handle distributed and parallel systems in a comfortable and easy-to-access manner.
Stefan Bosse - Sensor Network Operating Environment - Overview
In this work, a unified distributed and parallel framework and Web tools are introduced using Virtual Machines (VM) and Web browsers to control them.
The framework enables the control, monitoring, and study of distributed-parallel systems, especially addressing sensor networks and IoT networks.
Nodes can be arranged in a graphical drawing world or script-based.
Stefan Bosse - Sensor Network Operating Environment - Overview
Virtual network nodes are assigned to VM instances that can be created inside the browser using WebWorker processes or can be attached to externally running VM instances via a Web control API.
New VM instances or processes can be started and controlled instantly.
The graphical UI provides access to the internal and external nodes, programming editors, and monitor shells.
The VMs can be generic, but in this work there is a focus on JavaScript and Lua.
Stefan Bosse - Sensor Network Operating Environment - Network Architecture
The general architecture consists of a generic network graph G=⟨N,P,C⟩ with VM nodes N that can process a textual programming language L, a set of communication ports P attached to nodes, and communication connections (links) L between ports.
Stefan Bosse - Sensor Network Operating Environment - Network Architecture
Three different programming language VMs are considered in this work:
Three different host computers are considered:
Stefan Bosse - Sensor Network Operating Environment - Network Architecture
There are two meta classes of VM APIs used in the framework:
Stefan Bosse - Sensor Network Operating Environment - Network Architecture
(a) General software framework and communication architecture with internal (double outline), external mapper (single outline), and external (dashed line) nodes. There are management communication ports (mPort) for connecting Web controllers with external nodes and generic communication ports (cPort) for inter-node communication (b) Message multiplexer architecture
Stefan Bosse - Sensor Network Operating Environment - Software Framework
Stefan Bosse - Sensor Network Operating Environment - Software Framework
The VNetOS software framework consists of the following parts:
Internal VMs that can be embedded in the Web browser, i.e., can be provided in JavaScript or WebAssembly;
External VMs with a Web RPC service that have virtual shadow nodes in the Web GUI;
A set of programming modules supporting parallel and distributed programming (like CSP modelling, sensor access, RPC; for each target VM language there is an implementation).
Stefan Bosse - Sensor Network Operating Environment - Software Framework
Three different node classes are distinguished:
Stefan Bosse - Sensor Network Operating Environment - Software Framework
Stefan Bosse - Sensor Network Operating Environment - Preliminary Experiments and Results
Stefan Bosse - Sensor Network Operating Environment - Preliminary Experiments and Results
Three principle experiments were performed:
Stefan Bosse - Sensor Network Operating Environment - Preliminary Experiments and Results
Typical network application using VNetOS, a Web browser, and Raspberry PI Zero devices: Four internal and two external nodes connected via WLAN. For each VM instance there is a code editor and an IO monitor shell window. Internal and external nodes can communicate directly via HTTP.
Stefan Bosse - Sensor Network Operating Environment - Preliminary Experiments and Results
Host | dhry/s | VM | tiVM | miVM | tcmsg |
---|---|---|---|---|---|
PC/nodejs | 5000k | JS (ext) | 140ms | 20MB | 3ms |
PC/Firefox | 4200k | JS (int) | 100ms | 10MB | 4ms |
PC/plvm | 600k | Lua, Parallel LuaJit(+libuv) (ext) | 3ms | 800kB | 0.1ms |
Raspberry PI Zero/nodejs | 230k | JS | 1600ms | 20MB | 40ms |
Raspberry PI Zero/plvm | 40k | Lua, Parallel LuaJit(+libuv) (ext) | 10ms | 800kB | 1ms |
ESP32/Lua | 1k | Lua, FreeRTOS (ext) | 100ms | 100kB | 5ms |
miVM: Base memory (RAM+ROM), tiVM: VM Instantiation time, tcmsg:Communication time between nodes
Stefan Bosse - Sensor Network Operating Environment - Preliminary Experiments and Results
Lua can be easily embedded and forked using multi-threading, whereas node.js requires system process creation (at least some time ago), resulting in an instance creation time 100 times higher.
Communication time is limited due to core bandwidth/latency and by the process/thread scheduling times required for message multiplexer invocation.
Lua (LuaJit) shows superior performance compared to node.js/V8-based VMs and is a suitable VM for (tiny) embedded systems.
The base memory requirement for node.js (and Web browser engines) pose the highest start-up times and memory requirements, but also the highest computational power.
Stefan Bosse - Sensor Network Operating Environment - Conclusions
A novel distributed virtualization framework for the deployment and control of heterogeneous networks of generic and embedded systems was introduced.
The control of the distributed network is performed by a graphical Web browser application (or alternatively, script-based).
Stefan Bosse - Sensor Network Operating Environment - Conclusions
Each root node supports a programmable target VM (e.g., JS, Lua) and can instantiate (fork) VM worker processes.
The routing of messages is performed by a message router.
Evaluation of the node performance identified VM forking and message routing times as critical, but strongly dependent on the underlying VM (LuaJit forking is 100 times faster than node.js).
Even tiny embedded systems can be used for distributed programming and processing. Besides education, simulation and generic distributed network control are core applications.
Stefan Bosse - Sensor Network Operating Environment - Conclusions
For Educatuion and Research
Stefan Bosse1,*
1University of Bremen, Dept. Mathematics & Computer Science, Bremen, Germany
*Presenting author