On-demand deployment for IoT applications

https://doi.org/10.1016/j.sysarc.2020.101794Get rights and content

Abstract

The uncertainties of IoT-edges system and environment make challenges to applications in reliability, stability, and total latency, etc. With edge devices increasingly able to connect to cloud servers from anywhere, applications can potentially perform deployment changing at runtime to improve performance. In this paper, we propose a dynamic-programming based algorithm, named E-ODD, for the on-demand deployment of applications at runtime. When the device does not have enough computational resources, it offloads some movable tasks to the cloud to occupy additional resources. However, when it is difficult to occupy cloud resources or computational resources on the device become excessive, the device migrates tasks back. Besides, we present MODE, a generic and flexible middleware for edge cloud on-demand deployment. We propose a context model and detect corresponding complex events which trigger the deployment changes. Based on the event detection model, middleware can acquire changing information real-timely. We have successfully applied our middleware for ventricular fibrillation monitoring. Finally, experiments prove that our on-demand deployment model outperforms other selected models both in total latency and throughput, especially in dynamic environments.

Introduction

With the rapid development of the Internet of Things (IoT), the runtime environment of applications becomes increasingly open. On the one hand, openness brings ever-changing environment and system status. These changes can be either predictable or unpredictable, which both affect the application performance [1], [2]. For example, user requests may surge in a short period, and devices may be temporarily or permanently disconnected to the network. However, applications should works in timely fashion and acceptable performance. Actually, the essence of application execution can be viewed as the application logic running on the computational resources. Utilizing resources on demand is an potential approach to adapt to these changings. It has a double meaning: when the current possessed resources are not enough, the application can occupy remote resources so as to ensure its high performance; however, when the possessed resources become excessive or it is difficult to occupy additional resources, the application should release some resources to reduce waste and save costs. On the other hand, the openness of IoT breaks the tradition that an application is always tailored for the specific hardware provided in advance. In IoT environment, computational resources are scattered among multiple network nodes. In other word, although resources of a single node are still limited, the network of interconnected nodes have extremely rich resources. Therefore, on-demand deployment of application logics in the network is a potential solution to utilize resources on demand. The application deployment requires adapt to the situational changings to ensure the specific quality goals [3].

Nowadays, IoT is becoming an integrated network infrastructure consisting of cloud and numerous accessible edge devices [4], [5]. However, these nodes have differences in processing capabilities. For example, smart phones CPUs have the raw computing power close to the desktop CPUs, but Wireless Sensor Network (WSN) nodes are resource constrained and only support peculiar computing platforms. Cloud computing technologies have been rapidly developed in recent years and intensively exploited in the management of large-scale IoT systems [6]. Theoretically, with the unlimited storage and computing power of the cloud, the IoT system can process perceptual data efficiently. However, the interactions between application and environment happen locally in most cases. That is, the response to computing, storage, and analysis usually needs to be closer to the edge than the cloud [7]. The static computing model between cloud and edge can cause the waste of computational resources. The on-demand deployment of applications is an approach to trade off the cloud computing and edge computing. It coordinates these heterogeneous devices to transform the traditional static computing model (i.e. cloud computing or edge computing) into dynamic computing model. In other words, when computing resources in the edge are redundant, more tasks are deployed and executed locally; whereas, when the resources of the edge are insufficient, some tasks are migrated to the cloud to compensate for the performance loss [8], [9]. This model has both advantages of cloud computing and edge computing, and avoids their shortcomings.

Focusing on these requirements, we propose E-ODD, an algorithm for on-demand deployment of applications at runtime, and MODE1, an offloading-enabling middleware. On-demand deployment means that when the resources of edge device are constrained, parts of the tasks can be deployed and executed on cloud to use additional resources; when edge resources are idle or poor network conditions make it difficult to obtain additional resources, tasks are migrated back to save resources and ensure the acceptable performance [11]. The on-demand deployment of computational tasks reduces the impact of the situational changings, greatly increasing decision-making efficiency.

Context awareness plays an important role in solving the dynamic challenges, and allows us to store and use contextual information hidden in raw data. The contextual information as an important decision basis can be interpreted and processed easily and reliably [12]. In MODE, raw contexts are modeled into two subsets using ontology, including the external environment contexts (e.g., time) and the internal system contexts (e.g., node status). All these contexts are essential attributes for events which trigger the deployment adjustment. In this paper, we use our previous work, OntoEvent2, to describe these contexts and detect events which trigger the deployment adjustment.

In MODE, the application is programmed as a task call graph, where computational tasks are abstracted out as middleware services. These tasks are migrated and executed between different machines, decoupling “what is sensed and implemented” from “how is sensed and implemented”. In other words, developers only need focus on the capabilities of tasks rather than implementation details. MODE provides two components, primitive task library and custom task registration, to construct on-demand deploymentable applications, which can be deployed and executed on the task execution engine. Based on these components, we propose an algorithm called E-ODD that can find an application deployment tactic on demand, considering unstable network, cloud and device conditions. Compared to the static deployment, it can improve the performance (i.e., total latency of the application) significantly. For a particular application, we first determine the dependency relations of tasks through static program analysis. The closely related tasks are merged as a composited task, and then a serial-parallel chain of the composited tasks are constructed according to these dependencies. Then, we provide a dynamic programming method to find a near-optimal deployment tactic for the current situation in polynomial time.

We apply MODE to mobile medical monitoring as an example to explore the above challenges. In the medical monitoring, there are a large number of wearable devices detecting and processing health information of a user, where most devices are mobile and surrounding environments change inevitably in some situations. Therefore, it is critical and challenging to ensure efficient and reliable execution of the application. Finally, we verify the superiority of MODE in response time and reliability through some experiments. The contributions of this work can be summarized as follows:

  • We present a description and detection model for complex events based on ontology, taking into account internal system contexts and external environment contexts. The experimental results verify that our event model can effectively detect and process complex events.

  • We model the problem of on-demand deployment formally and propose a graph-based algorithm to search the deployment tactic with minimum total latency in polynomial time. Then, based on the event model and the exploration/exploitation mechanism, we propose an event-driven deployment algorithm to reduce the online searching cost.

  • We implement a tiered architecture for MODE, that enables applications with task call graph and supports: 1) on-demand deployment of tasks between cloud and the edge device, 2) automation of task scheduling, 3) real-time task executions, and 4) functional management in the cloud and edge device.

The rest of this paper is organized as follows: Section 2 declares our event description and detection models. Section 3 abstracts the on-demand deployment problem and Section 4 presents algorithms to find deployment tactics on demand. Section 5 presents the prototype middleware MODE. In Section 6, we examine the performance of our approach. Finally, Section 7 reviews related works and Section 8 concludes the paper.

Section snippets

Event description and detection

In this section, we present the event description model and event detection model. First, we define the driven event: each driven event is predefined and triggers the on-demand deployment process when it is detected.

Application deployment model

The essence of application execution is that its computing tasks run on computing resources. Therefore, on-demand deployment of applications is actually a method of dynamically allocating resources for computing tasks. In other words, these computing tasks need to be dynamically deployed and executed on cloud (i.e., occupy additional cloud-side resources) or on the device (i.e., release excessive cloud-side resources), according to the situation needs. The event model described in the above

On-demand deployment algorithms

In this section, we present a dynamic programming method to solve the on-demand deployment problem within polynomial number of times.

Middleware overview

MODE is a three-layer data processing middleware that provides context awareness functionality and supports the on-demand deployment of applications. It consists of three layers: the physical layer, the edge layer, and the cloud layer. The layered architecture reduces the complexity of developing and managing applications. The architecture is shown in Fig. 7. The architecture is platform-independent and allows the use of heterogeneous hardware and software.

Evaluation

The performance of on-demand deployment mechanism is measured while varying multiple parameters such as the number of events, network status, and the number of user requests. We design three experiments to validate our approach. The first experiment is designed to validate the event detection performance. In order to evaluate the proposed event model, we utilize an event set (including 910,899 primitive events in total) and implement a series of complex ontologies. In the experiment, we aim to

On-demand deployment

The dynamic of mobile application can result in significant network performance degradation. It is difficult to ensure the performance of data processing [30]. Traditional edge computing deploys all tasks locally at edges, which often cannot ensure the performance of data processing due to constrained computing resources. Relatively, traditional cloud computing deploys all tasks at cloud servers, which does not take into account the energy cost caused by network. On-demand deployment is a

Conclusion and future work

We model the problem of on-demand deployment formally and provide a dynamic programming based algorithm, ODD, to find the deployment tactic with the optimal application performance. In addition, we apply OntoEvent, a novel ontology-based event description and detection model, into our on-demand deployment model and propose an event-driven on-demand deployment approach, E-ODD. Experimental results prove that the OntoEvent has a higher efficiency than other event models, and the E-ODD model

Declaration of Competing Interest

We declare that we have no financial and personal relationships with other people or organizations that can inappropriately influence our work, there is no professional or other personal interest of any nature or kind in any product, service and/or company that could be construed as influencing the position presented in the manuscript entitled, “On-demand deployment for IoT applications”.

Acknowlgedgments

This work is supported in part by National Key R&D Program of China No.2017YFB1200700 and National Natural Science Foundation of China No.61701007.

Jingbin Zhang received a B.S. degree in computer science from Beijing Normal University, China, in 2016. He is currently pursuing doctorate degree in computer science at Peking University. His research interests include Internet of Things, IoT middleware, context-aware computing and service computing. His works have been published in major international journals and conferences like IEEE Transactions on Industrial Informatics, Journal of Systems Architecture, IEEE International Conference on

References (47)

  • M.A. Razzaque et al.

    Middleware for internet of things: a survey

    IEEE Internet Things J.

    (2016)
  • P. Mach et al.

    Mobile edge computing: a survey on architecture and computation offloading

    IEEE Commun. Surv. Tutorials

    (2017)
  • W. He et al.

    MODE: a context-aware IoT middleware supporting on-demand deployment for mobile devices

    23rd IEEE International Conference on Parallel and Distributed Systems, ICPADS 2017, Shenzhen, China, December 15–17, 2017

    (2017)
  • M.V. Barbera et al.

    To offload or not to offload? The bandwidth and energy costs of mobile cloud computing

    Proceedings of the IEEE INFOCOM 2013, Turin, Italy, April 14–19, 2013

    (2013)
  • C. Perera et al.

    Context aware computing for the internet of things: a survey

    IEEE Commun. Surv. Tutorials

    (2014)
  • M. Ma et al.

    Event description and detection in cyber-physical systems: an ontology-based language and approach

    23rd IEEE International Conference on Parallel and Distributed Systems, ICPADS 2017, Shenzhen, China, December 15–17, 2017

    (2017)
  • M. Ma et al.

    Efficient multipattern event processing over high-speed train data streams

    IEEE Internet Things J.

    (2015)
  • Y. Zhang et al.

    Refactoring android java code for on-demand computation offloading

    Proceedings of the 27th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2012, Part of SPLASH 2012, Tucson, AZ, USA, October 21–25, 2012

    (2012)
  • P. Auer et al.

    Gambling in a rigged casino: the adversarial multi-armed bandit problem

    Proceedings of IEEE 36th Annual Foundations of Computer Science

    (1995)
  • M. Crepinsek et al.

    Exploration and exploitation in evolutionary algorithms: a survey

    ACM Comput. Surv.

    (2013)
  • R.S. Sutton et al.

    Introduction to Reinforcement Learning

    (1998)
  • L. Oakley, A. Oprea, QFlip: an adaptive reinforcement learning strategy for the flipit security game,...
  • Quartz enterprise job scheduler, (http://www.quartz-scheduler.org/). Accessed April 4,...
  • Cited by (0)

    Jingbin Zhang received a B.S. degree in computer science from Beijing Normal University, China, in 2016. He is currently pursuing doctorate degree in computer science at Peking University. His research interests include Internet of Things, IoT middleware, context-aware computing and service computing. His works have been published in major international journals and conferences like IEEE Transactions on Industrial Informatics, Journal of Systems Architecture, IEEE International Conference on Web Services, IEEE International Conference on Ubiquitous Intelligence and Computing, and IEEE International Conference on Parallel and Distributed Systems.

    Meng Ma is a post-doctoral research fellow of School of Electronics Engineering and Computer Science at Peking University, China. He obtained his doctorate degree in Computer Science from Peking University in 2016. His research interests include intelligent computing and sensing, complex event processing, internet of things and semantic computing. He has published 18 papers at venues like IEEE Internet of Things Journal and Knowledge-Based Systems. One of his papers has received the Best Paper Award from the 2013 IEEE International Conference on RFID-Technologies and Applications (RFID-TA).

    Wei He received a B.S. degree in software engineering from Beijing University of Posts and Telecommunications, China, in 2015. He is currently pursuing a master degree in software engineer at Peking University. His research interest is IoT middleware.

    Ping Wang is a professor of National Engineering Research Center for Software Engineering at Peking University, China. He obtained his doctorate degree in Computer Science from the University of Massachusetts in 1996. He is the director of Intelligent Computing and Sensing Laboratory (iCSL), Peking University. Dr. Wang has authored over 50 papers at venues like IEEE TDSC, ACM CCS, IEEE ICWS, IEEE IoT-J. He was the recipient of one Best Paper and two Outstanding Paper Awards from different professional societies.

    View full text