# Energy-Optimized Content Refreshing of Age-of-Information-Aware Edge Caches in IoT Systems
## 3 System Overview and Model
### System-Model Overview
#### 3.1.3 IoT Proxy  
We propose to deploy the IoT proxy at the network edge, in between the IoT devices and the IoT application. Hence, it can efficiently use a network, computing, and storage resources at the edge to overcome the limits imposed by IoT devices and networks [11]. More in detail, we propose that the proxy implements a cache: it tries to respond to server requests using the cached items, thus reducing the energy consumption on the device. However, caching may lead to the staleness of information, while the IoT application demands timeliness of status updates, so the cache needs a refreshing scheme. Typically, a cache associates a validity lifetime to each stored item and when the lifetime expires, the item is not fresh anymore and should be discarded. Several measures have been introduced to quantify the freshness of a cached item [5] and, among them, AoI is one of the most used [7]. We choose then to evaluate the freshness of a sample using the AoI metrics: in our cache refreshing scheme, a cached item is considered fresh if its AoI is smaller than a refresh window, called \(W\). The proxy responds to the server request using its cached item if it is valid; otherwise, it updates the cache fetching the latest sample from the IoT device and then delivers it to the server. Since this caching mechanism has constant complexity, as it involves only a comparison between the AoI of the cached item and its refresh window, it can easily scale if the proxy has to manage multiple devices. Figure 1c shows an example of the relationship over time between the arrival process of requests from the IoT application, the periodic sampling on the IoT device, and the cache operation on the proxy. Moreover, we assume that before starting to exchange messages, there is a setup phase during which the IoT application specifies its freshness requirements to the proxy in terms of a target percentile \(AoI_{\alpha}\) for a given threshold \(\alpha\).  
The cache system implemented by the proxy Is then composed of a cache with parameter \(W\) and an optimizer that sets the most suitable value of \(W\) (see Figure 1b). \(W\) is the solution to an optimization problem that minimizes the cost in terms of energy consumption at the IoT device while satisfying the AoI requirements of the IoT application. The energy cost depends on the energy consumed to transmit the update messages and the energy consumed to sense the environment. The optimizer takes as inputs the AoI requirements, i.e., \(AoI_{\alpha}\) and \(\alpha\), and the (estimated) average request rate \(\lambda\).  
We assume that the network between the proxy and the server that runs the IoT application, and the access link between the proxy and the IoT device are both ideal, i.e., there is no transmission error. Moreover, being deployed at the edge [11], the proxy can take advantage of the proximity to IoT devices; hence, it experiences small and predictable network delays as compared to AoI requirements. For this reason, it should not be deployed farther from the device. However, the proxy should not be deployed closer, e.g., in a device of the access network itself. Indeed, in the case of a dynamic IoT scenario, e.g., a scenario involving topology changes, a proxy deployed in a device of the access network might fall in a sub-optimal placement with respect to the device-application path. Instead, node mobility is transparent to an edge-based proxy, as it is typically supported by the routing protocol or the handover function of the access network itself. We also assume that the link between the proxy and the server is almost deterministic, so the application can simply take the link delay into account when expressing the freshness requirement. Therefore, they are both assumed to be null in the following derivations.