Caching

Investigating the effect of new caching techniques on energy usage of mobile devices.

Caching involves saving previously downloaded resources into local storage on a device, so that it can be referred to later if required by subsequent access of the same data, provided that it has not changed in the meantime. Caching is important in saving energy, as it can prevent network activity when accessing data previously required before. Caching has different effectiveness at the various levels between the raw IP stream and the objects in the memory of apps. We will consider HTTP caching at both the app and operating system level, as well as delta encoding of data.

HTTP Caching

Data transmitted over HTTP makes up the majority of data consumed by mobile devices. HTTP is the standard protocol of the web and has also become the de-facto standard for many APIs and other services used by mobile applications. Thus there is potential for a standardised system for caching HTTP data to have a significant impact on energy usage and data transmission rates. However, at present, caching is performed by few apps and inadequately by most mobile web browsers. There is little incentive from users on app developers to add caching, and many perceived disbenefits to those developers, including little improvement to performance, increased code complexity and the potential to display outdated information (1).

To solve this problem, new caching technologies and algorithms have been developed, that can automatically cache HTTP requests when required, with no changes required to apps. This type of caching works on the level of entire responses and could potentially reduce energy consumption by 20% over the same system without caching (2).

Alternatively, if app integration is desired, caching can occur at the level of objects in the response stream, e.g. JSON components. This could potentially lead to improvements by up to 45% in energy consumption, although it requires integration into both the applications as well as remote servers. For some heavily used apps, though, this integration could prove worthwhile (2).

Delta Encoding

Similarly to how caching reduces the impact of reloading unchanged data, delta encoding (also known as redundancy elimination) reduces the impact of reloading slightly changed data. Instead of transmitting a whole document over the network, when only some part of it has been updated, only the updated components will be sent. Then the application on the mobile device can reconstruct the full document using their previous version as well as the new changes made to it.

This technique is particularly useful for synchronisation of large files between different devices, and many file-synchronisation applications already use delta encoding to reduce transmission volume. Although in theory delta encoding is applicable to many uses, the benefit can be small in some cases, and the development cost is high. Improving developer tooling could help to increase use of these techniques (3).