skip to main content
research-article

Refactoring android Java code for on-demand computation offloading

Authors Info & Claims
Published:19 October 2012Publication History
Skip Abstract Section

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%.

References

  1. Android, http://www.android.com/Google ScholarGoogle Scholar
  2. Smartphone Market Share, http://www.idc.com/getdoc.jsp?containerId=prUS23503312Google ScholarGoogle Scholar
  3. Google Play, https://play.google.com/storeGoogle ScholarGoogle Scholar
  4. The applications number of the Google Play, http://en.wikipedia.org/wiki/Google PlayGoogle ScholarGoogle Scholar
  5. Apps drain battery power, www.droidforums.net/forum/droidrazr-support/216454-battery-drain.htmlGoogle ScholarGoogle Scholar
  6. Android Application Requirements, ww.netmite.com/android/mydroid/development/pdk/docs/system_requirementsGoogle ScholarGoogle Scholar
  7. Karthik Kumar, Jibang Liu, Yung-Hsiang Lu, Bharat Bhargava. "A Survey of Computation Offloading for Mobile Systems". In the Journal of Mobile Networks and Applications, Springer, April, 2012.Google ScholarGoogle Scholar
  8. Dpartner: http://code.google.com/p/dpartner/Google ScholarGoogle Scholar
  9. Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts. "Refactoring: Improving the Design of Existing Code". Publisher:Addison-Wesley, First edition, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Roelof Kemp, Nicholas Palmer. "Cuckoo: a Computation Offoading Framework for Smartphones". In Proceedings of the International Conference on Mobile Computing, Applications, and Services (MobiCase), pp. 1--20, 2010.Google ScholarGoogle Scholar
  11. Eduardo Cuervoy, Aruna Balasubramanianz, Stefan Saroiux, Ranveer Chandrax, Paramvir Bahlx. "MAUI: Making Smartphones Last Longer with Code Offload". In Proceedings of the International Conference on Mobile Systems, Applications, and Services (MobiSys), pp. 49 - 62, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Galen C. Hunt and Michael L. Scott. "The Coign Automatic Distributed Partitioning System". In Proceedings of the USENIX Symposium on Operating Systems Design and Implementation (OSDI), pp. 187--200, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Eli Tilevich and Yannis Smaragdakis. "J-Orchestra: Enhancing Java Programs with Distribution Capabilities". In ACM Transactions on Software Engineering and Methodology (TOSEM), Vol. 19, No. 1, Article 1, pp. 1--41, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Michael Philippsen and Matthias Zenger. "JavaParty: Transparent Remote Objects in Java". In Concurrency: Practice and Experience 9(11):1225--1242, John Wiley & Sons, Ltd., 1997.Google ScholarGoogle Scholar
  15. Alan Messer, Ira Greenberg, Philippe Bernadat, DeJan Milojieie, Deqing Chen, T.J. Giuli, Xiaohui Gu. "Towards a distributed platform for resource-constrained devices". In Proceedings of the International Conference on Distributed Computing Systems (ICDCS), pp. 43--51, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Xiaohui Gu, Klara Nahrstedt, Alan Messer, Ira Greenberg, and Dejan Milojicic. "Adaptive Offloading for Pervasive Computing". In IEEE Pervasive Computing, pp. 66--73, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Byung-Gon Chun, Sunghwan Ihm, Petros Maniatis, et al. "CloneCloud: Elastic Execution between Mobile Device and Cloud". In Proceedings of the European Conference on Computer Systems (EuroSys), pp. 301--314, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Lei Wang and Michael Franz. "Automatic Partitioning of Object-Oriented Programs for Resource-Constrained Mobile Devices with Multiple Distribution Objectives". In Proceedings of the International Conference on Parallel and Distributed Systems (ICPADS), pp. 369--376, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Flinn, S. Park, and M. Satyanarayanan. "Balancing Performance, Energy, and Quality in Pervasive Computing". In Proceedings of the IEEE International Conference on Distributed Computing Systems (ICDCS), pp. 1--10, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Lara, D. S. Wallach, and W. Zwaenepoel. "Puppeteer: Component-based Adaptation for Mobile Computing". In Proceedings of the USENIX Symposium on Internet Technologies and Systems (USITS), pp. 159--170, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Eli Tilevich and Yannis Smaragdakis. "Portable and Efficient Distributed Threads for Java". In Proceedings of the ACM/IFIP/USENIX International Middleware Conference (Middleware), pp. 478--492, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Girvan, M. and NewMan, M.E.. "Community structure in social and biological networks". In Proceedings of the National Academy of Sciences of the United States of America (PNAS), Vol. 99, pp. 7821--7826, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  23. J. Han and M. Kamber. "Data Mining: Concepts and Techniques". Morgan Kaufmann Publishers, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lu Zhang, Jing Luo, He Li, Jiasu Sun, and Hong Mei. "A Biting-Down Approach to Hierarchical Decomposition of Object-Oriented Systems Based on Structure Analysis". In the Journal of Software Maintenance and Evolution: Research and Practice, Vol. 22, No. 8, pp. 567--596, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Jonathan I. Maletic and Andrian Marcus. "Supporting Program Comprehension Using Semantic and Structural Information". In Proceedings of the International Conference on Software Engineering (ICSE), pp. 103--112, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Call Graph, http://en.wikipedia.org/wiki/Call graphGoogle ScholarGoogle Scholar
  27. Walter Binder, et al. "Using Bytecode Instruction Counting as Portable CPU Consumption Metric". In Electronic Notes in Theoretical Computer Science, Elsevier, pp. 57--77, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. HTC Tattoo, www.htc.com/europe/product/tattoo/overview.htmlGoogle ScholarGoogle Scholar
  29. PowerTutor, http://powertutor.org/Google ScholarGoogle Scholar
  30. L. Zhang, B. Tiwana, Z. Qian, Z.Wang, et al. "Accurate online power estimation and automatic battery behavior based power model generation for smartphones". In Proceedings of the International Conference on Hardware/Software Codesign and System Synthesis (CODES+ISSS), pp. 105--114, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Saleh E., Abdullahi, et al. "Garbage Collecting the Internet: A Survey of Distributed Garbage Collection". In ACM Computing Surveys, Vol. 30, No. 3, pp. 330--373, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Network Driver Interface Specification (NDIS), http://wikipedia.org/wiki/Network Driver Interface SpecGoogle ScholarGoogle Scholar
  33. The Android application categories, http://www.appbrain.com/stats/android-market-app-categoriesGoogle ScholarGoogle Scholar
  34. Wi-Fi Hotspots in Beijing, http://www.theregister.co.uk/2011/11/03/china free wifi/Google ScholarGoogle Scholar
  35. Linpack, https://market.android.com/details?id=com.greenecomputing.linpackGoogle ScholarGoogle Scholar
  36. Chess Game, http://code.google.com/p/andgoid/Google ScholarGoogle Scholar
  37. Car Game, http://code.google.com/p/xrace-sa/Google ScholarGoogle Scholar
  38. Android Service, http://developer.android.com/reference/android/app/Service.htmlGoogle ScholarGoogle Scholar
  39. Android Interface Definition Language (AIDL), http://developer.android.com/guide/developing/tools/aidl.htmlGoogle ScholarGoogle Scholar
  40. Android Api Demo, http://developer.android.com/resources/samples/ApiDemos/Google ScholarGoogle Scholar
  41. The JavaTM Virtual Machine Specification, second edition, http://docs.oracle.com/javase/specs/jvms/se7/html/index.htmlGoogle ScholarGoogle Scholar
  42. Java Reflection, http://java.sun.com/developer/technicalArticles/ALT/Reflection/Google ScholarGoogle Scholar
  43. Dexmaker: Programmatic code generation for Android, http://code.google.com/p/dexmaker/Google ScholarGoogle Scholar
  44. ASM: A Java bytecode engineering library, http://download.forge.objectweb.org/asm/asm4-guide.pdfGoogle ScholarGoogle Scholar
  45. Remote Method Invocation (RMI), http://docs.oracle.com/javase/tutorial/rmi/overview.htmlGoogle ScholarGoogle Scholar
  46. Android OpenGL ES, http://developer.android.com/guide/topics/graphics/opengl.htmlGoogle ScholarGoogle Scholar
  47. Internetware Testbed, http://icloud.internetware.org/Google ScholarGoogle Scholar
  48. Xen, http://www.xen.org/Google ScholarGoogle Scholar

Index Terms

  1. Refactoring android Java code for on-demand computation offloading

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 47, Issue 10
              OOPSLA '12
              October 2012
              1011 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2398857
              Issue’s Table of Contents
              • cover image ACM Conferences
                OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
                October 2012
                1052 pages
                ISBN:9781450315616
                DOI:10.1145/2384616

              Copyright © 2012 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 19 October 2012

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!