Advances in mobile hardware and operating systems have made mobile a ﬁrst-class development platform. Activities such as web browsing, casual game play, media playback, and document reading are now as common on mobile devices as on full-sized desktop systems. However, developers are still constrained by the inherent resource limitations of mobile devices. Unlike desktop systems, mobile devices must sacriﬁce performance to accomodate smaller form factors and battery-backed operation. Opportunistic ofﬂoading of computation from a mobile device to remote server infrastructure (i.e., ”code ofﬂoad”) offers a promising way to overcome these constraints and to expand the set of applications (i.e., ”apps”) that can run on devices.
Deciding to ofﬂoad requires a careful consideration of the costs and beneﬁts of a range of possible program partitions. This cost-beneﬁt analysis depends on external factors, such as network conditions and the resources availability, as well as internal app properties, such as component dependencies, data representations, and code complexity. Thus, beneﬁting from ofﬂoad requires some assistance from developers, but requiring developers to adopt arcane or unnatural programming models will hinder adoption of regardless of the potential beneﬁts.
In this dissertation I characterize two frameworks that reduce the amount of developer effort required to improve the performance of mobile apps through code ofﬂoad. The ﬁrst, MAUI, is designed for computationally intensive general-purpose apps such as speech and facial recognition. The second, Kahawai, is designed for graphics-intensive apps like fast live action video games.
MAUI continuously monitors the device, network, and app, and uses its measurements to compute an energy-efﬁcient program partition. MAUI reduces the burden on developers by taking advantage of core features of the managed code environments common to mobile platforms: codeportability, serialization, reﬂection, and type safety. These features allows MAUI to automatically instrument and potentially ofﬂoad methods that the developer has tagged as suitable for ofﬂoad. MAUI is particularly effective on applications composed by operations whose computational cost is large compared to the transfer cost of their input parameters and their output results.
Kahawai is designed for graphics-intensive apps such as console-style games and takes advantage of two features of today’s mobile gaming platforms: capable mobile GPUs and reusable game engines. Even though today’s mobile devices cannot duplicate the sophisticated graphical detail provided by gaming consoles and high-end desktop GPUs, devices have seen rapid improvements in their GPU processing capabilities. Kahawai leverages a device’s GPU to provide collaborative rendering. Collaborative rendering relies on a mobile GPU to generate low-ﬁdelity output, which when combined with server-side GPU output allows a mobile device to display a high-ﬁdelity result. The beneﬁts of collaborative rendering are substantial: mobile clients can experience high-quality graphical output using relatively little bandwidth. Fortunately, because most modern games are built on top of reusable game engines, developers only have to identify the sources of non-determinism in the game logic to take advantage collaborative rendering.
Together, MAUI and Kahawai demonstrate that code ofﬂoad can provide substantial beneﬁts for mobile apps without overburdening app developers.