WebletScript: A Lightweight Distributed JavaScript Engine for Internet of Things
Dong Li, Bin Huang, Li Cui, Zhiwei Xu · 2018
Nowadays, there is no de facto programming language dedicated to the development of complex Internet of Things (IoT) applications containing different kinds of devices. JavaScript has great potential to become the mainstream application-development program language across IoT platforms, as JavaScript is supported by many engines which have different footprint sizes from the KB level to the MB level. However, there are still technical challenges in the coding efficiency and heterogeneous platform supports. In this paper, we propose a lightweight distributed JavaScript engine, WebletScript, to help IoT developers to build applications for a group of heterogeneous IoT devices. WebletScript can run on any device that supports normal C libraries. It enables automatic code slicing and distribution for an IoT application. Therefore, with one-time platform-independent code development, the application can be executed on multiple devices, such as a group of end devices, a smart gateway and the cloud system. Compared to the traditional solution, in which embedded application and cloud application are developed separately, our approach can reduce the lines of code effectively by 50% and reduce the cost of application update cost by 65%.