  IoT application development usually involves separate programming at the
device side and server side. While separate programming style is sufficient for
many simple applications, it is not suitable for many complex applications that
involve complex interactions and intensive data processing. We propose
EdgeProg, an edge-centric programming approach to simplify IoT application
programming, motivated by the increasing popularity of edge computing. With
EdgeProg, users could write application logic in a centralized manner with an
augmented If-This-Then-That (IFTTT) syntax and virtual sensor mechanism. The
program can be processed at the edge server, which can automatically generate
the actual application code and intelligently partition the code into device
code and server code, for achieving the optimal latency. EdgeProg employs
dynamic linking and loading to deploy the device code on a variety of IoT
devices, which do not run any application-specific codes at the start. Results
show that EdgeProg achieves an average reduction of 20.96%, 27.8% and 79.41% in
terms of execution latency, energy consumption, and lines of code compared with
state-of-the-art approaches.
