Refactoring android Java code for on-demand computation offloading

  • Authors:
  • Ying Zhang;Gang Huang;Xuanzhe Liu;Wei Zhang;Hong Mei;Shunxiang Yang

  • Affiliations:
  • Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China

  • Venue:
  • Proceedings of the ACM international conference on Object oriented programming systems languages and applications
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Computation offloading is a promising way to improve the performance as well as reducing the battery power consumption of a smartphone application by executing some parts of the application on a remote server. Supporting such capability is not easy for smartphone application developers due to (1) correctness: some code, e.g., that for GPS, gravity, and other sensors, can run only on the smartphone so that developers have to identify which parts of the application cannot be offloaded; (2) effectiveness: the reduced execution time must be greater than the network delay caused by computation offloading so that developers need to calculate which parts are worth offloading; (3) adaptability: smartphone applications often face changes of user requirements and runtime environments so that developers need to implement the adaptation on offloading. More importantly, considering the large number of today's smartphone applications, solutions applicable for legacy applications will be much more valuable. In this paper, we present a tool, named DPartner, that automatically refactors Android applications to be the ones with computation offloading capability. For a given Android application, DPartner first analyzes its bytecode for discovering the parts worth offloading, then rewrites the bytecode to implement a special program structure supporting on-demand offloading, and finally generates two artifacts to be deployed onto an Android phone and the server, respectively. We evaluated DPartner on three real-world Android applications, demonstrating the reduction of execution time by 46%-97% and battery power consumption by 27%-83%.