  Smartphones suffer from limited computational capabilities and battery life.
A method to mitigate these problems is code offloading: executing application
code on a remote server. We introduce COARA, a middleware platform for code
offloading on Android that uses aspect-oriented programming (AOP) with AspectJ.
AOP allows COARA to intercept code for offloading without a customized compiler
or modification of the operating system. COARA requires minimal changes to
application source code, and does not require the application developer to be
aware of AOP. Since state transfer to the server is often a bottleneck that
hinders performance, COARA uses AOP to intercept the transmission of large
objects from the client and replaces them with object proxies. The server can
begin execution of the offloaded application code, regardless of whether all
required objects been transferred to the server. We run COARA with Android
applications from the Google Play store on a Nexus 4 running unmodified Android
4.3 to prove that our platform improves performance and reduces energy
consumption. Our approach yields speedups of 24x and 6x over WiFi and 3G
respectively.
