A Lightweight Distributed Solution to Content Replication in Mobile Networks
Chi-Anh La, Pietro Michiardi, Claudio Casetti, Carla-Fabiana Chiasserini, Marco Fiore
aa r X i v : . [ c s . N I] S e p A Lightweight Distributed Solutionto Content Replication in Mobile Networks
C.-A. La, P. Michiardi
EURECOMSophia Antipolis, France fi[email protected] C. Casetti, C.-F. Chiasserini, M. Fiore
Politecnico di TorinoTorino, Italy fi[email protected]
ABSTRACT
Performance and reliability of content access in mobile net-works is conditioned by the number and location of contentreplicas deployed at the network nodes. Facility location the-ory has been the traditional, centralized approach to studycontent replication: computing the number and placementof replicas in a network can be cast as an uncapacitated fa-cility location problem.The endeavour of this work is to design a distributed,lightweight solution to the above joint optimization prob-lem, while taking into account the network dynamics. Inparticular, we devise a mechanism that lets nodes share theburden of storing and providing content, so as to achieveload balancing, and decide whether to replicate or drop theinformation so as to adapt to a dynamic content demand andtime-varying topology. We evaluate our mechanism throughsimulation, by exploring a wide range of settings and study-ing realistic content access mechanisms that go beyond thetraditional assumption matching demand points to their clos-est content replica. Results show that our mechanism, whichuses local measurements only , is: (i) extremely precise inapproximating an optimal solution to content placement andreplication; (ii) robust against network mobility; (iii) flexiblein accommodating various content access patterns, includingvariation in time and space of the content demand.
1. INTRODUCTION
Research activity in the networking field is pursuing theidea that networks should provide access to contents, ratherthan to hosts. This idea is manifested in content distributionnetworks based on either peer-to-peer networks, or on an in-frastructure of large storage nodes located close to edge net-works. In this paper, we explore this concept with respect towireless networks where nodes can exploit device-to-devicecommunications. We highlight that content is being storedin nodes that move and that the content itself moves and isreplicated in anticipation of being accessed. The purpose isto re-assess content distribution with respect to wireless net-works in which content demand and topology are dynami-cally changing.Previous research has focused on techniques that enhanceperformance and reliability of content access in wireless sys- tems. Content caching and replication have been shown to beeffective in achieving these goals (see, e.g., [1] for a surveyon the topic). Every mobile device can potentially partici-pate to content caching or replication by storing data whichcan be made available to other users through device-to-devicecommunication over one of its wireless interfaces, e.g., IEEE802.11 or Bluetooth.Due to the storage capacity constraints of cache servers,effective cache eviction policies have traditionally been thesubject of a large body of research in computer science ingeneral, and in the context of wireless networks in partic-ular [2–4]. Decision problems concerning the location ofcontent replicas and, optionally, the number of replicas todeploy in a network have also generated a large number ofworks: prominent examples of such studies are available forwireline networks (e.g., content distribution networks) [5]and, to a lesser extent, for wireless networks [6].In this work we focus on content replication in the contextof mobile wireless networks in which users create a cooper-ative environment. The very nature of wireless content ac-cess and node mobility introduces several problems to con-tent replication.
Optimal replica placement is one of those:selecting the location that is better suited to store content isdifficult, especially when the network is dynamic. However,optimal replica placement is just a facet of content distribu-tion: another prominent issue is how many content replicas should be made available to mobile nodes. Clearly, networkand content demand dynamics affect the solution of thesetwo aspects. Furthermore, decisions on the placement andnumber of replicas to be deployed in a network are tightlyrelated problems: intuitively, the latter introduces a feedbackloop to the former as every content replication triggers a newinstance of the placement problem.Traditionally, the above content replication problems havebeen studied through the lenses of classic Facility LocationTheory [7]: optimal placement can be cast as the uncapac-itated k -median problem, whereas the joint optimization ofplacement and number of replicas can be studied as an unca-pacitated facility location problem. Both these problems areNP-hard for general network topologies; furthermore, theabove formulations do not tackle the problem of how userscan access contents.
1n our previous work [8], we show preliminary results in-dicating that a uniformly distributed replica placement canbe well approximated using distributed store-and-forward mech-anisms, in which nodes store content only temporarily. Theendeavor of this work is to extend our previous study and tar-get the joint problem (i) of establishing the number of repli-cas to deploy in a dynamic network, (ii) of finding their mostsuitable location, and (iii) of letting users efficiently accessstored content. In particular, we address (i) and (ii) so asto achieve load balancing, that is, to let the network nodesevenly share the burden of storing and providing content.Instead of designing approximation algorithms of the op-timal solution to facility location problems which requireglobal (or extended) knowledge of the network [5, 9], we in-tegrate our store-and-forward mechanism with a distributedreplication algorithm that bases its decisions on local mea-surements only and aims at evenly distributing among nodesthe demanding task of being a replica provider. Also, weconsider different content query/reply mechanisms and eval-uate their performance in conjunction with the schemes usedfor content replication and placement.As a result, we show that both optimal placement and con-tent replication can be approximated through a lightweight,distributed scheme which adapts to different initial distribu-tions of replicas and to variation in time and in space of con-tent demand, while being robust against network dynamics.
2. BACKGROUND AND PROBLEM STATE-MENT
As remarked above, the problem of content replicationand caching has received a lot of attention in the past due toits importance in enhancing performance, availability and re-liability of content access for Web-based applications. Here,we inherit the problem of replication typical of the wired-Internet and we discuss why the dynamic nature of wirelessnetworks introduces new challenges with respect to the wire-line counterpart. Note that, although several cache replace-ment policies have been proposed in the context of mobilead-hoc networks [2–4], in this paper we focus on replication and replica placement problems, i.e., we view content repli-cation as a process of its own, rather than a by-product of aquery/caching mechanism [1].Let us now define the context of our work. We investigatea scenario involving users equipped with devices offeringInternet broadband connectivity as well as device-to-devicecommunication capabilities (e.g., through IEEE 802.11). Al-though we do not concern ourselves with the provision ofInternet access in ad hoc wireless networks, we remark thatbroadband connectivity is where new content is fetched from(and updated).In order to provide a basic description of the system, wefocus on content being represented by a single informationobject. The mechanisms we describe can then be extendedto multiple objects. We assume the object to be tagged witha validity time, and originally hosted on a server in the In- ternet, which can only be accessed through the broadbandaccess we hinted at. We then consider a cooperative net-work environment composed of a set V = { v (1) , ..., v ( N ) } of mobile nodes. A node v ( j ) wishing to access the contentfirst tries to retrieve it from other devices; if its search fails,the node downloads a fresh content replica from the Internetserver and temporarily stores it for a period of time τ v ( j ) ,termed storage time . For simplicity of presentation, in thefollowing we assume τ v ( j ) = τ, ∀ j ∈ V . During the storageperiod, v ( j ) serves the content to nodes issuing requests forit and, possibly, downloads from the Internet server a freshcopy of the content if its validity time has expired. We as-sume that a node v ( i ) , which at a given time t does not storeany copy of the content and which will later be referred to as“content consumer”, issues queries at a rate λ v ( i ) ( t ) .To achieve load balancing, at the end of the storage time v ( j ) has to decide whether (1) to hand the content over toanother node, (2) to drop the copy, or (3) to replicate the con-tent and hand over both copies. We refer to the nodes hostinga content copy at a given time instant as replica nodes , andwe denote their set by C ( t ) . Only replica nodes are responsi-ble for updating the content and for injecting a new versionin the wireless network.Next, to highlight our contribution with respect to previ-ous work, we relate our study to the formulation of the repli-cation and replica placement problems typically used in theliterature. Let us fix the time instant and drop the time depen-dency for ease of notation. Then, let G = ( V, E ) representthe network graph at the given time, defined by a node set V and an edge set E . Let C denote the set of facility nodes,i.e., nodes holding a content replica. The specification of theplacement of a given number of replicas, k , amounts to solv-ing the uncapacitated k -median problem, which is defined asfollows.D EFINITION Uncapacitated k -median. Given the nodeset V with pair-wise distance function d , service demand λ v ( j ) , ∀ v ( j ) ∈ V , select up to k nodes to act as facilities soas to minimize the joint cost C ( V, λ, k ) : C ( V, λ, k ) = X ∀ v ( j ) ∈ V λ v ( j ) d ( v ( j ) , m ( v ( j ))) where m ( v ( j )) ∈ C is the facility that is closer to v ( j ) . The replica node set C , instead, can be obtained by solv-ing the following uncapacitated facility location problem ata given time instant.D EFINITION Uncapacitated facility location. Giventhe node set V with pair-wise distance function d , servicedemand λ v ( j ) and cost for opening a facility at v ( j ) f ( v ( j )) , ∀ v ( j ) ∈ V , select a set of nodes to act as facilities so as tominimize the joint cost C ( V, λ, f ) of acquiring the facilitiesand servicing the demand: C ( V, λ, f ) = X ∀ v ( j ) ∈C f ( v ( j ))+ X ∀ v ( j ) ∈ V λ v ( j ) d ( v ( j ) , m ( v ( j ))) here m ( v ( j )) ∈ C is the facility that is closer to v ( j ) . For general graphs, both the above problems are NP-hard[10] and a variety of approximation algorithms have been de-veloped, which however require global (or extended) knowl-edge of the network state [9].Which new problems are introduced in the context of ourwork? (i) Node mobility introduces the problem of a dy-namic graph G , requiring that the facility location problembe solved upon every network topology or demand rate change.(ii) Even under static topology and constant demand, solvingthe facility location problem does not yield load balancingamong nodes. (iii) The input to the facility location problemis the content demand workload generated by users: bothreplicas location and the number of replicas to deploy in anetwork depend on content consumption patterns. While theapproach traditionally adopted is to assume content demandto be directed to the closest facility, as stated in Defs. 1 and 2,the wireless nature of our system allows content requests topropagate in the network, potentially reaching multiple fa-cilities (replica nodes).Our main contribution is therefore the design of a mech-anism for content placement and replication that achievesload balancing as the network topology and the query ratevary, while taking into account the implications of querypropagation towards replica nodes.
3. DISTRIBUTED MECHANISM FOR REPLI-CATION AND PLACEMENT PROBLEMS
We now outline our content distribution and replicationprocedures. Firstly, several techniques for query distributionand content access are detailed; next, we examine the chal-lenging problem of replica placement, i.e., of which nodesare to be selected as carriers of content replicas to achieveload balancing; finally, we discuss the behavior of replicanodes as a function of the system workload, in search of acooperative, distributed content replication strategy in pres-ence of changing demand.
The workload experienced by a replica node is determinedby the mechanism used by nodes to access the content throughdevice-to-device communications. We identify two phases:a content query transmission, and a query reply transmis-sion (by the replica node carrying the desired content). Weinvestigate several mechanisms for content access focusingon the content query transmission phase, and we assumethat the identity of the nodes that have relayed the query isadded to the query message itself. After a replica node withthe desired content is found, it will reply to the node issu-ing the query through a multihop transmission process thatbacktracks the path from the replica node to the queryingnode, exploiting the identity of relay nodes included in thequery message. This backtracking, although possibly occur-ring through multiple hops, makes no use of ad hoc routingprotocols, as it is completely application-driven. As far as the query transmission phase is concerned, thefollowing three mechanisms are envisioned.
Scoped-flooding: content requests are simply flooded witha limited scope using application-layer broadcast. The “scope”can be defined as the maximum number of hops throughwhich a query propagates, i.e., neighboring nodes propagatea query until it has traversed a maximum number of hops H ,after which it is dropped. Clearly, if the request is receivedby a replica node, the content is served and the query is notpropagated any further.The main drawback of flooding is that multiple contentreplicas within reach of a node will be “hit” by a request.Beside causing congestion when a large number of replicanodes reply to the querying node, this also creates an artifi-cially inflated workload, which conflicts with the underlyingassumptions in Defs. 1 and 2. In our experiments, we ex-plore the benefits of a selective reply mechanism that replicanodes can use to mitigate excessive workloads due to flood-ing. When selective reply is enabled, a replica node repliesto a query with a probability that is inversely proportional tothe hop-count of query messages. Scanning: instead of flooding in all directions, the nodeissuing the query specifies an angular section within whichthe query is to be propagated by other nodes. In order todo so, it includes its own position (e.g., obtained throughGPS), and the angle boundaries. All nodes receiving thequery rebroadcast it only if their position satisfies the angu-lar requirements, until a replica node is found or the queryhas traversed a maximum number of hops H . Nodes thatare not within the angular section specified in the query willdiscard the message. If no reply is received after a timeout,a new sector is scanned, and the scanning of all sectors isrepeated till either a reply is received or a maximum numberof retries has been achieved. The number of sectors S , eachof width π/S , is a parameter of the system.The complexity of this mechanism is comparable to thatof scoped-flooding, however we will show that it reducesthe overhead experienced with flooding. On the downside,scanning requires nodes to be able to estimate their positionand reduces the probability of solving a query with respectto flooding-based solutions. Indeed, when a replica is withinthe sector currently scanned by the requesting node but it isfarther than one hop away, one or more relay nodes would beneeded to reach the replica. However, if at least one of theavailable relays are located outside the sector, the replica isnot reached and the content query remains unsolved. Thus,the narrower the sector, the more likely that the query is un-successful. Perfect-discovery: in this case, which is added for com-parison purposes, nodes are assumed to be able to access acentralized content-location service that returns the identityof the closest content replica in terms of euclidean distance.We do not address the problem of how the centralized ser-vice is updated, save by noting that it is certainly responsiblefor additional overhead and complexity, and that it can be3anaged through a separate protocol using unicast or multi-cast transmissions. A query is propagated using application-driven broadcast, but only the intended replica node (speci-fied in the query) will serve the content. Any other replicanode will discard the request.On the one hand, this content access mechanism is themost demanding because it requires the presence of an aux-iliary service to discover the closest replica. On the other,only one replica node carries the workload generated by theclosest users, which is the hypothesis to the optimizationproblems stated in Sec. 2.Finally, we improve the query/reply propagation processby adopting the PGB technique [11] for selecting forwardingnodes and sequence numbers to detect and discard duplicatequeries.
Next, we overview the distributed lightweight algorithmthat we use to solve the replica placement problem. Re-call that any mobile device can be selected to host a contentreplica for a limited amount of time, that we term storagetime , τ .Also, as the first step to our study, we focus on the case ofhomogeneous user query rate, i.e., λ v ( j ) ( t ) = λ ( t ) , ∀ v ( j ) .As discussed in Sec. 2, at a fixed time instant, replicaplacement can be cast as the uncapacitated k -median prob-lem. Given a set of potential locations to place a replica, theproblem is to position an a-priori known number k of repli-cas according to Def. 1, i.e., so as to minimize the distancebetween replica node and requesting node. For a genericdistribution of nodes over the network area, the solution ofthe k -median problem for different instances of the networkgraph yields replica placements that are instances of a ran-dom variable uniformly distributed over the graph. This isquite an intuitive result, confirmation of which we found byapplying the approximation algorithm in [9] to the solutionof the k -median problem in presence of various network de-ployments.As pointed out earlier, though, the solution in [9] cannotbe applied to our case since it is centralized and requiresglobal knowledge of the network. We therefore devise alightweight distributed mechanism that well approximates auniform distribution of the replicas over the network nodes,i.e., a nodal uniformity , and that allows users to take turns inplaying the role of replica nodes so as to achieve load bal-ancing.According to our mechanism, named Random-Walk Dif-fusion (RWD) , at the end of its storage time, a replica nodeselects with equal probability one of its neighbors to storethe content for the following storage period. Thus, contentreplicas roam the network by moving from one node to an-other, randomly, at each time step τ .To understand the extent to which replica placement achievedby our simple technique resembles the target nodal distribu- tions, in Sec. 4 we employ the well-known χ goodness-of-fit test on the inter-distance between content replicas. When-ever the computation complexity allows us, we compare thetemporal evolution of the inter-distance distribution of repli-cas obtained by our scheme against the optimal replica place-ment computed by solving the k -median problem. Other-wise, we consider as term of comparison the empirical distri-bution of the distance between two nodes measured in simu-lation. Note that using inter-distances instead of actual coor-dinates allows us to handle a much larger number of samples(e.g., | V | · ( | V | − instead of just | V | samples) thus makingthe computation of the χ index more accurate.It is clear that the quality of approximation of the tar-get replica distributions achieved by our store-and-forwardmechanism depends on the node density: the higher the den-sity, the better our approximation. We now focus on the more general problem of the un-capacitated facility location, defined in Sec. 2, where theoptimal number of replicas (facilities) to be placed in thenetwork is to be determined along with their location. Inparticular, we want to answer the following questions.1. Given a set of demand points that exhibit a homoge-neous query rate λ , what is the optimal number of con-tent replicas that should be deployed in the network toachieve load balancing?2. Is it possible to design a lightweight distributed algo-rithm that approximates this optimal number of repli-cas in presence of a dynamic demand and time-varyingtopology?We address these questions by suggesting simple modifi-cations to the RWD mechanism described in Sec. 3.2.Again, we fix the time instant and, for simplicity, we dropthe time dependency from our notation. Let the network bedescribed by the graph G = ( V, E ) , with | V | = N nodesdeployed on an area A . Also, recall that C and V \C representthe sets of content replicas and of nodes issuing requests,respectively.Given G and the query rate λ , the uncapacitated facilitylocation problem amounts to the joint optimization of thenumber of replicas and their locations in the network. TheRWD mechanism achieves a good approximation of the op-timal placement in mobile networks, but ignores the cost todeploy a content replica. Now, with reference to Def. 2, wedefine the cost function to deploy content replicas in the net-work f ( v ( j )) , ∀ v ( j ) ∈ C , as follows: f ( v ( j )) = | s v ( j ) − s R | (1)where s v ( j ) is the workload expressed as number of queriesserved by replica node v ( j ) during its storage time, and s R isa reference value for the workload that node v ( j ) is willingto support. We assume the case where all replica nodes are4illing to serve the same amount of queries, although ourstudy can be easily extended to the case of different valuesof s R . Eq. (1) indicates that the cost for replica node v ( j ) grows with the gap between its workload and the referencevalue s R . By using the cost function in (1) in the facilitylocation problem in Def. 2, we can determine the locationand number of replicas so that load balancing is achievedunder the idealistic assumption that each query reaches onereplica only.Our replication mechanism only involves replica nodes,which are responsible to decide whether to replicate, handover or drop content based on local measurements of theirworkload. During storage time τ , the generic replica node v ( j ) measures the number of queries that it serves, i.e., ˆ s v ( j ) .When the storage time expires, the replica node compares ˆ s v ( j ) to s R . Decisions are taken as follows:if ˆ s v ( j ) − s R > ǫ replicate < − ǫ dropelse hand overwhere ǫ is a tolerance value to avoid replication/drop deci-sions in case of small changes in the node workload.The rationale of our mechanism is the following. If ˆ s v ( j ) >s R , replica node v ( j ) presumes the current number of con-tent replicas in the area to be insufficient to guarantee theexpected workload s R , hence the node replicates the contentand hands the copies over two of its neighbors (one each),following the RWD placement mechanism (Sec. 3.2). Thetwo selected neighbors will act as replica nodes for the sub-sequent storage time. Instead, if ˆ s v ( j ) < s R , replica node v ( j ) thinks that the current number of replicas in the area isexceeding the total demand, and just drops the content copy.Finally, if the experienced workload is (about) the same asthe reference value, v ( j ) selects one of its neighbors to handover the current copy.We stress that replication and placement are tightly re-lated. For example, if content demand varies in time or inspace (e.g., only a fraction of all nodes located in a sub-zone of the network area issue queries), both the numberof replicas and their location must change. Thanks to thefact that replica nodes take decisions based on the measuredworkload, our solution can dynamically adapt to a time- orspace-varying query rate, as will be shown by our simulationresults. On the contrary, when the content demand is con-stant and homogeneous, our handover mechanism ensuresload balancing among the network nodes.In the following, we set up a simulation environment toevaluate the behavior of our mechanism when the wirelessnetwork is both static and dynamic. We also characterize thetime the system takes to reach an optimal number of contentreplicas and we investigate the impact of the content accessscheme on the performance of our solution.
4. SIMULATION-BASED EVALUATION
We implemented our replica placement and content repli- cation mechanism in the ns -2 simulator. For each experi-ment described in the following, we execute 10 simulationruns and report averaged results. Our statistics are collectedafter an initial warm-up period of 500 s.In our simulations, which lasted for almost 3 hours ofsimulated time (10000 s), we assume nodes to be equippedwith a standard 802.11 interface, with an 11 Mbps fixed datatransmission rate and a radio transmission range of 20 m.We consider a single content, whose size is of the order of 1KB. In our evaluation we do not simulate cellular access. Wepoint out that all standard MAC-layer operations are simu-lated, which implies that both queries and replies may belost due to typical problems encountered in 802.11-based adhoc networks (e.g., collisions or hidden terminals). This ex-plains why, in the following, even nominally “ideal” accesstechniques may not yield the expected good performance.We focus our attention on wireless networks with highnode density: we place N = 320 nodes uniformly at ran-dom on a square area A of × m , with a resultingaverage node degree of 9–10 neighbors. We simulate nodemobility using the stationary random waypoint model [12]where the average node speed is set to 3 m/s and the pausetime is set to 100 s. These settings are representative, forexample, of people using their mobile devices as they walk.Unless otherwise stated, the parameters that define themechanisms described in this work are set as follows. Forthe content access mechanisms, we set the scope of floodingand scanning to H = 5 hops: e.g., a node can cover halfof the network diameter with scoped-flooding. In the caseof scoped-flooding or perfect-discovery, if a query fails (i.e.,no answer is received after 2 s), a new request is issued, upto a total of 5 times. If the scanning mechanism is used, acomplete scan of π is divided into S = 5 angular sectors,each of which is visited for a maximum of 0.5 s, at most 5times .Finally, the tolerance value ǫ used in the replication/dropalgorithm is equal to 2, unless otherwise stated; for all nodes,the storage time τ is set to 100 s, the user request rate is λ = 0 . req/s, and the reference workload for a replicanode is equal to s R = 10 . We present the main results of our work organized in aseries of questions. We focus on the mobile scenario, butpresent results for a static network when the comparison isrelevant. Tab. 1 summarizes the notations used in our figuresto refer to content access mechanisms.
How well does our replica placement approximate thetarget distribution?
Here we assume a known number of content replicas to bedeployed ( |C| =30), i.e., we consider the k -median problemdiscussed in Sec. 2. We measure the accuracy of our dis- We use the parameters that give the best results in terms of contentaccess performance. able 1: Notation for different content access mecha-nisms. The post-fix “S” and “M” indicate a static anda mobile network, respectively. Content access mechanism Notation
Perfect-discovery PS, PMScanning SS, SMScoped-flooding FS, FMScoped-flooding with selective reply FS*,FM*tributed replica placement mechanism using the χ goodness-of-fit test on the inter-distance between replicas, as explainedin Sec. 3.2. In case of a mobile network, we compute thedistribution of replica nodes as follows: every τ secondswe take a snapshot of the network in its current state, wecompute a reference distribution (e.g., nodal uniformity) ofcontent replicas and use the χ test against the distributionachieved by our mechanism. We remark that lower values ofthe χ index indicate a better approximation, and that usu-ally a value of χ below 3.84 is considered a good fit [13]. χ i nde x µ σ µ . σ . Figure 1: Temporal evolution of the χ index in a staticscenario ( |C| =30 and τ =100 s). We first focus on a static network in which nodes are uni-formly distributed on A . Fig. 1 shows that our scheme doesan excellent good job of approximating the optimal replicaplacement . (We omit the comparison to nodal uniformitysince our results show that the values of the χ index arepractically identical.) We therefore asked ourselves if a sim-ilar match could be found if the replica placement were uni-formily distributed in space. As can be seen in the figure, ahigher value of χ indicates a poorer match with our place-ment scheme, mainly due to the lack of nodes (hence ofreplicas) where the spatially uniform distribution would havetheoretically placed them.Fig. 2 depicts the χ test against nodal uniformity for themobile scenario. Note that, due to the stationary randomway-point mobility model used in our simulations, the nodedistribution is not uniform on the network area. The tempo-ral evolution of the χ index suggests that our replica place- In fact, we solve the k -median problem through the centralizedlocal-search algorithm described in [9] and obtain a tight approxi-mation of the optimal solution. χ i nde x Mobile µ . , σ . Figure 2: Temporal evolution of the χ index in a mobilescenario ( |C| =30 and τ =100 s). ment mechanism is able to approximate very well nodal uni-formity, despite network dynamics. We did not consider theoptimal placement in this case, due to the cumbersome com-putational load. CD F Figure 3: CDF of the hop-distance to the closest contentreplica in a mobile scenario ( |C| =30 and τ =100 s). Finally, Fig. 3 reports the cumulative distribution function(CDF) of the distance (in number of hops) between a contentconsumer and the closest replica. We observe that more than50% of nodes can reach the closest replica within 1 hop, andmore than 90% of nodes are within 2 hops from the closestreplica, i.e., for |C| =30, consumers can access content withinvery few hops.
Summary : we overviewed our replica placement mech-anism as a necessary introductory step to the replicationscheme. We showed that the RWD mechanism can approx-imate very accurately the optimal solution to the k -medianproblem (Fig. 1), and it clearly approximates nodal unifor-mity even when the network is dynamic (Fig. 2). For theplacement problem alone, in [8] we also explored the impli-cations of clustered networks, different mobility models, andthe parameter τ . What is the performance of content access mechanisms?
We evaluate the performance of the four content access mech-anisms listed in Tab. 1, in terms of the following metrics:6 solving ratio , i.e., the ratio of satisfied requests to thetotal number of queries generated in the network. Thetarget value is , corresponding to 100% of solved queries; • reply redundancy , i.e., the number of replies to thesame request, received from different replica nodes.The target value is , corresponding to one reply toeach query; • latency , i.e., the delay experienced by nodes to accessinformation.Fig. 4 shows the following quantiles of the access perfor-mance metrics for |C| =30: the 25% (resp. 75%) as the lower(resp. higher) boundary in the error box, the 50% as the linewithin the error box. The brackets above and below the er-ror box delimit the support of the CDF for that metric. Forall access mechanisms, the median solving ratio (Fig. 4.a)is higher than 0.9, which indicates that only a small frac-tion of queries cannot reach a content replica. We observethat node mobility helps improving the solving ratio. Thescheme that exhibits a slightly worse performance appearsto be the scanning scheme, which is seldom unabke to reacha replica through relay nodes (see Sec. 3).Fig. 4.b depicts the extent to which flooding-based mecha-nism can artificially inflate the workload of replica nodes: inour experiments, a single query can hit almost 6 replicas inthe worst case . High redundancy has a direct consequenceon the behavior of the replication mechanism, as we discussin detail later. We observe that the selective reply mecha-nism can halve the level of redundancy typical of flooding,and that node mobility helps in reducing redundancy in allschemes. It is important to notice that the scanning mecha-nism achieves a low reply redundancy, without requiring thepresence of an auxiliary mechanism to help consumer nodestarget the closest replica.Latency for each content access scheme is shown in Fig 4.c:scanning is clearly the outlier in this figure, and we observethat node mobility might introduce additional delays.We now provide more details on the performance of thescanning mechanism. Fig. 5 shows the impact of the timespent waiting for a reply on each sector composing the scan-ning horizon; we term this time sector timeout . The solvingratio is marginally affected by this parameter for a static net-work, but it decreases in the mobile case. Indeed, delayingthe search in the next sector by a longer time has the mo-bile node skip larger portions of the area: two consecutivelyscanned sectors turn out to be non-adjacent due to the changein the position of the node issuing the query. The redundancydecreases with longer sector timeouts: indeed, the longer thetimeout the higher the probability that a node scans anothersector, i.e., it issues another query, only when no replica isavailable in the current sector. Instead, the latency deterio-rates with a longer sector timeout because it will take more We also run experiments with lower values of the flooding scope H : redundancy, which is proportional to H , remains higher inflooding compared to other schemes. time to hit the sector where the replica is located. Mobilityseems to have a positive effect on the delay, even with longersector timeouts, since most solved queries are due to close-by replica nodes (farther nodes may reply after the queryingnode has moved away).Fig. 6 shows the impact of the number of angular sec-tors in which the space around a node is partitioned, as de-termined by the scanning angle parameter. As explained inSec. 3.1, a small scanning angle might reduce the probabil-ity for a query to reach a replica, hence the lower solvingratio with small angles. We observe a similar effect on re-dundancy: smaller angles limit the number of replicas “hit”by a query. Instead, the latency decreases with larger scan-ning angles because the probability to find a replica within asector increases. Summary: we analyzed the performance of several con-tent access mechanisms, ranging from simple flooding-basedto complex schemes requiring perfect-discovery. With thesetting used in our tests, we showed that a content queryhits at least one replica with very high probability (Fig. 4)and that access delay can be slightly larger than 1 s withthe scanning mechanism. Despite having larger delays, ourresults (Figs. 5 and 6) showed that the scanning mecha-nism achieves very low redundancy (comparable to perfect-discovery) and bears little costs in terms of complexity (whichis comparable to flooding).
Is the replication mechanism effective in reaching atarget number of replicas?
We now turn our attention to the uncapacitated facility loca-tion described in Sec. 2 and study how well the replicationmechanism defined in Sec. 3.3 approximates the joint prob-lem of replication and placement. Recall that the hypothesisof content demand points to be associated to the closest fa-cility is hardly viable in the context of broadcast wirelessnetworks (only the perfect-discovery scheme achieves it butwith significant additional complexity).Here we take an extreme scenario in which only one copyof the content is initially present in the network and we focuson the evolution in time of the number of replicas in the sys-tem. We omit the temporal evolution of the χ index, sinceour results are consistent with what we have observed for theplacement scheme without replication.Fig. 7 shows the temporal evolution of the total numberof content replicas |C| for the mobile scenario. In the plot,we report a reference line representing the target numberof content replicas computed as follows. Let us considerthe perfect-discovery content access mechanism: demandpoints are associated to their closest replica. Finding theoptimal number of content replicas amounts to solving theuncapacitated facility location problem for a given networkgraph. We have implemented the centralized algorithm in[9] , which is a rigorous but very demanding approach when We set a non-uniform cost to open a facility proportional to its S PM SS SM FS FM FS* FM*0.60.650.70.750.80.850.90.951 S o l v i ng R a t i o (a) Solving ratio PS PM SS SM FS FM FS* FM*123456 R ep l y R edundan cy (b) Reply redundancy PS PM SS SM FS FM FS* FM*00.10.20.30.40.50.60.70.80.911.11.21.31.41.5 La t en cy ( s ) (c) Latency Figure 4: Performance of content access mechanisms, in a static and mobile scenario ( |C| =30 and τ =100 s). S o l v i ng R a t i o StaticMobile (a) Solving ratio R ep l y R edundan cy StaticMobile (b) Reply redundancy La t en cy ( s ) StaticMobile (c) Latency
Figure 5: Performance of the scanning mechanism as a function of the sector timeout (scanning angle π/ , |C| =30 and τ =100 s). pi/6 pi/4 2pi/5 pi/2 pi0.60.650.70.750.80.850.90.951 Scanning Angle S o l v i ng R a t i o StaticMobile (a) Solving ratio pi/6 pi/4 2pi/5 pi/2 pi12345678 Scanning Angle R ep l y R edundan cy StaticMobile (b) Reply redundancy pi/6 pi/4 2pi/5 pi/2 pi012345678 Scanning Angle La t en cy ( s ) StaticMobile (c) Latency
Figure 6: Performance of the scanning mechanism as a function of the scanning angle (sector timeout = 0.5s, |C| =30 and τ =100 s). |C ∗ | to be such that: |C ∗ | s R τ = ( N − |C ∗ | ) λ (2)where ( N −|C ∗ | ) λ is the network aggregate query rate. From(2), we write: |C ∗ | = N λτλτ + s R (3)For the parameters used in our simulations, the sample solu-tion of the centralized algorithm and the value in (3) agreeon the target number of replicas: the system should reach |C ∗ | = 30 replica nodes.Fig. 7 indicates that the number of content replicas weachieve with our scheme strikingly matches the target valuewhen perfect-discovery is used: in steady state, the averagerelative error is less than 2%. We can also observe the ad-verse effects of the artificially inflated workload created bythe scanning and flooding mechanisms. In case of flood-ing, the number of replicas in the system is drastically over-estimated. Despite its simplicity, the scanning mechanisminduces a much smaller error than flooding in reaching thetarget number of content replicas. | C | Perfect−DiscoveryScanFloodFlood*
Figure 7: Temporal evolution of the number of replicas,for a network bootstrapping with |C| = 1 in a mobilescenario ( λ = 0 . , s R = 10 , τ = 100 s, |C ∗ | = 30 ). Fig. 8 depicts the ratio between the aggregate number ofreplication and drop decisions and shows in more detailsthe behavior of the replication mechanism: when a single orfew nodes support most of the content queries, the numberof replication decisions is considerably higher than drop de-cisions. Once a sufficient number of replicas have populatedthe network, the ratio reaches the steady state value of 1. degree: indeed, a highly connected node will most likely attractmore demand from content consumers. For sake of clarity, in this figure we omit handover decisions andwe report results every 1000 s. R ep li c a t i on / D r op R a t i o Perfect−DiscoveryScanFloodFlood*
Figure 8: Replication/drop ratio for a mobile scenario fora network bootstrapping with |C| = 1 ( λ = 0 . , s R =10 , τ = 100 s). How is the total workload shared among replica nodes?
As before, we study the joint placement and replication prob-lem and we use the extreme scenario in which the networkis initialized with only one content replica.Fig. 9 shows the 25%, 50% and 75% quantiles of theworkload for each replica node, aggregated over the sim-ulation time. The figure is complemented with the aver-age workload per replica node. The reference value s R =10 is shown as a horizontal line in the plot. As expected,with perfect-discovery the average load matches the refer-ence value s R , both in the static and mobile scenario. In-stead, when flooding is used, the average load is consistentlyabove s R , albeit the “approximation error” is smaller than3%. It should be noted, with reference to Fig. 7, that, whenflooding is used, replica nodes achieve a good approximationof s R because the total number of content replicas is higherthan the target value: since the workload induced by floodingreaches multiple replica nodes, our adaptive scheme repli-cates more than necessary to maintain the workload withinthe desired target s R . When scanning is used, the qualityof approximation of s R is excellent. Node mobility helpsin reducing the skewness of the workload distribution. Wenote that it is possible that some nodes experience very littleworkload: this happens when the location of a replica is veryclose to the boundaries of the node deployment area, whichimplies that fewer content queries will reach those replicanodes. What is the convergence time of the replication mech-anism?
Convergence time should be carefully defined in our con-text: clearly, our mechanism cannot settle to a static, uniquecontent replica placement, nor can it stabilize on a uniquenumber thereof. For placement, it is not our intent to stati-cally assign the role of content replica to a node and depletenodal resources: we seek to balance the workload across allnetwork nodes. We assume the network to have convergedto a steady state when the difference between the reference9
S PM SS SM FS FM FS* FM*051015202530 W o r k l oad µ REF
Mean load
Figure 9: Aggregate workload distribution for replicasfor a network bootstrapping with |C| = 1 ( λ = 0 . , s R =10 , τ = 100 s). value computed through (3) and the experimental number ofreplicas is within 2%.Again, we consider a worst-case scenario in which onlyone copy of the content is initially present in the network.Tab. 2 illustrates how convergence time (labelled t s ) varieswith the storage time τ , and the tolerance value ǫ in thecase of perfect-discovery. We also performed experimentsto study the impact of the network size: we have observeda linear growth of the convergence time with N . Since thestorage time τ is used to trigger replication/drop decisions,we expect to see a positive correlation between τ and con-vergence time: Tab. 2 confirms this intuition. We note thatthere is a trade-off between the convergence time, and themessage overhead: a small storage time shortens the con-vergence time at the cost of an increased number of contentmovements from a node to another. Moreover, in our simu-lations we do not trace the message overhead required by theperfect discovery mechanism: with frequent reassignmentsof a node to the closest replica, this overhead could becomeprohibitive. As for the impact of the tolerance parameter ǫ ,our experiments indicate that a very reactive scheme wouldyield smaller convergence times, at the risk of causing fre-quent oscillations around a target value. Table 2: Average convergence time t S as a function of thestorage time τ ( ǫ = 2 ) and the tolerance factor ǫ ( τ = 100 s), with perfect-discovery. τ (s) t S (s)20 80050 1500100 1700150 2000200 2300 ǫ t S (s)0 7002 17005 1900 Summary: we showed that our replication mechanism,which provides for content copies to by added, dropped orhanded over by replica nodes achieves a very good approx-imation of the optimal number of replicas (Fig. 7) and atarget placement thereof (Fig. 9), in a variety of scenar- ios and under several content access mechanisms (Fig. 8) .Our scheme is robust against mobility, which turns out to bean ally especially for balancing the workload among replicanodes. We also studied the parameters that influence thetime it takes for the network to reach a steady state and dis-cussed the tradeoff that exists between convergence time andmessage overhead (Tab. 2). The scanning mechanism sug-gested in this work mitigates the message overhead due toan auxiliary service to support perfect discovery, at the costof increasing the estimation error in the number of contentreplicas to place in the network.
What is the impact of variations in time and in spaceof the content demand?
We now focus our attention on the behavior of content repli-cation in presence of a dynamic workload. We first examineworkload variations in time. In a first phase, that begins attime 0 and ends at 5000 s, we set the content request rate as λ = 0 . req/s. In a second phase, from 5000 s to the end ofthe simulation, the request rate doubles, i.e., λ = 0 . req/s. | C | IdealPerfect−DiscoveryScan
Figure 10: Temporal evolution of the number of replicanodes in case of variations in time of the content demand,for a mobile network. |C ∗ | is equal to 30 and 53 in the firstand second phase, respectively. Fig. 10 shows the temporal evolution of the number ofreplicas in a mobile network. The figure is enriched withtwo reference values : in the first phase |C ∗ | = 30 , in thesecond phase |C ∗ | = 53 . We report results for the perfect-discovery and the scanning access schemes: our mechanismachieves a very good approximation of the target number ofreplicas with perfect-discover, and slightly over-replicatesthe content when scanning is used. Despite node mobil-ity, not only is our scheme able to correctly determine thenumber of replicas but also their target location; as a con-sequence, the load distribution is minimally affected by avariation in time of content demand. This result is shown inFig. 11, where we indicate the 25%, 50% and 75% quantilesof the workload, and we report the average load per replicanode. Note that, although at first glance the mean load values As explained before, we compute the target values through (3),but compare them with the solution of the facility location problemcomputed over several snapshots of the network graph.
PM SM PM SM0102030 W o r k l oad µ REF
Mean load
Figure 11: Workload distribution of replica nodes forvariations in time of the content demand, in a mobile net-work.
We now turn our attention to variations in space of contentdemand: we describe the behavior of the content replica-tion mechanism with the following example. For the initial s of the simulation time, content queries are issued byall nodes deployed on the network area A of size m .Subsequently, we select a smaller square area α of size m and instruct only nodes within that zone to issue con-tent queries, while all other nodes exhibit a lack of interest.Nodes use perfect-discovery to access the content. χ i nde x χ over A χ over α Figure 12: Temporal evolution of the χ index for varia-tion in space of the content demand, in a mobile network. Fig. 12 shows the temporal evolution of the χ index com-puted as follows. We compare the distribution of contentreplicas achieved by our mechanism against the target nodaluniformity distribution computed over the network area A and the sub-zone α , and plot the two curves. When all nodesissue queries, the line of the χ index computed over A indicates a good approximation of the target replica place-ment. This is true up to roughly 5000 s, after which the χ in A shows a substantial deterioration in approximatingnodal uniformity on all nodes. Indeed, after 5000 s, the tar-get replica placement should be computed over the area α , and the second line of the χ index computed over α indi-cates that the distribution of replicas achieved by our mech-anism is indeed a good approximation of a target placementover α . We can conclude that our mechanism allows contentreplicas to “migrate” where the demand is higher. Summary : we showed that our mechanism achieves atarget placement and a sufficient number of content replicasto cope with complex demand scenarios, even in a mobilenetwork. When content demand varies in time, our mecha-nism adaptively replicates the content to meet the variationin the workload (Fig. 10). When content demand varies inspace, our scheme allows content replicas to migrate to thelocation where the demand is higher and meet a variation inthe workload (Fig. 12).
5. RELATED WORK ON REPLICATION INMULTIHOP NETWORKS
Simple, widely used techniques for replication are gossip-ing and epidemic dissemination [14,15], where the informa-tion is forwarded to a randomly selected subset of neighbors.Although our RWD scheme may resemble this approach inthat a replica node hands over the content to a randomly cho-sen neighbor, the mechanism we propose and the goals itachieves (i.e., approximation of nodal uniformity and opti-mal number of replicas) are significantly different.Another viable approach to replication is represented byquorum-based [16] and cluster-based protocols [17]. Bothmethods, although different, are based on the maintenanceof quorum systems or clusters, which in mobile networkare likely to cause an exceedingly high overhead. Nodegrouping is also exploited in [18,19], where groups of nodeswith stable links are used to cooperatively store contents andshare information. The schemes in [18, 19], however, re-quire an a-priori knowledge of the query rate, which is as-sumed to be constant in time. Note that, on the contrary,our lightweight solution can cope with a dynamic demand,whose estimate by the replica nodes is used to trigger repli-cation. We point out that achieving content diversity is thegoal of [20] too, where, however, cooperation is exploitedamong one-hop neighboring nodes only.Threshold-based mechanisms for content replication areproposed in [21, 22]. In particular, in [21] it is the originalserver that decides whether to replicate content or not, andwhere. In [22], nodes have limited storage capabilities: ifa node does not have enough free memory, it will replacea previously received content with a new one, only if it isgoing to access that piece of information more frequentlythan its neighbors up to h -hops. Our scheme significantlydiffers from these works, since it is a totally distributed andextremely lightweight mechanism, which accounts for thecontent demand by other nodes and ensures a replica densitythat autonomously adapts to the changes in the query rateover time and space.Finally, relevant to our study are the numerous schemes11roposed for handling query/reply messages; examples are[23], which resembles the perfect-discovery mechanism, and[24,25] where queries are propagated along trajectories so asto meet the requested information. Also, we point out thatthe RWD scheme was first proposed in our work [8]. Thatpaper, however, besides being a preliminary study, focusedon mechanisms for content handover only: no replication orcontent access were addressed.
6. CONCLUSIONS
We focused on content replication in mobile networks andwe addressed the joint optimization problem of (i) establish-ing the number of content replicas to deploy in the network,(ii) finding their most suitable location, and (iii) letting usersefficiently access content through device-to-device commu-nications.To achieve these goals, we proposed a distributed mecha-nism that lets content replicas move in the network accordingto random patterns: network nodes temporarily store con-tent, which is handed over to randomly selected neighbors.Hence the burden of storing and providing content is evenlyshared among nodes and load balancing is achieved. In ourmechanism, replica nodes are also responsible for creatingcontent copies or drop them, with the goal of obtaining anideal number of content replicas in the network. The work-load experienced by a replica node is the only measured sig-nal we use to trigger replication and drop decisions.We studied the above problems through the lenses of facil-ity location theory and showed that our lightweight schemecan approximate with high accuracy the solution obtainedthrough centralized algorithms. Clearly, network dynamicsexact a high toll in terms of complexity to reach an opti-mal replication and placement of content, and we showedthat our distributed mechanism can readily cope with sucha scenario. Moreover, we removed the typical assumptionof assigning content demand points to their closest replicaand investigated several content access schemes, their per-formance, and their impact on content replication.Lastly, we studied the flexibility of our scheme when con-tent demand varies in time and in space: our experimentsunderlined the ability of our approach to adapt to such vari-ations while maintaining accuracy in approximating an opti-mal solution.Our next step will be to relax the assumption of a coop-erative setting and analyze selfish replication with tools akinto game theory. In [26] we show that the system we studycan be modeled as an anti-coordination game, and our goalis to understand how to modify or extend the ideas presentedin this work to achieve strategy-proofness.
7. REFERENCES [1] A. Derhab and N. Badache, “Data Replication Protocols for MobileAd-hoc Networks: A Survey and Taxonomy,”
IEEE CommunicationsSurveys & Tutorials, vol. 11, no. 2, pp. 33–51, 2009.[2] L. Yin and G. Cao, “Supporting Cooperative Caching in Ad HocNetworks,”
IEEE Trans. on Mobile Computing, vol. 5, no. 1, pp. 77–89, Jan. 2006.[3] B. Tang, H. Gupta, and S. Das, “Benefit-based Data Caching in AdHoc Networks,”
IEEE Trans. on Mobile Computing, vol. 7, no. 3,pp. 289–304, Mar. 2008.[4] M. Fiore, F. Mininni, C. Casetti, and C.-F. Chiasserini, “To Cache orNot To Cache?,”
IEEE Infocom,
Rio de Janeiro, Brazil, Apr. 2009.[5] N. Laoutaris, G. Smaragdakis, K. Oikonomou, I. Stavrakakis, and A.Bestavros, “Distributed Placement of Service Facilities inLarge-Scale Networks,”
IEEE Infocom,
IEEE/ACM Trans. on Networking, vol. 14, no. 5, Oct. 2006.[7] P. Mirchandani and R. Francis, “Discrete Location Theory,”
JohnWiley and Sons , 1990.[8] C. Casetti, C.-F. Chiasserini, M. Fiore, C.-A. La, and P. Michiardi,“P2P Cache-and-Forward Mechanisms for Mobile Ad HocNetworks,”
IEEE ISCC , Sousse, Tunisia, July 2009.[9] V. Arya, N. Garg, R. Khandekar, A. Meyerson, K. Munagala, and V.Pandit, “Local Search Heuristic for k-median and Facility LocationProblems,”
ACM STOC,
SIAM Journal on AppliedMathematics , vol. 37, pp. 539–560, 1979.[11] V. Naumov, R. Baumann, and T. Gross, “An Evaluation ofInter-vehicle Ad Hoc Networks Based on Realistic VehicularTraces,”
ACM MobiHoc , Florence, Italy, May 2006.[12] J.-Y. Le Boudec, M. Vojnovic, “Perfect Simulation and Stationarityof a Class of Mobility Models,”
IEEE Infocom,
Mar. 2005.[13]
NIST/SEMATECH e-Handbook of Statistical Methods /, , 2009.[14] H. Hayashi, T. Hara, and S. Nishio, “On Updated Data DisseminationExploiting an Epidemic Model in Ad Hoc Networks,” BioADIT,
IEEE MASS , Oct. 2004.[16] J. Luo, J.-P. Hubaux, and P. T. Eugster, “PAN: Providing ReliableStorage in Mobile Ad Hoc Networks with Probabilistic QuorumSystems,”
ACM MobiHoc , 2003.[17] H. Yu, H. Hassanein, and P. Martin, “Cluster-based Replication forLarge-scale Mobile Ad-hoc Networks,”
International Conf. onWireless Networks, Communications and Mobile Computing,
June2005.[18] T. Hara, “Effective Replica Allocation in Ad Hoc Networks forImproving Data Accessibility,”
IEEE Infocom,
Apr. 2001.[19] T. Hara, Y.-H. Loh, and S. Nishio, “Data Replication Methods Basedon the Stability of Radio Links in Ad Hoc Networks,”
DEXA , 2003.[20] L. Yin and G. Cao, “Balancing the Tradeoffs between DataAccessibility and Query Delay in Ad Hoc Networks,”
IEEE SRDS ,2004.[21] V. Thanedar, K. C. Almeroth, and E. M. Belding-Royer, “ALightweight Content Replication Scheme for Mobile Ad HocEnvironments,”
Network , 2004.[22] M. Shinohara, H. Hayashi, T. Hara, and S. Nishio, “ReplicaAllocation Considering Power Consumption in Mobile Ad HocNetworks,”
IEEE PERCOMW , 2006.[23] K. Chen and K. Nahrstedt, “An integrated Data Lookup andReplication Scheme in Mobile Ad Hoc Networks,”
SPIE ITCom ,Aug. 2001.[24] D. Braginsky and D. Estrin, “Rumor Routing Algorithm For SensorNetworks,”
ACM WSNA,
Mobile Data Management , 2004.[26] P. Michiardi, C.-F. Chiasserini, C. Casetti, C.-A. La, and M. Fiore,“On a Selfish Caching Game,”
ACM PODC (Brief Announcement),Calgary, Canada, Aug. 2009(Brief Announcement),Calgary, Canada, Aug. 2009