Download presentation
Presentation is loading. Please wait.
Published byMabel Norris Modified over 8 years ago
1
Nguyen Thi Thanh Nha HMCL by Ying Zhang, Gang Huang, Xuanzhe Liu, Wei Zhang, Hong Mei, and Shunxiang Yang Refactoring Android Java Code for On-Demand Computation Offloading
2
Nguyen Thi Thanh Nha - HMCL Android is open source More than 59% of smartphone market Limits Battery Power Size Processing Power Refactoring Android Java Code for On-Demand Computation Offloading 2
3
Nguyen Thi Thanh Nha - HMCL Some code can only run in a mobile device GPS Accelerometer Sensors -> Have to identify which parts of the app cannot be offloaded The reduced execution time must be greater than the network delay caused by computation offloading -> Have to calculate which parts are worth offloading Changes of user requirements and runtime environments -> Have to consider such changes in computation offloading Refactoring Android Java Code for On-Demand Computation Offloading 3
4
Nguyen Thi Thanh Nha - HMCL 4 Present a tool, named DPartner, that automatically refactors Android applications to be the ones with computation offloading capability Refactoring Android Java Code for On-Demand Computation Offloading Refactoring restructure the given code without altering the external functionality Refactoring restructure the given code without altering the external functionality
5
Nguyen Thi Thanh Nha - HMCL Offloading computations can be implemented as remotely deploying and invoking classes performing the computation Refactoring is characterized by three aspects Source Structure Local invocation Remote invocation Target Structure On-demand Remote Invocation Refactoring Steps Refactoring Android Java Code for On-Demand Computation Offloading 5
6
Nguyen Thi Thanh Nha - HMCL Programs run on local processor Not support offloading any computation in class N Refactoring Android Java Code for On-Demand Computation Offloading 6
7
Nguyen Thi Thanh Nha - HMCL Class X invoke the methods of a remote class N. Support offloading computation in class N Problem: time and energy consuming if N and X are in the same VM Refactoring Android Java Code for On-Demand Computation Offloading 7
8
Nguyen Thi Thanh Nha - HMCL Refactoring Android Java Code for On-Demand Computation Offloading 8 Forwards the method invocations to the latter Keeps unchanged if the location of the proxied class N is changed from local to remote, or from one remote server to another -> program structure will not know if the server or connection is changed Determine the current location of N Cross network communication from X to N
9
Nguyen Thi Thanh Nha - HMCL Refactoring Android Java Code for On-Demand Computation Offloading 9 Two Types of classes Movable Anchored: use some special resources available only on the phone Structure is changed to process on remote server. Classes that frequently interacted should be offloaded as a whole. Avoid the time-consuming network communication Help accelerate runtime decision The Java byte code and resources are packaged and generated into two deployable files.
10
Nguyen Thi Thanh Nha - HMCL 10 Refactoring Android Java Code for On-Demand Computation Offloading
11
Nguyen Thi Thanh Nha - HMCL 11 Anchored class Exist “native” keyword in class methods The class extends/implements/uses the Android system classes E.g. the “android.view.View” class is used as the parent class for drawing the GUI of an Android app Movable class The rest of classes False negative: a class is classified as anchored but it can actually be offloaded. False positive: a class is classified as movable but it cannot be offloaded. Provides a configuration file in which the naming patterns of anchored classes Provides a configuration file in which the naming patterns of anchored classes Refactoring Android Java Code for On-Demand Computation Offloading
12
Nguyen Thi Thanh Nha - HMCL 12 make a proxy act exactly like its proxied class the proxy will have the same program structure as the proxied class N extends NParent, NProxy should also extend NParent’s proxy Refactoring Android Java Code for On-Demand Computation Offloading
13
Nguyen Thi Thanh Nha - HMCL Evaluated on 3 Android applications Reduced execution time by 46%-97% Reduced battery consumption 27%-83% Refactoring Android Java Code for On-Demand Computation Offloading 13
14
Nguyen Thi Thanh Nha - HMCL THANK YOU Refactoring Android Java Code for On-Demand Computation Offloading 14
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.