Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed...

17
HAL Id: hal-01676509 https://hal.laas.fr/hal-01676509 Submitted on 5 Jan 2018 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Cache Freshness in Named Data Networking for the Internet of Things Maroua Meddeb, Amine Dhraief, Abdelfettah Belghith, Thierry Monteil, Khalil Drira, Saad Alahmadi To cite this version: Maroua Meddeb, Amine Dhraief, Abdelfettah Belghith, Thierry Monteil, Khalil Drira, et al.. Cache Freshness in Named Data Networking for the Internet of Things. The Computer Journal, Oxford University Press (UK), 2018, 61 (10), pp.1496-1511. 10.1093/comjnl/bxy005. hal-01676509

Transcript of Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed...

Page 1: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

HAL Id: hal-01676509https://hal.laas.fr/hal-01676509

Submitted on 5 Jan 2018

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

Cache Freshness in Named Data Networking for theInternet of Things

Maroua Meddeb, Amine Dhraief, Abdelfettah Belghith, Thierry Monteil,Khalil Drira, Saad Alahmadi

To cite this version:Maroua Meddeb, Amine Dhraief, Abdelfettah Belghith, Thierry Monteil, Khalil Drira, et al.. CacheFreshness in Named Data Networking for the Internet of Things. The Computer Journal, OxfordUniversity Press (UK), 2018, 61 (10), pp.1496-1511. �10.1093/comjnl/bxy005�. �hal-01676509�

Page 2: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named DataNetworking for the Internet of Things

Maroua Meddeb1,2, Amine Dhraief1, Abdelfettah Belghith4,5,Thierry Monteil2,3, Khalil Drira2, Saad AlAhmadi4

1 HANA Lab, Univeristy of Manouba, Tunisia2LAAS-CNRS, Universite de Toulouse, CNRS, Toulouse, France

3Univ de Toulouse, INSA, F-31400 Toulouse, France4College of Computer and Information Sciences, King Saud University, Saudi Arabia

5Corresponding Author

Email: [email protected]

The Information-Centric Networking (ICN) paradigm is shaping the foreseenfuture Internet architecture by focusing on the data itself rather than its hostinglocation. It is a shift from a host-centric communication model to a content-centric model supporting among others unique and location-independent contentnames, in-network caching and name-based routing. By leveraging the easy dataaccess, and reducing both the retrieval delay and the load on the data producer,the ICN can be a viable framework to support the Internet of Things (IoT),interconnecting billions of heterogeneous constrained objects. Among several ICNarchitectures, the Named Data Networking (NDN) is considered as a suitable ICNarchitecture for IoT systems. However, its default caching approach lacks a datafreshness mechanism, while IoT data are transient and frequently updated by theproducer which imposes stringent requirements in terms of information freshness.Furthermore, IoT devices are usually resource-constrained with harsh limitationson energy, memory and processing power. We propose in this paper a cachingstrategy and a novel cache freshness mechanism to monitor the validity of cachedcontents in an IoT environment while minimizing the caching process cost. Wecompared our solution to several relevant schemes using the ccnSim simulator.Our solution exhibits the best system performances in terms of hop reductionratio, server hit reduction ratio and response latency, yet it provides the lowest

cache cost and significantly improves the content validity.

Keywords: ICN; NDN; IoT; In-network caching; Freshness; Cache cost

1. INTRODUCTION

The rapid rise in the number of small embeddeddevices along with the improvement of wirelesstechnologies enabling objects to communicate, computeand coordinate form the foundation of the so-calledInternet of Things (IoT). Despite the diversity of theresearch on IoT, its definition remains fuzzy [1]. Mostof the definitions agree on the fact that it can bedefined as a global network that interconnects smartdevices able to sense and react according to theirenvironmental situations. This innovation is expectedto significantly increase the number of contents carriedby the network. However, unlike traditional Internethosts, IoT devices are resource-constrained in terms ofmemory, energy and processing power that require ascalable architecture to support data dissemination inthe network.

IoT data are usually small and frequently transientcompared to Internet contents which are large and

time-invariant[1]. IoT applications impose stringentrequirements on some critical domain applicationsuch as Smart Home. Furthermore, they arelooking for information rather than point-to-pointcommunications. Facing these distinct particularities ofIoT systems, the research community has been activelyworking on the adoption of a new networking protocolstack that effectively supports IoT communications.

The current Internet communication model is builtaccording to a host-centric view of the network.Whenever a source node requests a specific content,it has first to fully locate and identify the node onwhich this content is stored. It is worth notingthat this paradigm has survived for the last fourdecades. Nowadays, it has inexorably reached itslimits. Actually, current nodes are equipped withseveral network interfaces bound to distinct accesstechnologies. With the democratization of the IPv6protocol, each interface has its own global networkaddress. Besides, the Internet is no more an

The Computer Journal, Vol. ??, No. ??, ????

Page 3: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

2 M. Meddeb

interconnection/concatenation of disjoint networks, buthas become an overlay network where users sharecontents. Internet traffic pattern has mutated from theclassical ”one-to-one” to the dominant ”one-to-many”and ”many-to-many”. In addition to the Internetevolution, its current architecture has some limitstowards efficient and scalable content distribution,mobility and security. Regarding these problems, theInternet requires, nowadays, to be redesigned for itshealthy and sustainable future growth.

This issue has attracted the attention of manyresearchers [1]. For instance, Van Jacobson et al. havetaken the initiative in [2] to address this subject. Theyhave introduced a novel paradigm, namely Information-Centric Networking (ICN). The latter constitutes a shiftfrom a host-centric view of the network to a content-centric one. According to this new paradigm, the userrequests a content by its name instead of using itsnetwork localization. In ICN, every content is identifiedby a unique, persistent and location-independent name.ICN provides native multicast support, in-networkcaching, name-based routing and easy data access. Asa result, ICN has the potential to become the keytechnology for data dissemination in IoT networks.

Such issue has already been investigated by severalstudies [3], [4], [5], [6], [7], [8] and [9]. In particular, thein-network caching enhances the producer data accesssince data can be provided by any intermediate node.Consequently, data caching speeds up the data retrieval,and reduces the network traffic. Hence, ICN leads toa low dissemination latency, a considerable reductionof the bandwidth as well as a decrease in the energyconsumed by producers which are resource-constrainedIoT devices.

Many test beds were proposed in the literatureto evaluate ICN solutions. We cite Open NetworkLab, PlanetLab, Emulab, Deter, NEPI, PURSUITBlackadder test bed and JGN-X [10]. Other test bedsare currently used for ICN experiments on IoT, whichare CCN-lite on top of the RIOT operating system [4]and IoT-LAB [11].

The caching concept, which is not a revolutionaryterm, has been widely used on the Web, P2P systemsand Content Distribution Networks (CDNs). However,in ICN, the in-network caching is more prominent andmore challenging than the already existing cachingsystems. First, it is transparent and does not requireany specific application to cache content. Second, it isubiquitous since any ICN nodes can be a cache[12]. Itis worth-noticing that in-network caching only providesthe last version of sensed data so it may be unsuitablefor applications requiring previous measurements as isin the case of Health applications. In our study, werather consider the Smart Home scenario and we usereal smart building data.

Several studies have already addressed the in-networkcaching in ICN. However, we claim that the proposedcaching strategies are not suitable for IoT systems due

to the stringent requirement in term of data freshness.Since cached copies can be out of date, a freshnessmechanism must be adopted to check the validity ofthe retrieved data. This problem is called the cachefreshness (coherence/validity) [13]. We notice that onlyfew work addressed the in-network caching in IoT[14],[4].

Several ICN approaches have been proposed, suchas DONA, NDN, NetInf, COMET, CONVERGENCE,Mobility First and PRISP. We refer the reader to[15] and [16] for a general survey on ICN. The so-called Named Data Networking (NDN) is consideredas the most suitable ICN architecture for IoT systems[17], [8], [4], [6], [18], [19], [20] and [21]. It definesa receiver-driven, pull-based, robust connection-lesscommunication model. These features are beneficialfor the IoT systems in terms of easy and scalabledata access, energy efficiency, security and mobilitysupport[22]. We adopt, in our study, the NDNapproach.

The use of NDN in an IoT environment must takeinto consideration two major issues. Firstly, IoT devicesare heavily constrained in terms of memory, battery andcomputation power, and as such we must introduce non-costly caching strategies while maintaining good systemperformances. Secondly, data freshness is paramountsince IoT contents are transient and frequently updated.

The contribution of this paper is twofold. We firstpropose a caching strategy, named consumer-cache thatcaches content close to consumers. Second, we designa freshness mechanism termed event-based freshnesswhich is based on the time prediction of IoT traffic.In this context, we aim to improve existing in-networkcaching strategies, including our proposed strategy,in order to support event-based freshness mechanism.By comparing the latter to the existing freshnessmechanisms, we could demonstrate that our freshnessmechanism significantly improves the content validitywith all caching strategies.

The remainder of the paper is organized as follows:we overview, in section 2, the in-network caching inICN. Furthermore, we discuss the principal studiesof the research community in ICN approaches thattargeted IoT systems. Section 3 describes our proposedscheme and presents a concrete use case. We presentand analyze simulation results in section 4, beforediscussing the results and concluding the paper insection 5 and 6.

2. BACKGROUND

2.1. ICN in-network caching mechanisms

In this section, we will first focus on in-network cachingfeatures, namely, in-network caching strategies endfreshness mechanisms. Then, we will introduce somerelated work about in-network caching in ICN-IoTsystems.

The Computer Journal, Vol. ??, No. ??, ????

Page 4: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 3

A major building block of ICN concerns the in-network caching. The latter is the most commonand important feature of ICN architectures. It wasintroduced to alleviate the pressure on the networkbandwidth and consequently improves the efficiency ofcontents dissemination[12]. However, the in-networkcaching decision is affected by various aspects includingcache size, cache decision, cache eviction policies, cachefreshness and availability of cached contents. Thecache eviction is performed once the cache is full. Oldcontents are deleted, according to a policy, to allowstoring new ones. It is also worth noticing that thecost of in-network caching is somewhat high in termsof larger overhead and complexity, which is unsuitablefor IoT systems in the presence of resource-constraineddevices.

The in-network caching is classified into twoscenarios: On-path and Off-path caching. With theOn-path scenario, cache nodes belong to the requestpath. When the requested content is forwardedto the consumer, nodes on the requested path maychoose to cache the content according to their specificcaching policy. We will detail different on-path cachingstrategies in the following subsection. In the Off-path caching scenario, cache nodes are rather fixed inadvance within the topology. In fact, each producerhas an associated cache element known in advance.Producer forward the content to both the consumer andthe associated cache [23]. In this paper, we solely focuson the on-path caching.

2.1.1. Existing on-path caching strategiesIn order to improve the cache diversity, and reducecached contents redundancy, several caching strategieshave been proposed[12]. At a given node, the decisionto cache or not a content is made based on a cachingstrategy. We quote some of the proposed in-networkcaching strategies. The most known is Leave CopyEverywhere (LCE) [24] in which each nodes, belongingto the path towards the consumer, keeps a copy ofthe content. While, with Leave Copy Down (LCD)[24], only the node on one level down in the reversepath towards the consumer stores a copy. Probabilisticcache (ProbCache) [25] privileges caching close toconsumers. In fact, the caching process is performedwith a changing probability inversely proportional tothe distance between the consumer and the producer.The Betweenness Centrality (Btw) [26] strategy is basedon a pre-calculated parameter for each node. Thisparameter measures the number of times that a nodebelongs to a path between all pairs of nodes in a networktopology. When the request is sent along a path, thegreatest betweenness centrality of the traversed nodesis stored. Then, it is appended to the data message.When the response is sent towards the consumer, acopy of the content is only cached in nodes having thehighest value. Finally, the Edge-caching strategy[27] is

proposed for hierarchical topology and caches contentsat the topology leaves.

2.1.2. Existing freshness mechanisms

Cache freshness maintains the validity of the sharedcontents stored in multiple caches. As an immediateconsequence, consumers can trust copies in caches. Acopy is considered valid when it has the same version asthe source, or when the difference between the data inthe source and its copy in the cache is not important.For example, for a home automation usage, a cachedtemperature value of 23◦ is considered valid when theambient temperature is to 24◦.

In [13], Dingle et al., have focused on the webcache coherence. The cache freshness problem in boththe Web and ICN remains the same. This issueis also addressed in the area of distributed systems.Maintaining freshness is easier in Web caches than indistributed files because these latter support distributedwrites. Whereas, updating Web contents is performedonly by the content’s producer. In the sequel, weintroduce the representative freshness mechanisms usedby popular distributed file systems. These mechanismscan be classified into two major classes. First, theValidation check [28] mechanism in which the validityof the requested content is checked with the time-stamp(caching time). The time-stamp is sent to the producerto check if the data has not been modified since it wascached. Second, the Callback mechanism [29], in whichall cache nodes are notified by the producer wheneveran update occurs. In this case, the producer must havethe list of all content’s caches, which is unsuitable.

Concerning the web-freshness mechanisms, there arefour major approaches. First, the HTTP Headers[30]mechanism, in which an If-Modified-Since header isappended to the request in order to check if thelast modification time of the content is greater thanthe If-Modified-Since time in the request header.This is called a conditional GET. Second, the”Naive” coherence[30] which is proposed for hierarchicaltopology. This mechanism is a particular case of HTTPheaders. In fact, to check the content validity in a cache,the latter sends a conditional GET message only to thenext higher cache or server. Third, the Expiration-based freshness[31] mechanism. In this one, eachcontent is marked with an expiration time. The contentis assumed valid as long as the expiration time hasnot elapsed. Fourth, the pre-fetching[32] mechanismconsists in periodically refreshing the cached contents.This is performed by sending conditional GET requeststo check if the content has been changed. The maindisadvantage of this mechanism is the decision ofcontents refreshment time. This decision depends onthe content age and popularity. In some cases, it maybe useless to refresh it.

The Computer Journal, Vol. ??, No. ??, ????

Page 5: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

4 M. Meddeb

2.2. Related Work

The deployment of IoT systems enabling ICN featureshas started to gain momentum within the researchcommunity. An interesting contribution in this fieldwas proposed by Pentikousis et al., in [3]. The authorspresented several ICN baseline scenarios including IoTapplications.

In [4], authors showed that ICN can be applicable inIoT, and is efficient in terms of energy consumption andmemory costs. The results presented in [4] showed thatthe number of radio transmissions is drastically reducedthanks ti in-network caching. This work constitutesthe first study of ICN in a real IoT deployment. Theauthors defended the NDN architecture that is veryeffective in IoT scenarios. They also proved that thisarchitecture satisfies IoT requirements.

The beneficial effect of the named data on IoT isidentified in [5] by Heidemann et al. Authors discussedthat content naming is considered as the building blockof ICN by making the information easily and uniquelyidentified in the network. Moreover, they showedthat naming, as one of the ICN features, makes thedeployment of IoT in ICN more effective.

Authors in [6], defined NDOMUS (Named DatanetwOrking for sMart home aUtomation) as aframework based on the NDN-IoT architecture tailoredto the smart home domain. They presented several use-cases. They also evaluated the proposed framework bycalculating the transmitted packets number.

As discussed in [7], using the already existingICN caching mechanisms leads to a considerablereduction in the consumed energy and bandwidth.Authors showed that as the available caching storagecapacity increases, the consumption of both energy andbandwidth decreases.

Hail et al., in [8] proposed a novel distributed prob-abilistic caching strategy named probabilistic CAchingSTrategy for the INternet of thinGs (pCASTING) thatconsiders data freshness and potentially constrained ca-pabilities of IoT devices. The pCASTING strategy ad-justs the caching probability by considering the batteryenergy level, the cache occupancy and the data fresh-ness. In such a way, fresher data have priority in thecaching decision. The freshness is evaluated by a pa-rameter that measures how many seconds the contentis considered as valid in the cache. Results show theeffectiveness of the proposed scheme in terms of energyconsumption and content retrieval delays.

The work presented in [9] addresses the informationfreshness in cache nodes. Authors proposed a freshnessparameter. Unlike the defined parameter in [8], thesuggested one is not variable. It can be adjustedby consumers to specify their particular freshnessrequirements. Simulation results show that the receiveddata validity has been improved.

The work of [14] is the first study addressing thein-network caching of IoT data at content routers on

the Internet. Authors of this work discussed the trade-off between the multi-hop communication cost and thefreshness of a requested data. In this context, theyintroduced a distributed probabilistic caching strategyin which cache nodes dynamically update their cachingprobability. This probability depends on the distancebetween the producer and the consumer as well as onthe data freshness in a way that the closer the cachinglocation is to the producer, the fresher the retrieveddata packet is. Two results were observed. First,the more popular the content is, the higher the costreduction will be. Second, when caching nodes arecloser to consumers, IoT data put a lower workload onthe network.

To the best of our knowledge, [33] was the firstattempt studying the in-network caching of transientdata in IoT systems. In this study, the authorsaimed to prove the efficiency of in-network cachingin IoT even with transient data. To this end,they quantified caching gains with transient items byintroducing an analytical model to capture the trade-off between communication cost and data freshness. Intheir simulations, they assumed that each data has aknown lifetime. Through simulations, they showed thebenefit of using Internet routers to cache transient datagenerated by IoT applications.

Few studies considered the ICN approach in specificIoT application domains such as Vehicle-to-Vehicle(V2V) communications[34], Wireless sensors networks[35],[36],[37],[38], Smart Home [6] and Smart Grid [39].

3. A COHERENT CACHING STRATEGYFOR A NAMED DATA IOT NETWORKS

In this section, we present our proposed freshness-awarecaching strategy for NDN IoT networks introduced inour previous work[21]. Our main objective is, first, toreduce the caching cost while maintaining the systemperformances in terms of hop reduction and serverhit reduction ratios. Second, we aim to enhance thepercentage of the freshness of the requested content.For this purpose, we suggest an in-network cachingstrategy that privileges to cache at gateways close to theconsumers, and a cache freshness mechanism dedicatedto the IoT traffic pattern.

Before going into the details of our contributions, weneed first to understand the IoT architecture. Untilnow, there is still no consensus on the physical modelof the IoT architecture to adopt. Two divergent visionsare tacitly used in various IoT experiments. The firstconsiders the IoT as a collection of sensors/actuatorsinteracting with each other without any intermediateequipment. The second vision assumes that actuatorsand sensors communicate through their respectivegateways. In an IoT scenario where actuators andsensors directly communicate with each other, anactuator directly requests a sensor to get the measuredvalue by the latter. This scenario assumes that the

The Computer Journal, Vol. ??, No. ??, ????

Page 6: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 5

actuators and sensors are provided with an operatingsystem, software applications and memory. In thesecond model, gateways play a key role. In fact,actuators, as well as sensors, are directly connectedthereto. Contrary to the first view, the measured valueby a sensor is no longer stored in the memory of thelatter but in the gateway to which it is attached.

Starting from the premise that IoT devices areresource-constrained, caching data, as small as theyare, in a sensor memory, will be the determinantof embedded applications and operating systems. Inaddition, the caching decision is made by the CPU ofthe sensor which decreases the battery lifetime. Finally,the cached data retrieval will consume valuable sensor’sradio resources. For these reasons, we propose to adopt,in this paper, an NDN IoT architecture where dataare cached on the gateways and sensors represent theproducers.

3.1. Consumer-cache strategy

In this section, we detail our first contribution:consumer-cache. Consumer-cache is an (i) on-pathcaching strategy (ii) which targets to reduce the numberof caches nodes and (iii) privileges gateways directlylinked to consumers.

In an IoT context, we believe that it is preferableto distribute caches on the network topology (on-path) rather than centralizing them on fixed cachingnodes (off-path). With an important number ofequipment and large data flows, specifying particulargateways to handle caching (even locally) would haveas an immediate consequence the creation of multiplecongestions within the network. In addition, the off-path caching increases the signaling overhead sinceit requires, in the caching process, additional packettransmissions to the cache node.

W.K.Chai et al., showed in [26] that caching in fewernodes can perform better results in terms of producerhits and number of the traversed hops to reach acontent. Even caching in one randomly selected cachecan be better than the LCE strategy. With LCE cachesfill up very quickly because the cache size is very limitedcompared to the number of the contents to be cached.Once the cache is full, a replacement process is triggeredto allow caching new items. The more frequent is thereplacement process, the least efficient is the caching,as contents may be cached and then deleted withoutever being used which induces an increased cachingcost. In addition, IoT nodes are memory and energy-constrained, consequently, it is more advantageous tominimize the resource consumption. As a consequence,the second directive aims to reduce the number ofcaches. It should be emphasized that this does notmean that lowering the number of cache nodes providesa better strategy. It is a trade-off between the numberof evictions, the cache cost and the data availability.

From this point of view, we need to know what is the

selection criterion of the placement of cache nodes in atopology. The results obtained in [27] show that edge-caching saves in-network caching benefits. Recall herethat the edge-caching strategy is originally conceivedfor hierarchical topologies. Under this strategy, cachesare located at the leaves of the topology. Results in[27] proved that the most efficient nodes for caching arelocated at the edges of the topology. Since consumersare generally located at network edges and in some casesin the middle of paths, we propose as the third directiveto cache at nodes close to consumers.

Based on these three directives, our caching strategy,termed consumer-cache, proposes to store a copy ofcontents on on-path nodes which are connected to aconsumer. We can say that if all nodes in the topologyare connected to consumers, consumer-cache strategytends towards LCE strategy. Moreover, if consumersare only connected to edges, our strategy will be similarto edge-caching strategy. Our strategy strictly dependson the number of consumers and their locations. Wepresent below the algorithm of the consumer-cachestrategy (Algorithm 1). It is assumed that the requesthas already arrived at the producer, which will send thedesired content to the consumer.

Data:Data to cacheProd = the producer nodeCons = the consumer nodeG = (V,E) a graph that represents the networkPath = (v1, v2, ...vn) ∈ V ∗ V ∗ ... ∗ V s.a:vi adjacent to vi+1 for 1 ≤ i ≤ n andv1 ←− Prodvn ←− ConsResult:The set of selected nodes as a cacheCaches = (vc, ..., vp) ∈ V ∗ V ∗ ... ∗ V s.a:1 ≤ c ≤ p ≤ nCaches ⊆ Pathfor Each nodevi ∈ Path do

if ∃ a consumer connected to nodevi thenCaches = vi Cache(Data,vi)

end

endAlgorithm 1: Consumer-cache strategy

Let us take the example of the topology presented inFigure.1 where Consumer1 requests a content named(c). Initially, all caches are empty. So, the requestis forwarded to the producer. Producer1 holds thecontent (c). The latter sends the response via the pathfrom n11 to n0. While forwarding the response, each ofthe nodes in the response path has to decide whether tocache a copy of (c) according to its own caching strategy.With LCE, all the 10 nodes in the path store a copy.Other strategies require that the content should bestored in only a single node. For LCD, only n11 retainsa copy; whereas with Btw the cache is n6. However,

The Computer Journal, Vol. ??, No. ??, ????

Page 7: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

6 M. Meddeb

under consumer-cache, caches are n7 and n0. ForProbCache, n0 has the greatest probability to be thecache. Let us now assume that Consumer4 requests thesame content (c). It sends a request towards Producer1.With Btw and probably ProbCache, we have a cachemiss. Under the ProbCache strategy, the probability tofind the content in n7 is very low as this node is farfrom Consumer1. Using consumer-cache and LCE therequest is satisfied by n7.

Using edge cache, the request is satisified by a leaverouter (n1). With Edge caching strategy, n0, n1 and n2are selected as caches. Requests issued by Consumer1, Consumer2 or Consumer3 are directly satisfied.However, requests issued from Consumer4 are satisfiedby n1 which is 5 hops away from Consumer4. In thecase of LCE, the cached copies at n0, n3, n4, n5, n6,n8, n9, n10 and n11 are redundant. It is therefore clearthat caching content close to consumers is sufficient toavoid redundancy in other caches.

3.2. Event-based freshness mechanism

To address the cache coherence problem related todifferent in-network caching strategies, we conceivea freshness mechanism which we call event-basedfreshness. The mechanism process depends on the dataflows categories. Being in the case of IoT networks, wefirst detail the different IoT traffic patterns.

3.2.1. The IoT traffic patternsIoT traffic is usually classified into four categories:continuous, periodic, OnOff and request-responsetransmissions[40]. With the continuous transmission,the data are transmitted in a continuous manner likevideo streaming. Under periodic transmission, thesource sends a data at every fixed period of time. Forexample, with a temperature sensor, after the elapse ofeach period (e.g: 1 hour), a new value is recorded. TheOnOff transmission mode stipulates that the content isupdated as soon as new data is sent. Let us consider theexample of a presence sensor. The value 0 of the sensorindicates the absence of persons. Once someone is inthe room, the value is updated to 1. Finally, in therequest-response transmission, as its name indicates,the consumer sends directly a request to get the currentvalue of the sensor. By considering these transmissionmodes, we can assume that sensors can be passive anddo not support any behavior as it is the case in therequest-response transmission. Otherwise, sensors canbe active with a periodic, OnOff or continuous behavior.Considering the continuous transmission as a periodicone with a tiny period(ε), IoT events are summed up toperiodic and OnOff mode.

3.2.2. Event-based freshness algorithmThe event-based freshness algorithm is an expiration-based freshness with a variable expiration time. Itdepends on producer behaviors, the instant of storing

a content in a cache called cache-time, the period inthe case of periodic mode, and past events in the caseof OnOff mode. The pseudo-code for forwarding therequest and checking the data freshness is given inAlgorithm 2.

Data:Data to retrieveProd = the producer nodeCons = the consumer nodeG = (V,E) a graph that represents the networkPath = (v1, v2, ...vn) ∈ V ∗ V ∗ ... ∗ V s.a:vi adjacent to vi+1 for 1 ≤ i ≤ n andv1 ←− Consvn ←− ProdResult:The Fresh Data to retrievefor Each node ∈ Path do

if Data in cache thenif Data.flow = ”Periodic” then

Calculate the lifetime of the last versionin the sourceTlife = Exp(1/T )if Tlife > Now − cache time then

Get(Data)endelse

Delete(Data)end

endelse if data.flow = ”OnOff” then

if Tevent > Now thenGet(Data)

endelse

Delete(Data)end

end

end

endAlgorithm 2: Event-based freshness

As we can see in the algorithm, the check process isperformed when a request reaches a cache. To verify thecontent validity, we compare the lifetime of the contentin the cache with its lifetime in the producer to check ifthe cached content has been modified in its source. Tocalculate the lifetime of a cached content, we use thecache time value. The difference between the currenttime Now and the cache time measures how long acontent was cached. On the other hand, to calculatethe lifetime of the last version in the source, we focuson the transmission mode, namely periodic or OnOffflow. In fact, in the case of periodic transmissions witha period T , to calculate the lifetime Tlife in the source,we use the residual life paradox. The residual life ofan exponentially distributed variable is also exponentialwith the same rate. The period T must be then

The Computer Journal, Vol. ??, No. ??, ????

Page 8: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 7

n0

n1

n2

n3n4n5n6n7n8n9n10n11

Consumer4

n0

Consumer1

Consumer2

Consumer3

Producer1

Producer3

Producer2

FIGURE 1. An example of a Transit-Stub path

appended to the content. If Tlife is greater than thedifference between the current time and the cache time,the content is returned to the consumer.

With an OnOff transmission, the procedure isdifferent because the updating time in the source is notpredicted, and every producer has a specific behavior.To face this problem, we propose to use a predictionmethod to estimate the time of the occurred eventsTevent. Prediction process is based on past events.For this reason, we propose to store, in the source, allpast events in a list lastEvents. Using our mechanismof validity, producers do not need to be synchronized.In fact, in our algorithm, we proposed to save at theproducer level the time elapsed between two successiveevents instead of saving the time when the event tookplace. We take the example of a producer who had twoevents at 10 am then at 11 am. In this case, the timeelapsed between these two successive events is 1 hour.Therefore, we save this value (1 hour) in this producer’slastEvents list.

When a request arrives at the producer, we calculatean estimate of the time for the next event to happenbased on the values in the lastEvents list (for examplethe calculated value indicates that the next event willtake place in 30 minutes). This estimated value is addedas metadata to the response to say that this content isonly valid for 30 minutes. On the return path, contentcan be cached in any node. The metadata is also savedin the cache node with the copy of the content as Tevent.Tevent is the cache time plus the metadata value.

When a copy is found in a cache, if Tevent is greaterthan the current time, then we can presume that thecontent has been updated in the source, and this copyis considered invalid. Such decision is not always rightgiven that it is founded on estimations.

We use time series for the prediction process. Timeseries data is analyzed in order to extract a meaningfulstatistic model used to predict future values basedon the ones previously observed. Several time seriesmodels exist such as the ARMA (Autoregressive MovingAverage) model or the exponential smoothing. Theexponential smoothing uses all past events to make theprediction, while ARMA utilizes only the k past datapoints. In an IoT context, we always prefer to put lessinformation in equipment. As a consequence, in ourevent-based freshness mechanism, we choose to use theARMA model [41].

3.3. A scenario of Named Data IoT Networks

We describe in Figure.2 a scenario under the NamedData IoT Networks using consumer-cache cachingstrategy and event-based freshness mechanism. NDNis based on three system elements: Content Store(CS), Pending Interest Table (PIT) and ForwardingInformation Base (FIB) table. Consumers issue Interestmessages to request information objects. The requestis routed by name. CS acts as a cache in which thereceived data are cached. When a request hits a cache,a CS lookup is performed. In the case of a cache miss,the Interest packet is sent to the next hop accordingto the FIB, and the interface of the incoming Interestis appended to a set of interfaces interested by thatchunk in the PIT. The FIB contains, for each content,an entry that points to the right output interface. Inthe case of a cache hit, the corresponding Data is sentback according to the list of interfaces stored in the PIT.When the request is satisfied, the corresponding entryin the PIT is then removed. NDN approach nativelysupports on-path caching using the CS. It also supportsmulticast channels by allowing Interest messages to becached in intermediate hosts. If a new Interest message,requesting the same name, reaches a host, it will bepending until receiving the Data packet. Then, the hostwill directly return the Data to both requesters.

In Figure.2a, Consumer1 sends an Interest packetfor the content named /Home/room1/Tmp (arrows 1-5). When the node n2 receives the Interest message, itfirst performs a lookup in its CS. If there is no entrywith this name, the request is forwarded to the nexthop according to the node’s FIB. This base containsan entry which points to node n3. The router recordsthe request’s incoming interface n1 in the PIT. Then,it sends the Interest to n3 and so on. In the case of acache miss, the producer satisfies the request. A Datamessage is then returned. This packet is forwardedbased on states stored in PITs (arrows 6-10). Underthe consumer-cache strategy, only n3 and n1 store theobject in their CSs. Now, we suppose that Consumer2asks for the same content /Home/room1/Tmp (arrow11). When the Interest packet arrives to node n3, itmatches the information object found at the CS. Then,the Data is directly returned (arrow 12).

We show, in Figure.2b, the operation of our freshnessmechanism. The event-based mechanism introduces

The Computer Journal, Vol. ??, No. ??, ????

Page 9: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

8 M. Meddeb

Sensor2

Sensor1

/Home/room2/pre

/Home/room1/Tmp

n1

n2

n3

n4

n5

n6

LinkINTERESTDATA

n2CS

PIT

FIB

ID

ID

ID

DATA

From

To

n3

FIBID To

/Home/room1

/Tmpn1

/Home/ n3

CSID DATA

/Home/room1

/Tmp23°

PITID From

/Home/room1

/Tmpconsumer2

/Home/room1

/Home/room2

n4

n5

Consumer1

Consumer2

(1)

(2)

(3)(4)

(5)

(6)

(7) (8)

(9)

0)

(11)

(12)

(a) Consumer-cache caching decisionSensor2

Sensor1

/Home/room2/pre = 1

at 10:45am

/Home/room1/Tmp = 52°

at 11 am

n1

n2

n3

n4

n5

n6

Consumer1

Consumer2Arma Model: Input

lastEvents

1h21min

Arma Model: OutputT

Period: 1hId

\Home\room1\ T mp 10:30 amData23°

Cache-time

\Home\room2\pre 1 10:55 am

Flow

PeriodicOnOff

CS

Tevent: 12:55 am

2h

2h36min56min

...

(b) Event-based freshness mechanism

FIGURE 2. An example with the NDN architecture using consumer-cache caching strategy and event-based freshnessmechanism

new parameters which are cache time, Tevent, theperiod T and the flow (Periodic or OnOff). Thecache time parameter is stored in the cache structurein the gateway when a new item is cached. HoweverTevent in the case of an OnOff flow and T in thecase of a Periodic flow are sent as metadata with thecontent and then stored in the Content Store structureas shown in figure Fig. 2b. We consider two producers,a temperature sensor and a presence sensor. Whenthe Interest packet reaches node n3, a cache lookup isperformed. Then, the content is found in the CS. Theuse of the event-based freshness consists in verifyingthe cached object before returning it. It is assumedto be 11:30 am. The freshness of a data depends onits flow. In the case of periodic transmission, when

the period elapses, the content is no longer valid. Inour scenario, the caching is performed at 10:30 am.After 11:30 am, the temperature value 23◦ is consideredinvalid. Consequently, this entry is removed from theCS, and the request is forwarded to the next hop to lookfor a valid data. In the case of OnOff transmission,the time of the next event is calculated in the sourceand is appended in the Data packet. As we havealready mentioned, the time series model ARMA is usedfor this prediction based on past events. Calculationsassume that the next event will be after 2 hours.When an Interest packet reaches the node n3, Tevent iscalculated (Tevent = cache time+ 2hours = 12 : 55am)and compared to the current time. Based on thiscomparison, we admit that the data is fresh since it

The Computer Journal, Vol. ??, No. ??, ????

Page 10: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 9

Backbone/ level0

Transit Domain/ level1 Transit Domain/ level1

Stub Domain/ level2

Stub Domain/ level2

Stub Domain/ level2

Stub Domain/ level2

......

Stub Domain/ level2

Backbone domain

Transit Domain

Stub Domain

Backbone node

Transit Node

Stub Node

......

FIGURE 3. Transit-Stub topology

is supposed that the next event has not occurred yet(Tevent > Now). The Data is then returned to theconsumer.

4. PERFORMANCE EVALUATION

This section details the performance evaluation ofour caching strategy and freshness mechanism forinformation-centric IoT networks. For this purpose,we use the ccnSim simulator [42]. It is aC++ framework under the OMNeT++ discrete-eventsimulator that implements the routine to simulate theNDN architecture. Every node implements the threesystem elements mentioned in the subsection 3.3, inform of layers. The first one, called ”Core layer”is responsible for both the PIT management and thecommunication with the different layers. The secondone, ”the cache layer”, represents the CS parts inthe NDN structure. It acts according to a cachingand replacement strategies. The third element is thestrategy layer that takes the decision about Interestforwarding. CcnSim uses by default the shortest pathforwarding strategy. In the remainder of this section, wedescribe the simulation scenario, the adopted metricsand the obtained results.

4.1. Simulation scenario

We summarize in table 1 the system parameters usedin our simulations. Experiments were run with different

caching strategies as LCE, LCD, ProbCache, Btw, edge-caching as well as with our caching strategy namedconsumer-cache. We use LRU (Least Recently Used)as a cache replacement policy.

Concerning the topology, authors in [10] affirm thatthere is not a single topology that can be used toevaluate ICN aspects and this choice depends on thefocus of evaluation. In this paper, we present resultswith Transit-Stub (TS) topology whose propertiesimitate closely the IoT topology. The TS graph is a 3-level hierarchical topology presented in [43]. This modelis composed of interconnected stub and transit domainsand LANs connected to stub nodes. A stub domaincarries only the traffic that originates or terminatesin the domain. However, transit domains considerall transmissions and their role consist of efficientlyinterconnecting stub domains. The TS parameters areT , which is the total number of transit domains, S isthe total number of stub domains per transit node. NT

and Ns are the average numbers of nodes per transitand stub domain respectively. L is the average numberof LANs per stub node, and NL is the average numberof hosts per LAN. We set T = 2 with NT = 10, S = 2with Ns = 6, L = 1 and NL = 1. The total numberof nodes is N = TNT (1 + SNS) = 260 nodes andthe total number of hosts NH = TNTSNSLNL = 240hosts. Figure.3 presents our TS topology. Producersand consumers can be connected to 240 hosts. Wechoose to distribute them in such a way the producer

The Computer Journal, Vol. ??, No. ??, ????

Page 11: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

10 M. Meddeb

and its consumer do not belong to the same transitdomain, however, a host can connect a consumer and aproducer at the same time. We generate the topologywith the GT-ITM tools 1 (Georgia Tech InternetworkTopology Models) using the parameters fixed above.GT-ITM is a complete set of tools for the conversionof network topologies that support NED language usedin OMNET++.

Transmission delays are set by the GT-ITM. Valuesare within the range of [2; 78]ms. They are set sothat transmissions in the third level are faster than thesecond level and the same with the second and the firstlevel.

Analyzing the request popularity distribution indifferent geographical locations, S. K. Fayazbakhsh etal., [27] stated that the web distribution, used by avast majority of previous work on ICN, behaves asa Zipfian distribution. Indeed, the majority of ICNstudies use the Zipf distribution which stipulates thatsome popular contents have a high probability to berequested (e.g., new films, news, today’s weather, etc.).However, under IoT, we do not refer to this distributionsince it is rather devised for web-based contents andInternet applications. In IoT, contents have closerequest probabilities. As a result, we assume in thiswork that Interest packets are uniformly distributed aswas done in other work such as [9, 8].

We note that each producer provides a single contentas a single chunk. The number of producers is thenequal to the number of contents | F | in the networkand the file size F is equal to 1 chunk. In [44], D.Rossi and G. Rossini showed that the ratio C

F |F | of the

cache size C over the catalogue size F | F |, is suchthat C

F |F | ∈[10−5; 10−1

]. In our simulation, we set

CF |F | = 10−3.

Taking into consideration this ratio, we set thefile number | F |= 4000 files and the cache sizeC = 4 chunks. The 4000 sensors are connectedto 40 Gateways. We consider a variable number ofconsumers ranging from 20 to 30 and we suppose thatall consumers are already connected at the beginning ofthe simulation. Clients ask for files following the arrivalrate of the Poisson process with λ = 1. We use SPR(Shortest Path Routing) as a forwarding strategy.

Our simulations were carried out with a real IoTdata extracted from the ADREAM [45] building inLAAS-CNRS laboratory which is a smart building. The4000 sensors are scattered in the building. It is aboutperiodic sensors (temperature, humidity and light)with different period T and OnOff sensors (presence,vibration and fall).

4.2. System performances

We start with evaluating different caching strategiesand compare them to our consumer-cache strategy in

1http://www.cc.gatech.edu/projects/gtitm/

term of system performances. We consider the hopreduction ratio, the server hit reduction ratio and theresponse latency metrics to evaluate a caching scheme.

The hop reduction ratio α measures the reductionof the number of hops traversed to satisfy a requestcompared to the number of hops required to retrieve thecontent from the server. α is analytically representedby Eq. 1

α = 1−∑N

i=1

∑Rr=1

hirHir

R

N(1)

Where N is the number of consumers, and R is thenumber of requests created per consumer. α representsthe average over N consumers of averages over Rrequests per consumer of the hop reduction ratio of therequest r sent by consumer i; hir

Hir. The hir parameter is

the number of hops from i to the cache that satisfies r,and Hir is the number of hops from i to the producer.β represents the server hit reduction ratio, the second

metric that measures the reduction of the rate of accessto the server. In other words, the alleviation rate ofthe server load. Eq. 2 calculates this metric, whereserverhiti is the number of requests sent by i andsatisfied by the server (producer) and totalReqi is thetotal number of requests, satisfied by both the serverand the cache, sent by i.

β = 1−∑N

i=1 serverhiti∑Ni=1 totalReqi

(2)

The third metric is the response latency. It is theduration between the delivery of a request and itsresponse. In Eq. 3, we calculate γ, the average of theresponse latency Tir over N consumers and each onesends R requests.

γ =

∑Ni=1

∑Rr=1 Tir

R

N(ms) (3)

Figure. 4 portrays the system performances: theServer hit reduction ratio (Figure 4a), the numberof evictions (Figure 4b) and the hop reduction ratio(Figure 4c), using 25 consumers. Figure.4d portraysthe response latency as a function of the number ofconsumers (varying from 20 to 30). From the latter,we notice that the response latency gets better as thenumber of consumers increases. Indeed, increasing thenumber of consumers leads to an increase in the numberof requests, which in turn augments the contentsavailability inside the topology.

Without a caching strategy the Server hit ReductionRatio and the Hop Reduction Ratio are equal to zeroas all requests are satisfied by the producers.

The LCE strategy stores copies everywhere, whichmake content available at every node. However, cachesfill up quickly and consequently, old contents at thebottom of the stack are rapidly evicted which increasesthe number of evictions and leads to cache misses.This explains the fact that this strategy performs the

The Computer Journal, Vol. ??, No. ??, ????

Page 12: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 11

TABLE 1. System parametersParameter Meaning Values

C Cache size 4 chunks

| F | Producers 4000 sensors

F File size 1 chunkC

F |F | Cache size and Cata-logue size ratio

10−3

Cons Consumers [20; 30] consumers

λ Arrival rate 1

R Replicas 1

RS Replacement strat-egy

LRU

FS Forwarding strategy SPR

transmission delay Transmission Delay [2; 78]ms

simulation time Simulation Time 200s

expirationtime Expiration Time 20s

lastEvents Time events ADREAM DATA

0

0.2

0.4

0.6

0.8

1

NoCaching LCE LCD ProbCache Btw EdgeConsumer−cache

Serv

er

hit R

eduction R

atio

(a) Server hit reduction ratio

0

50

100

150

200

LCE LCD ProbCache Btw Edge Consumer−cache

Num

ber

of evic

tions

(b) Number of evictions

0

0.2

0.4

0.6

0.8

1

NoCaching LCE LCD ProbCache Btw Edge Consumer−cache

Hop R

eduction R

atio

(c) Hop reduction ratio

100

120

140

160

180

200

220

240

20 22 24 26 28 30

Re

sp

on

se

La

ten

cy (

ms)

Number of consumers

No CachingLCELCD

ProbCacheBtw

EdgeConsumer−cache

(d) Response latency

FIGURE 4. System performances

worst results in this scenario. To clarify the Server HitReduction Ratio results, we plot the average number ofevictions for each caching strategy. Figure. 4b showsthat LCE has the highest number of evictions as it wasexpected. Also with ProbCache, contents can probablybe cached on more than one node within the requestpath which increases the number of evictions. However,with LCD and Btw there is one cache node in eachrequest path. As a consequence, the number of evictionsis lower compared to LCE and ProbCache. Finally, theedge-caching and consumer-cache have almost the same

number of evictions. With LCE caching strategy, TheServer Hit Reduction Ratio (Figure. 4a) is 0.43. Thisvalue means that only 43% of requests are satisfied fromcache nodes. The Hop Reduction Ratio (Figure. 4c)for this strategy is about 0.61. Which means thatpaths are reduced by 61% in term of the number ofhops. Concerning the third metric, the response latency(Figure. 4d) is about 182ms to 210ms.

The caching strategy LCD decides to cache contentsat the node on one level down from the response source(Producer/cache node). After a certain number of

The Computer Journal, Vol. ??, No. ??, ????

Page 13: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

12 M. Meddeb

requests, it tends to LCE and all path nodes becomecaches. For this reason, LCD results, are not so goodas LCE. Figure. 4c shows that LCD records 69% of hopreduction, and requests take about 164ms to 188ms ofresponse latency (Figure. 4d). Its server hit reductionis about 0.59.

Concerning ProbCache and Btw, cache nodes areselected in the middle of the request path and probablymore close to consumers, in the case of ProbCache.Simulation results of these two strategies are mediumcomparing to other caching strategies. The hopreduction ratio using ProbCache and Btw is respectivelyabout 0.73 and 0.75. The same for response latency,ProbCache and Btw reports respectively about 137msto 157ms and 135ms to 151ms. Figure. 4a shows 0.73of the server hit reduction under ProbCache and 0.75for Btw.

We remind that the third hypothesis on which we arebased was that the edge nodes are the best placementfor cache nodes. Our findings confirm the resultspresented in [27]. In fact, edge-caching reports goodresults. Under this strategy, we measured 0.83 in serverhit reduction, 0.80 of hop reduction ratio, and 126ms to144ms as response latency.

We detail now the results of our consumer-cachestrategy. This latter stores copies in nodes attachedto consumers which allow these consumers to easilyreach requested contents. Consumer-cache has thebest simulation results because requests are, in mostcases, satisfied by the first hop node. We report forour strategy 0.89 of the server hit reduction. Thehop reduction ratio is about 0.89, this implies thatrequests only cross 11% of hops on the path towardsthe producer. Finally, with our strategy, the responselatency varies from 112ms to 126ms.

Since caching strategies can be quite costly in termof used resources, we calculate in the next section thecache cost of all caching strategies.

4.3. Cache cost

The cache cost is a compromise between dataavailability and caching overhead. It captures the trade-off between the average delay to receive a contentand the corresponding caching cost[46]. The delay toobtain information is considered as a cost because, inthe case of a cache miss, the time of waiting for theresponse by searching the caches is longer than thetime of directly looking for the content from the remoteserver. As we have already mentioned in section 2.1,the decision whether to cache a content or not in eachnode depends on the adopted caching strategy. So, thecaching cost is related to this decision; the more wehave ”yes” decisions, the higher the global caching costis. Although caching improves content availability, itincreases redundancy, and causes network overhead dueto the existing stores in the cache nodes. In addition,some strategies, as LCE, come to fill up caches faster

than other ones. In this case, we may remove still validcontents. As a consequence, the number of cache missesincreases, and the cache is no longer effective. Fromthis point of view, we consider the cache eviction as acost; the more we evict contents, the higher the globalcaching cost is.

To calculate the cache cost, we were inspired by thecache cost function (Eq. 4) proposed in [46].

Totalcost = Phit∗Chit+(1−Phit)∗Cmiss+N(S)∗Ccache

(4)Where Phit is the probability to have a cache hit. Itis calculated by the ratio of the number of requestssatisfied by caches over the total number of requests.Chit and Cmiss are the average delays experienced by aconsumer in order to receive its requested informationfrom a cache and the producer, respectively. N(S) isthe number of caches in the topology. Finally, Ccache isthe cost to cache items which is defined by Eq. 5.

Cjcache =

a

1− ρjutil(5)

Where a is the cost coefficient that is set to 2[46], andρjutil is the cache utilization. The cache utilizationat a node j is the ratio of the number of times acontent is cached in j (Ncaching) over the number oftimes a content passes through j (Ndecisions). Ccache

calculates the average of Cjcache over j cache nodes. The

proposed cost function (Eq. 4) captures the trade-offbetween the average delays for a consumer to receivean information item, given by the first and the secondterms of Eq. 4, and the corresponding caching cost givenby the third term of Eq. 4.

To calculate the eviction cost, we should add, toEq. 4, a fourth term which is similar to the thirdone. However, the calculation of ρutil differs fromthat calculated in the third term. In fact, in thecache eviction function, the utilization is the ratio ofthe number of times an eviction is performed in nodej (Nevictions) over the number of time a content iscached in j (Ncaching). This is because the evictiontakes place when a new item will be cached and thecache is full.

To summarize, we define our cache cost metric inEq. 6.

Totalcost = Phit ∗ Chit + (1− Phit) ∗ Cmiss

+N(S) ∗ 2

1− NcachingNdecisions

+N(S) ∗ 2

1− NevictionsNcaching

(6)

We evaluate the cache cost consumed by differentcaching strategies. Figure. 5 illustrates the cachecost function. Collected values show that the sumof the third and fourth parts in the cost function,which represent caching and eviction cost, is notablyhigher than the sum of the first and the second partswhich illustrate the delay. For this reason, we use

The Computer Journal, Vol. ??, No. ??, ????

Page 14: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 13

−3

−2

−1

0

1

2

3

20 22 24 26 28 30

Ca

ch

e C

ost

Number of consumers

LCELCD

ProbCacheBtw

EdgeConsumer−cache

(a) Cache cost

0

1

2

3

4

5

LCE LCD ProbCache Btw Edge Consumer−cache

Cache c

ost

Global costCaching and eviction cost

Delay Cost

(b) Caching cost and delay cost

FIGURE 5. Global cache cost

normalization method to adjust the two values. Thenormalization method, named ”reduced-centred”, iscalculated as shown in Eq. 7, where µ is the averageof the distribution, and σ represents the standarddeviation of the distribution.

Z =X − µσ

(7)

Figure. 5a plots values of the reduced centered normaldistribution Z for the calculated values of the cachecost function X. Negative values are the result of thenormalization method. Simulation results are obviouslypositive.

We illustrate, in Figure. 5a, the cache cost withdifferent caching strategies. We notice that theincreasing of the number of consumers leads to adecrease in the cache cost. Caching strategies havedifferent cache costs. In fact, we expect that LCE hasthe higher caching and eviction costs seen that it storescopies everywhere and cache nodes are more numerous.In addition, LCE has the worst system performances.From this view, LCE will have the worst global cachecost. In our previous results, LCD strategy doesn’tperform good system performances. Furthermore,this strategy has many cache nodes because for eachrequest the content is solved at one level down. As aconsequence, LCD, in our scenario, is a costly strategy.Also with the ProbCache strategy, cache cost is assumedto be high. This is due to the fact that systemperformances are medium and content can probably becached in different nodes for each request. Under Btwstrategy, the caching and eviction costs are expected tobe minimal, because it is always the same node havingthe highest betweenness centrality that keeps a copy of acontent. On the other hand, system performances withBtw strategy are medium. This makes its cache costmedium. The edge-caching strategy had good systemperformance results as consumer-cache, in addition, thenumber of cache nodes in the topology are constantand not very high. Consequently, the cache cost underthis strategy is not very high. Concerning, our cachingstrategy, consumer-cache, it performs the best systemperformances, and moreover, cache nodes are limited

as with edge-caching, which makes it the least costlystrategy.

As we have discussed, we report, in Figure. 5a, from2 to 1.4 cache cost as the highest cost with LCE. Theminimum cost is calculated with our consumer-cachestrategy with −2.4 to −2.1. The second least costlystrategy, edge-cache, reports −2.1 to −1.7. Then, Btw,has −1 to −0.5 of global cache cost. At the last, wefound that ProbCache and LCD have similar resultswith 1 to 0.25.

For better understand of the trade-off between thecaching cost and delay cost, we separately depict inFigure. 5b the delay cost and the caching and evictioncost with 25 consumers. The objective is to show whichof the different components building up the Global Costmetric dominate.

Figure. 5b shows that the delay cost is less than thecaching and eviction cost. Furthermore, we remark thatwith LCE, the cache cost is very important. In the otherside, the edge-caching strategy has the least cachingand eviction cost since it has the least number of cachenodes. Consumer-cache strategy has also a very lowcaching and eviction cost and its low delay cost makesit the least costly caching strategy. We can also remarkthat although ProbCache system performance resultswere better than LCD results, these two strategies havesimilar cache cost results. With Figure. 5b, we canunderstand that ProbCache has well a low delay cost,however its caching and eviction cost is higher than theLCD one which makes them equal in term of global cost.

In the following section, we evaluate our secondcontribution, which is the freshness mechanism.

4.4. IoT data freshness

To evaluate the freshness mechanism, we use thefollowing metric presented in Eq. 8. Validity isthe percentage of the valid contents received by Nconsumers against the total number of received contentincluding valid and invalid ones. In Eq. 8, werespectively note validi and invalidi as the number ofvalid and invalid content received by consumer i.

The Computer Journal, Vol. ??, No. ??, ????

Page 15: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

14 M. Meddeb

V alidity(%) =

∑Ni=1 validi ∗ 100∑N

i=1 validi + invalidi(8)

With the aim of maximizing the content validitypercentage to meet the IoT coherence requirement, wepropose to integrate our freshness mechanism to severalcaching strategies. Event-based freshness mechanismtries to predict the exact times of updates in orderto eliminate copies supposed to be invalid. Figure.6depicts the percentage of fresh content with or withoutfreshness mechanisms using different caching strategies.

Without freshness mechanism, cached copies arenever checked before being sent. After a certainamount of time, all copies will be deprecated. As itis shown in Figure.6, the percentage of content validityfor all caching strategies, without the use of freshnessmechanism, do not exceed 20%. We report, 2%using the LCE, LCD, Btw and ProbCache strategies,9% with edge-caching and 19% under consumer-cache.We notice that the consumer-cache strategy inherentlymaintains data validity. This result depends on thenumber of evictions (Figure.4b). In fact, strategies thathave a high number of evictions may remove from cachesstill valid contents.

Expiration-based freshness mechanism comes to dealwith this problem, but it is difficult to fix the rightexpiration time. We propose to put the averageof events period in order to cover the maximumof content updates. We choose expiration time =20s. Under Expiration-based freshness mechanism, theimprovements are not very impressive. The graphportrays 9% using LCE, LCD and Btw, 5% withProbCache, 34% under edge-caching and 40% usingconsumer-cache.

Our freshness mechanism has proven that it cansignificantly improve the content validity percentage.Figure.6 shows that this percentage can reach 98%with different strategies. We conclude, from this figure,that event prediction is a good solution to increase thecontent validity, especially with steady systems.

We infer that even if the expiration-based freshnessmechanism combined with our consumer-cache strategyimproved the validity percentage, the event-basedfreshness still performs better results. Consequently,we deduce that our proposal is a good solution for IoTdata freshness.

5. DISCUSSION

As it was shown in the previous subsection, in-networkcaching efficiency strictly depends on the number ofcache evictions. In fact, this parameter impacts thesystem performances since the cache replacement maycause cache misses. We remark that the closer thecache nodes are to the producer the higher is thenumber of evictions. This is because nodes close tothe producers belongs to many request paths by againstnodes close to consumers belongs only to request paths

starting from this consumer. However, the impact of thenumber of evictions on the performance results is notproportional. For instance, edge-caching and consumer-cache have the same number of evictions but consumer-cache outperforms edge-caching. In fact, under edge-caching, Interest packets sent by consumers in themiddle of paths will be satisfied by the producer sincethere is no cache node within the request path. In thiscase, we have a cache miss without any cache eviction.However, consumer-cache makes contents available toconsumers, just in one hop.

Furthermore, we may assert that, in high trafficenvironment like IoT, we should minimize packetstransmission within the first (backbone) and the secondtopology levels. Our proposed consumer-cache strategy,as well as the edge-cache strategy, significantly relievethese two levels as most of the requests are satisfiedwithin the stub domain.

In an IoT environment, system performances, as wellas cache cost, need to be closely considered. Ourproposed consumer-cache performs the best trade-offbetween content availability and caching cost. As such,consumer-cache strategy stands out as a viable solutionin a such IoT environment.

Finally, we showed that with an integrated event-based freshness mechanism, caching strategies performmuch better and attain a high percentage of contentvalidity up to 96% of fresh contents. Withoutany freshness mechanism, the number of evictionsinfluences the data freshness due essentially to adoptedreplacement strategy which may delete still freshcontents.

6. CONCLUSION

In the quest to exhibit the potential of Information-Centric Networking (ICN) as a solution to adequatelysupport Internet-of-Things (IoT) systems, we focusedon Named Data Networking (NDN). IoT data aremostly transient and frequently updated by theirproducers which imposes stringent requirements interms of cache replacement and information freshness.We investigated the most relevant in-network cachingmechanisms and proposed a caching strategy calledconsumer-cache along with a freshness mechanismcalled event-based freshness. consumer-cache stores acopy of contents on on-path nodes directly connectedconsumers in a way to minimize the response latencyand maximize the hop reduction ration.

We carried out extensive experiments using theccnSim on a real IoT scenario. The obtainedresults indicated that our two proposals outperformother schemes and satisfy IoT systems requirementsin terms of data freshness and cache cost, with anotable improvement in content validity and contentavailability.

As IoT scenarios and applications are very diverse interms of nature and requirements, further experiments

The Computer Journal, Vol. ??, No. ??, ????

Page 16: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

Cache Freshness in Named Data Networking for the Internet of Things 15

0

20

40

60

80

100

120

LCE LCD ProbCache Btw Edge ConsumerV

alid

ity %

Event−based freshnessExpiration−based freshness

Without freshness mechanism

FIGURE 6. Validity %

are underway to properly ascertain the adequacy andrelevance of our proposed strategy on various IoTscenarios. Furthermore, as IoT devices can be mobile,there is certainly a need to study the effect of bothconsumer and producer mobility on our proposedcaching strategy.

7. ACKNOWLEDGEMENT

The authors extend their appreciations to the Deanshipof Scientific Research at King Saud University forfunding this work through Research Group No. RGP-1439-023.

REFERENCES

[1] Gubbi, J., Buyya, R., Marusic, S., and Palaniswami, M.(2013) Internet of things (iot): A vision, architecturalelements, and future directions. Future GenerationComputer Systems, 29, 1645 – 1660.

[2] Jacobson, V., Smetters, D. K., Thornton, J. D.,Plass, M. F., Briggs, N. H., and Braynard, R. L.(2009) Networking named content. Proceedings of the5th International Conference on Emerging NetworkingExperiments and Technologies CoNEXT ’09, Rome,Italy, 1-4 December, pp. 1–12. ACM.

[3] Pentikousis, K., Ohlman, B., Corujo, D., Boggia, G.,Tyson, G., Davies, E. B., Molinaro, A., and Eum,S. (2015). Information-Centric Networking: BaselineScenarios. RFC 7476.

[4] Baccelli, E., Mehlis, C., Hahm, O., Schmidt, T. C., andWahlisch, M. (2014) Information centric networking inthe iot: Experiments with ndn in the wild. Proceedingsof the 1st International Conference on Information-centric Networking ICN ’14, Paris, France, 25-26September, pp. 77–86. ACM.

[5] Heidemann, J., Silva, F., Intanagonwiwat, C.,Govindan, R., Estrin, D., and Ganesan, D. (2001)Building efficient wireless sensor networks with low-level naming. SIGOPS Oper. Syst. Rev., 35, 146–159.

[6] Amadeo, M., Campolo, C., Iera, A., and Molinaro, A.(2015) Information centric networking in iot scenarios:The case of a smart home. 2015 IEEE InternationalConference on Communications (ICC’15), London,UK, 8-12 June, pp. 648–653. IEEE.

[7] Quevedo, J., Corujo, D., and Aguiar, R. (2014) A casefor icn usage in iot environments. IEEE Global Com-munications Conference (GLOBECOM’14), Austin,Texas, USA, 8-12 December, pp. 2770–2775. IEEE.

[8] Hail, M., Amadeo, M., Molinaro, A., and Fischer,S. (2015) Caching in named data networking for thewireless internet of things. International Conferenceon Recent Advances in Internet of Things (RIoT’15),Singapore, 7-9 April, pp. 1–6. IEEE.

[9] Quevedo, J., Corujo, D., and Aguiar, R. (2014)Consumer driven information freshness approach forcontent centric networking. IEEE Conference onComputer Communications Workshops (INFOCOMWKSHPS’14), Toronto, Canada, 27 April- 2 May, pp.482–487. IEEE.

[10] Pentikousis, K., Ohlman, B., Davies, E. B., Boggia,G., and Spirou, S. (2016). Information-CentricNetworking: Evaluation and Security Considerations.RFC 7945.

[11] Adjih, C., Baccelli, E., and Fleury, E. (2015) Fit iot-lab: A large scale open experimental iot testbed. IEEE2nd World Forum on Internet of Things (WF-IoT’15),Milan, Italy, 14-16 December. IEEE.

[12] Zhang, G., Li, Y., and Lin, T. (2013) Caching ininformation centric networking: A survey. ComputerNetworks, 57, 3128 – 3141.

[13] Dingle, A. and Partl, T. (1996) Web cache coherence.Comput. Netw. ISDN Syst., 28, 907–920.

[14] Vural, S., Navaratnam, P., Wang, N., Wang, C.,Dong, L., and Tafazolli, R. (2014) In-networkcaching of internet-of-things data. IEEE InternationalConference on Communications (ICC’14),, Sydney,Australia, 10-14 June, pp. 3185–3190. IEEE.

[15] Ahlgren, B., Dannewitz, C., Imbrenda, C., Kutscher,D., and Ohlman, B. (2012) A survey of information-centric networking. IEEE Communications Magazine,50, 26–36.

[16] Xylomenos, G., Ververidis, C., Siris, V., Fotiou, N.,Tsilopoulos, C., Vasilakos, X., Katsaros, K., andPolyzos, G. (2014) A survey of information-centricnetworking research. IEEE Communications Surveysand Tutorials, 16, 1024–1049.

[17] Amadeo, M., Campolo, C., Iera, A., and Molinaro, A.(2014) Named data networking for iot: An architecturalperspective. European Conference on Networks andCommunications (EuCNC’14), Bologna, Italy, 23-26June, pp. 1–5. IEEE.

The Computer Journal, Vol. ??, No. ??, ????

Page 17: Cache Freshness in Named Data Networking for the Internet ... · a freshness mechanism termed event-based freshness which is based on the time prediction of IoT tra c. In this context,

16 M. Meddeb

[18] Amadeo, M., Briante, O., Campolo, C., Molinaro, A.,and Ruggeri, G. (2016) Information-centric networkingfor {M2M} communications: Design and deployment.Computer Communications, 89-90, 105 – 116.

[19] Amadeo, M., Campolo, C., Molinaro, A., and Ruggeri,G. (2014) Content-centric wireless networking: Asurvey. Computer Networks, 72, 1 – 13.

[20] Franois, J., Cholez, T., and Engel, T. (2013) Ccn trafficoptimization for iot. Fourth International Conferenceon the Network of the Future (NOF’13), Pohang, SouthKorea, 23-25 October, pp. 1–5. IEEE.

[21] Meddeb, M., Dhraief, A., Belghith, A., Monteil, T.,and Drira, K. (2015) Cache coherence in machine-to-machine information centric networks. IEEE 40thConference on Local Computer Networks (LCN’15),ClearWater Beach, Florida, USA, 26-29 October, pp.430–433. IEEE.

[22] Amadeo, M., Campolo, C., and Molinaro, A. (2014)Internet of things via named data networking: Thesupport of push traffic. International Conference andWorkshop on the Network of the Future (NOF’14),Paris, France, 3-5 December, pp. 1–5. IEEE.

[23] Xylomenos, G., Vasilakos, X., Tsilopoulos, C., Siris, V.,and Polyzos, G. (2012) Caching and mobility supportin a publish-subscribe internet architecture. IEEECommunications Magazine, 50, 52–58.

[24] Saino, L., Psaras, I., and Pavlou, G. (2014)Icarus: a caching simulator for information centricnetworking (icn). Proceedings of the 7th InternationalICST Conference on Simulation Tools and Techniques(SIMUTOOLS’14), Lisbon, Portugal, 17-19 March.ICST.

[25] Psaras, I., Chai, W. K., and Pavlou, G. (2012)Probabilistic in-network caching for information-centricnetworks. Proceedings of the Second ICN Workshopon Information-centric Networking ICN(’12), Helsinki,Finland, 17 August, pp. 55–60. ACM.

[26] Chai, W. K., He, D., Psaras, I., and Pavlou, G. (2012)Cache ”less for more” in information-centric networks.Proceedings of the 11th International IFIP TC 6Conference on Networking - Volume Part I, Prague,Czech Republic, 21-25 May, pp. 27–40. Springer-Verlag.

[27] Fayazbakhsh, S. e. a. (2013) Less pain, most of the gain:Incrementally deployable icn. SIGCOMM Comput.Commun. Rev., 43, 147–158.

[28] Sandberg, R., Goldberg, D., Kleiman, S., Walsh, D.,and Lyon, B. (1985) Design and implementation of thesun network filesystem. USENIX.

[29] Kazar, M. L. (1988) Synchronization and caching issuesin the andrew file system. USENIX, pp. 27–36.

[30] World wide web consortium, hypertext transfer proto-col. http://www.w3.org/pub/WWW/Protocols/.

[31] World wide web consortium, w3c httpd.http://www.w3.org/pub/WWW/Daemon/.

[32] Berners-Lee, T. (2007). Analysis of caching andreplication strategies for web applications.

[33] Vural, S., Wang, N., Navaratnam, P., and Tafazolli,R. (2016) Caching transient data in internet contentrouters. IEEE/ACM Transactions on Networking, 25,1048 – 1061.

[34] Wang, L., Wakikawa, R., Kuntz, R., Vuyyuru, R.,and Zhang, L. (2012) Data naming in vehicle-to-vehicle communications. In Proceedings of INFOCOM

2012 Workshop on Emerging Design Choices in Name-Oriented Networking, Orlando, Florida, USA, 25-30March. IEEE.

[35] Ngoc-Thanh, D. and Younghan, K. (2013) Potential ofinformation-centric wireless sensor and actor network-ing. International Conference on Computing, Manage-ment and Telecommunications (ComManTel’13), HoChi Minh City, Vietnam, 12-14 January, pp. 163–168.IEEE.

[36] Ren, Z., Hail, M., and Hellbruck, H. (2013) Ccn-wsn - a lightweight, flexible content-centric networkingprotocol for wireless sensor networks. IEEE EighthInternational Conference on Intelligent Sensors, SensorNetworks and Information Processing (ISSNIP’13),Melbourne, Australia, 2-5 April. IEEE.

[37] Teubler, T., Hail, M. A., and Hellbrck, H. (2013)Efficient data aggregation with ccnx in wireless sensornetworks. 19th EUNICE Workshop on Advances inCommunication Networking (EUNICE’13), hemnitz,Germany, 28-30 August. Springer.

[38] Amadeo, M., Campolo, C., Molinaro, A., andMitton, N. (2013) Named data networking: A naturaldesign for data collection in wireless sensor networks.IFIP Wireless Days (WD’13), Valencia, Spain, 13-15November. IEEE/IFIP.

[39] Katsaros, K., Chai, W., Wang, N., Pavlou, G., Bontius,H., and Paolone, M. (2014) Information-centricnetworking for machine-to-machine data delivery: acase study in smart grid applications. IEEE Network,28, 58–64.

[40] Liu, R., Wu, W., Zhu, H., and Yang, D. (2011) M2m-oriented qos categorization in cellular network. 7thInternational Conference on Wireless Communications,Networking and Mobile Computing (WiCOM’11),Wuhan, China, 23-25 September. IEEE.

[41] Makridakis, S. and Hibon, M. (1997) Arma models andthe boxjenkins methodology. Journal of Forecasting,16, 147–163.

[42] Chiocchetti, R., Rossi, D., and Rossini, G. (2013) ccn-sim: An highly scalable ccn simulator. IEEE Interna-tional Conference on Communications (ICC’13), Bu-dapest, Hungry, 9-13 June. IEEE.

[43] Calvert, K. L., Doar, M. B., and Zegura, E. W. (1997)Modeling internet topology. IEEE CommunicationsMagazine, 35, 160–163.

[44] Rossi, D. and Rossini, G. (2011) Caching performanceof content centric networks under multi-path routing.Technical report. Telecom ParisTech, Paris, France.

[45] LAAS-CNRS (2013). Adream. http://www.laas.fr/1-32329-Le-batiment-intelligent-Adream-instrumente-et-econome-en-energie.php.

[46] Vasilakos, X., Siris, V. A., Polyzos, G. C., and Pomonis,M. (2012) Proactive selective neighbor caching forenhancing mobility support in information-centricnetworks. Proceedings of the Second Edition of the ICNWorkshop on Information-centric Networking (ICN’12), Helsinki, Finland, 17 August, pp. 61–66. ACM.

The Computer Journal, Vol. ??, No. ??, ????