Tag Archives: ubc

ThingsMigrate: Platform‐independent migration of stateful JavaScript Internet of Things applications

Jung, K., Gascon‐Samson, J., Goyal, S., Rezaiean‐Asel, A., Pattabiraman, K. (2021) ThingsMigrate: Platform‐independent migration of stateful JavaScript Internet of Things applications. Software: Practice and Experience, 51(1), pp.117-155.
[Preprint]

Abstract: The Internet of Things (IoT) has gained wide popularity both in academic and industrial contexts. Unlike traditional embedded devices with specialized firmwares, 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 run‐time, 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 three 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.

OneOS: POSIX+ Actors= General-Purpose IoT Platform

Jung, K., Gascon-Samson, J., Pattabiraman, K. (2019). OneOS: POSIX+ Actors= General-Purpose IoT Platform (Poster). EuroSys 2019, Dresden, Germany
[Preprint]

Abstract: The Internet of Things (IoT) is now a reality. With an increasing number of” smart” devices, a recent interest in Edge/Fog Computing has challenged IoT platforms to support general-purpose workloads on arbitrary devices with the same performance and reliability guarantees as the Cloud. We present a design of an IoT platform called OneOS, resembling a Distributed Operating System, to provide a single-system image of the entire network of computers. OneOS operates over an abstract machine comprising a grid of high-level language runtimes modeled as Actors. We demonstrate an evaluation context replacement technique for mapping the POSIX interface over the networked system to run regular JavaScript and Python programs on OneOS without any modification.

OneOS: IoT Platform based on POSIX and Actors

Jung, K., Gascon-Samson, J., Pattabiraman, K. (2019). OneOS: IoT Platform based on POSIX and Actors. HotEdge 2019, Renton, États-Unis
[Preprint] [Presentation Slides] [Code]

Abstract: Recent interest in Edge/Fog Computing has pushed IoT Platforms to support a broader range of general-purpose workloads. We propose a design of an IoT Platform called OneOS, inspired by Distributed OS and micro-kernel principles, providing a single system image of the IoT network. OneOS aims to preserve the portability of applications by reusing a subset of the POSIX interface at a higher layer over a flat group of Actors. As a distributed middleware, OneOS achieves its goal through evaluation context replacement, which enables a process to run in a virtual context rather than its local context.

Failure Prediction in the Internet of Things due to Memory Exhaustion

Rafiuzzaman M., Gascon-Samson J., Pattabiraman K., Gopalakrishnan S. (2019) Failure Prediction in the Internet of Things due to Memory Exhaustion. 34th ACM Symposium on Applied Computing (SAC 2019), Limassol, Cyprus
> Acceptance ratio: 27.5% [Preprint] [Presentation Slides]

Abstract: We present a technique to predict failures resulting from memory exhaustion in devices built for the modern Internet of Things (IoT). These devices can run general-purpose applications on the network edge for local data processing to reduce latency, bandwidth and infrastructure costs, and to address data safety and privacy concerns. Applications are, however, not optimized for all devices and could result in sudden and unexpected memory exhaustion failures because of limited available memory on those IoT devices. Proactive prediction of such failures, with sufficient lead time, allows for adaptation of the application or its safe termination. Our memory failure prediction technique for applications running on IoT devices uses k-Nearest-Neighbor (kNN) based machine learning models. We have evaluated our technique using two third-party applications and a real-world IoT simulation application on two different IoT platforms and on an Amazon EC2 t2.micro instance for both single and multitenancy use cases. Our results indicate that our technique significantly outperforms simpler threshold-based techniques: in our test applications, with 180 seconds of lead time, failures were accurately predicted with 88% recall at 74% precision for a single application failure and 76% recall at 71% precision for multitenancy failure.

Scalable Edge Computing for Low Latency Data Dissemination in Topic-Based Publish/Subscribe

Khare, S., Sun, H., Zhang, K., Gascon-Samson, J., Gokhale, A., Koutsoukos, K., Abdelaziz H. (2018) Scalable Edge Computing for Low Latency Data Dissemination in Topic-Based Publish/Subscribe, 2018 IEEE/ACM Symposium on Edge Computing (SEC 2018), Seattle, WA, USA
[Preprint] [Presentation Slides]

Abstract: Advances in Internet of Things (IoT) give rise to a variety of latency-sensitive, closed-loop applications that reside at the edge. These applications often involve a large number of sensors that generate volumes of data, which must be processed and disseminated in real-time to potentially a large number of entities for actuation, thereby forming a closed-loop, publish-process-subscribe system. To meet the response time requirements of such applications, this paper presents techniques to realize a scalable, fog/edge-based broker architecture that balances data publication and processing loads for topic-based, publish-process-subscribe systems operating at the edge, and assures the Quality-of-Service (QoS), specified as the 90th percentile latency, on a per-topic basis. The key contributions include: (a) a sensitivity analysis to understand the impact of features such as publishing rate, number of subscribers, per-sample processing interval and background load on a topic’s performance; (b) a latency prediction model for a set of co-located topics, which is then used for the latency-aware placement of topics on brokers; and (c) an optimization problem formulation for k-topic co-location to minimize the number of brokers while meeting each topic’s QoS requirement. Here, k denotes the maximum number of topics that can be placed on a broker. We show that the problem is NP-hard for k >=3 and present three load balancing heuristics. Empirical results are presented to validate the latency prediction model and to evaluate the performance of the proposed heuristics.

Demo: ThingsMigrate – Platform-Independent Live-Migration of JavaScript Processes

Jung K., Gascon-Samson, J., Pattabiraman K. (2018) Demo: ThingsMigrate – Platform-Independent Live-Migration of JavaScript Processes, 2018 IEEE/ACM Symposium on Edge Computing (SEC 2018), Seattle, WA, USA
[Preprint] [Video]

Abstract: Recent trends in IoT (Internet of Things) has seen increasing number of devices being shipped with full-fledged operating systems, allowing more complex and stateful applications written in high-level languages (e.g., JavaScript) to be run on the edge. The benefits of pushing computations towards the edge is that one can reduce the network costs of data transmission. Just like any other distributed system, we need to guarantee in IoT the availability of running processes, and thus need a live-migration mechanism for such programs. However, well-studied VM migration techniques are costly and impractical in IoT, due to the resource constraints and diversity of devices. In this demo paper, we present a demo of ThingsMigrate, a JavaScript middleware for enabling live-migration of stateful JavaScript applications in a platform-independent manner, along with a web dashboard used to monitor and control the IoT devices.

Poster: Towards a Distributed and Self-Adaptable Cloud-Edge Middleware

Gascon-Samson, J., Jung K., Pattabiraman K. (2018) Poster: Towards a Distributed and Self-Adaptable Cloud-Edge Middleware, 2018 IEEE/ACM Symposium on Edge Computing (SEC 2018), Seattle, WA, USA
[Preprint] [Poster]

Abstract: The Internet of Things (IoT) landscape has grown tremendously over the past few years. Modern devices are getting more powerful, and are therefore gaining the ability to execute complex and rich applications (edge computing), which can yield many benefits compared to traditional, cloud-centric models. On the other end, the use of high-level languages (e.g., JavaScript) allows programmers to abstract low-level considerations, and gives the ability to run the same code across different platforms. In this paper, we describe the main features of ThingsJS, our comprehensive self-adaptive cloud-edge middleware that allows for designing and running high-level, complex applications written in JavaScript on the IoT devices themselves.

Poster Abstract: Ensuring Low-Latency and Scalable Data Dissemination for Smart-City Applications

Khare, S., Sun, H., Zhang, K., Gascon-Samson, J., Gokhale, A., Koutsoukos, K. (2018) Poster Abstract: Ensuring Low-Latency and Scalable Data Dissemination for Smart-City Applications, IoTDI 2018, Orlando, USA

Abstract: Low latency and scalable data dissemination is a critical requirement for many IoT applications, e.g., smart city applications, which are often built over a publish/subscribe communication paradigm. Ensuring low latency requires effective load balancing of the publish/subscribe topics across the different publishers and subscribers. To that end we present ongoing work on a data-driven approach to learning a latency-aware model of IoT broker loads, and in turn using it to determine broker replication, and balancing topics across them.

ThingsMigrate: Platform-Independent Migration of Stateful JavaScript IoT Applications

Gascon-Samson, J., Jung, K., Goyal, S., Rezaiean-Asel, A., Pattabiraman, K. (2018) ThingsMigrate: Platform-Independent Migration of Stateful JavaScript IoT Applications, ECOOP 2018, Amsterdam, Netherlands [Preprint] [Presentation Slides] [Poster]

Abstract: The Internet of Things (IoT) has gained wide popularity both in academic and industrial contexts. As IoT devices become increasingly powerful, they can run more and more complex applications written in higher-level languages, such as JavaScript. However, by their nature, IoT devices are subject to resource constraints, which require applications to be dynamically migrated between devices (and the cloud). Further, IoT applications are also becoming more stateful, and hence we need to save their state during migration transparently to the programmer. In this paper, we present ThingsMigrate, a middleware providing VM-independent migration of stateful JavaScript applications across IoT devices. ThingsMigrate captures and reconstructs the internal JavaScript program state by instrumenting application code before run time, without modifying the underlying Virtual Machine (VM), thus providing platform and VM-independence. We evaluated ThingsMigrate against standard benchmarks, and over two IoT platforms and a cloud-like environment. We show that it can successfully migrate even highly CPU-intensive applications, with acceptable overheads (about 30%), and supports multiple migrations.

ThingsJS: Towards a Flexible and Self-Adaptable Middleware for Dynamic and Heterogeneous IoT Environments

Gascon-Samson, J., Rafiuzzaman M., Pattabiraman K. (2017) ThingsJS: Towards a Flexible and Self-Adaptable Middleware for Dynamic and Heterogeneous IoT Environments, Middleware for IoT (m4iot)@Middleware 2017, Las Vegas, USA
[Preprint] [Presentation Slides]

Abstract: The Internet of Things (IoT) has gained wide popularity both in academic and industrial contexts. Nowadays, such systems exhibit many important challenges across many dimensions. In this work, we propose ThingsJS, a rich Javascript-based middleware platform and runtime environment that abstracts the inherent complexity of such systems by providing a high-level framework for IoT system developers, built over Javascript. ThingsJS abstracts several large-scale distributed systems considerations, such as scheduling, monitoring and self-adaptation, by means of a rich constraint model, a multi-dimensional resource prediction approach and a SMT-based scheduler to properly schedule and manage the execution of high-level, large-scale distributed applications on heterogeneous physical IoT devices. ThingsJS also provides a rich inter-device communication framework built on top of the widely-used publish/subscribe/MQTT paradigm. Finally, ThingsJS also proposes a rich inter-device Javascript-based code migration framework to support the transparent migration of live IoT components between heterogeneous devices.