Kumseok Jung, Julien Gascon-Samson, Shivanshu Goyal, Armin Rezalean-Asel, and Karthik Pattabiraman, To appear in the Journal of Software Practice and Experience (SPE). [ PDF ]
Expanded version of our conference paper.
Abstract: The Internet of Things (IoT) has gained wide popularity both in academic and industrial contexts. Unlike traditional embedded devices with specialized firmware, modern IoT devices accommodate general-purpose operating systems, allowing developers to run more sophisticated applications written in high-level languages like JavaScript. Because IoT devices are subject to resource constraints like available battery power, we need to dynamically migrate a running process between different devices to prevent losing state. However, it is challenging to apply migration techniques using memory snapshots across the heterogeneous pool of IoT devices.
We present ThingsMigrate, a middleware providing platform-independent migration of JavaScript processes across IoT devices. Prior to execution, ThingsMigrate instruments the source code of a given program to expose its internal state. During runtime, the transformed program produces on demand a JSON snapshot of its current state, from which new code is generated to resume execution. Thus, ThingsMigrate enables process migration entirely in the application space without any modifications to the underlying Virtual Machine (VM), providing VM-independence. We present 3 versions of ThingsMigrate, each building on the previous to optimize for run-time latency and memory consumption. We report on the experience of building each successive version and discuss the insights gained and the learning outcomes. We evaluated ThingsMigrate against standard benchmarks, over two IoT platforms and a cloud-like environment. We show that it can migrate even highly CPU-intensive applications, with average run-time latency overhead of 33% and memory overhead of 78%. ThingsMigrate supports multiple subsequent migrations without introducing additional overhead over each subsequent migration.