18
Peer-to-Peer Netw. Appl. (2012) 5:143–160 DOI 10.1007/s12083-011-0115-5 MANET adaptive structured P2P overlay Nadir Shah · Depei Qian · Rui Wang Received: 16 August 2011 / Accepted: 16 October 2011 / Published online: 17 November 2011 © Springer Science+Business Media, LLC 2011 Abstract This paper presents an efficient structured P2P overlay over MANET which better matches to the physical network in term of routing. This feature is achieved by locally building up the minimum-spanning tree (MST) at each peer using the information of the peer’s logical neighbors which are either directly con- nected (1-hop) or 2-hops away. Using this intercon- nection structure among the peers, we design a new algorithm to distribute the contents information in the overlay by partitioning the identifier (ID) space among the peers. In this algorithm, each peer maintains a disjoint portion of the ID space. The ID space at a peer may be non-contiguous and each contiguous part is consecutive to the ID space of its directly connected neighbor peers. To route the file-lookup query, each peer builds up a binary search tree (BST) using the knowledge of the ID space of itself and of its directly connected neighbor peers. Simulation results show that our approach outperforms the existing approaches in term of routing overhead, average file-discovery delay, false-negative ratio and average path-stretch value. N. Shah · D. Qian · R. Wang Sino-German Joint Software Institute, Beihang University, Room-G816 New Main Building, Beijing, China D. Qian e-mail: [email protected] R. Wang e-mail: [email protected] N. Shah (B ) Department of Computer Science, COMSATS Institute of Information Technology, Wah Campus, Quaid Avenue, Wah Cantt, Pakistan e-mail: [email protected] Keywords Structured overlay · MANET · OLSR 1 Introduction Peer-to-peer (P2P) network is a robust, distributed and fault tolerant network structure for sharing resources like CPU, memory and files. The existing approaches for P2P over wired network (e.g., the Internet) [15] can be roughly classified into structured, unstructured and hybrid architectures [5]. Each of them has its own applications and advantages. Mobile and wireless technology has experienced a great progress in recent years. Today’s cell phones, PDAs and other handheld devices have larger memory, higher processing capability and richer functionalities. The user can store more audio, video, text and image data with handheld devices. These devices are also equipped with low radio range technology, like Blue- tooth and Wi-Fi. By means of the low radio range tech- nology, these devices can communicate with each other without using communication infrastructure (e.g. cellu- lar infrastructure) and form a mobile ad hoc network (MANET). Each node in MANET works as both a host (for sending/receiving the data) and a router (for main- taining the routing information about other nodes). MANET is deployed in the places where infrastructure is either not available, for example disaster scenario, or too expensive. Due to high capability of the mobile devices, P2P networks can be deployed over MANET composed of mobile devices. There are various P2P applications over this kind of MANET. For example, the users equipped with the cell phones, PDAs or other handheld devices, communicating through low radio range, can form a P2P network for sharing audio/video

MANET adaptive structured P2P overlay

Embed Size (px)

Citation preview

Page 1: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160DOI 10.1007/s12083-011-0115-5

MANET adaptive structured P2P overlay

Nadir Shah · Depei Qian · Rui Wang

Received: 16 August 2011 / Accepted: 16 October 2011 / Published online: 17 November 2011© Springer Science+Business Media, LLC 2011

Abstract This paper presents an efficient structuredP2P overlay over MANET which better matches tothe physical network in term of routing. This feature isachieved by locally building up the minimum-spanningtree (MST) at each peer using the information of thepeer’s logical neighbors which are either directly con-nected (1-hop) or 2-hops away. Using this intercon-nection structure among the peers, we design a newalgorithm to distribute the contents information in theoverlay by partitioning the identifier (ID) space amongthe peers. In this algorithm, each peer maintains adisjoint portion of the ID space. The ID space at apeer may be non-contiguous and each contiguous partis consecutive to the ID space of its directly connectedneighbor peers. To route the file-lookup query, eachpeer builds up a binary search tree (BST) using theknowledge of the ID space of itself and of its directlyconnected neighbor peers. Simulation results show thatour approach outperforms the existing approaches interm of routing overhead, average file-discovery delay,false-negative ratio and average path-stretch value.

N. Shah · D. Qian · R. WangSino-German Joint Software Institute,Beihang University, Room-G816 New Main Building,Beijing, China

D. Qiane-mail: [email protected]

R. Wange-mail: [email protected]

N. Shah (B)Department of Computer Science, COMSATS Instituteof Information Technology, Wah Campus, Quaid Avenue,Wah Cantt, Pakistane-mail: [email protected]

Keywords Structured overlay · MANET · OLSR

1 Introduction

Peer-to-peer (P2P) network is a robust, distributed andfault tolerant network structure for sharing resourceslike CPU, memory and files. The existing approachesfor P2P over wired network (e.g., the Internet) [1–5]can be roughly classified into structured, unstructuredand hybrid architectures [5]. Each of them has its ownapplications and advantages.

Mobile and wireless technology has experienced agreat progress in recent years. Today’s cell phones,PDAs and other handheld devices have larger memory,higher processing capability and richer functionalities.The user can store more audio, video, text and imagedata with handheld devices. These devices are alsoequipped with low radio range technology, like Blue-tooth and Wi-Fi. By means of the low radio range tech-nology, these devices can communicate with each otherwithout using communication infrastructure (e.g. cellu-lar infrastructure) and form a mobile ad hoc network(MANET). Each node in MANET works as both a host(for sending/receiving the data) and a router (for main-taining the routing information about other nodes).MANET is deployed in the places where infrastructureis either not available, for example disaster scenario,or too expensive. Due to high capability of the mobiledevices, P2P networks can be deployed over MANETcomposed of mobile devices. There are various P2Papplications over this kind of MANET. For example,the users equipped with the cell phones, PDAs or otherhandheld devices, communicating through low radiorange, can form a P2P network for sharing audio/video

Page 2: MANET adaptive structured P2P overlay

144 Peer-to-Peer Netw. Appl. (2012) 5:143–160

clips, pictures, files and other information. Possible filesharing application scenarios can be found at airportlounges, music concerts, bus stops, railway stations,university campus and cafeteria.

We consider the scenarios of P2P system overMANET where not all the nodes are to share andaccess the files, i.e. some nodes are peers and others arenon-peers. A peer node is member of the P2P networkwhile a non-peer node is not. Recently, several schemeshave been proposed for P2P networks over MANET[6–14, 18–20]. As pointed out in [14], by constructing arandom P2P overlay, the traditional structured P2P sys-tem constructed would produce heavy redundant trafficin MANET. In a traditional structured P2P network, apeer has to maintain connection with a fixed numberof neighbor peers according to its routing algorithm. Apeer’s logical neighbors may not be close-by physically.For example, in Chord [1] of M-bit key/identifier, eachpeer maintains M entries in its finger-table to pointto its neighbor peers besides the successor peer. Fora structured P2P overlay over MANET, each peermay have different number of physically nearby peers.Also, the number of physically adjacent neighbors maychange over time due to node mobility and/or peerschurn in the network. Most of the existing approachesfor structured P2P over MANETs [7–9, 11, 13, 14] opti-mize the traditional structured P2P by exploiting partic-ular features of the underlying routing using cross-layermechanism in MANET.

We have identified the following basic requirementsfor designing an efficient structured P2P network overMANET. (1) Neighbor peers in the overlay networkshould also be adjacent in the physical network. Thismeans a peer should be connected to peers which areclose to it in the physical network. This would reducecontrol traffic and lookup latency in the network, asdiscussed in [13, 14]. (2) A peer should be the logicalneighbor of all its physically adjacent peers in the DHTstructure so that a lookup query from the peer is alwaysforwarded closer to the destination peer in both physi-cal network and logical network (overlay). The lookup

query will therefore take a short route in the physicalnetwork, speeding up the lookup process and reducingthe routing traffic. (3) The file should be retrieved fromthe source peer (the peer with the actual data item)to the requesting peer via the shortest physical routein the network. (4) The system should be adaptive tonode mobility. When the connectivity among the peerschanges in the physical network due to node mobility,the overlay network should adjust itself accordingly. (5)The system should be adaptive to peers churn. When apeer joins or leaves the P2P network, the P2P overlayshould update itself accordingly. (6) The system shouldbe distributive in nature in the following sense. First, asystem operation should be locally carried out so thatthe operation has the minimum global effect in thenetwork. Second, the system operation should requirelocal information rather than global information of thenetwork.

The importance of requirement (1) is discussed in[13, 14]. In Chord [1] and Pastry [2], a new node com-putes its identifier (ID) by applying a hash function toits IP address or the public key. Then the new nodesets up connection with neighbor peers in the overlaynetwork which are close to its ID according to theoverlay routing algorithm. In MANET, this may pre-vent a peer from setting connection with neighbor peerswhich are adjacent in the physical network, leading toill-match between the overlay and physical networks.Figure 1 shows an example. The network in Fig. 1a hasa corresponding Chord ring shown in Fig. 1b accordingto the routing algorithm. The neighbors in the overlayare not adjacent in the physical network. Let peer P1initiates a file-lookup query for key K. If the key K isat P6 then the query will be forwarded along the pathconsists of a series of links P1–N1, N1–P2, P2–P3, P3–P2, P2–P5, P5–N1, N1–P4, P4–N1, N1–P2, P2–P3 andP3–P6 in the physical network. We can see that thequery traverses certain links, e.g. N1–P2, P2–P3, N1–P4, more than once. This results in redundant trafficand larger lookup latency. We can learn from this sce-nario that redundant traffic would also be produced in

Fig. 1 a A P2P network.b Chord ring

P1

P5

P2 P3

P6P4

N1 N2 N3

N5

Peer Non-peer Communication link

(a)

P1

P5P6

P3

P4

P2

(b)

Page 3: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 145

maintaining the routing information among the peersby periodically exchanging the probe messages. Simi-larly, maintaining the index information of the sharedfiles in the network may also produce redundant traffic.To explain the importance of requirement (2), we takean example scenario in Fig. 2 for the approach in[8]. In this approach, a peer maintains its physicallyadjacent peers along with the logical neighbor peers.A lookup query from peer P is forwarded to the clos-est logical neighbor peer among these neighbor peers.But this approach does not avoid ill-matching betweenthe physical topology and the overlay topology, whichcauses redundant traffic and longer lookup latency. Forexample, if peer 2 wants to send a lookup query for adata item of key 9 residing at peer 9. According to therouting scheme in [8], peer 2 will forward the query topeer 8 which is logically closer to key 9, according to theknowledge of peer 2. Though the lookup query moveslogically closer to the destination peer 9 in the DHTstructure, but in the physical network the lookup querymoves away from the destination peer, generating onetransmission in the physical network, as shown by thebold one-head arrow. Peer 8 forwards the lookup queryto peer 9 because peer 9 is the responsible peer accord-ing to the knowledge of peer 8. This produces threetransmissions in the physical network by traversing thelinks 8–2, 2–3 and 3–9, as shown by the bold one-headarrows. So the total number of routing traffic is four forthis lookup procedure. However there exists a shorterroute from peer 2 to peer 9 via the links of 2–3 and 3–9, which will require only two transmissions. We cansee that though in the scheme in [8] a peer P maintainsconnection with its physically adjacent peers, but P isnot necessary the neighbor of all its physically adjacentpeers in the DHT structure, which leads to increasedrouting traffic and data lookup latency. So our point

32

12

9

7

5

4

11

108

6

1

5

1

10

2

8

3

961112

7

4

Physical network

Logical link

Physical lin

The path followed by the lookup query for the peer 9 in the physicalnetwork from peer 2 to peer 9

Fig. 2 To show the limitation of DHT model for ad hoc networkproposed in [8]

is that the peer needs not only to maintain connectionwith physically adjacent peers, but also to have log-ical neighbor relationship with all physically adjacentpeers. This will ensure to forward the lookup query tothe destination peer via a short route in the physicalnetwork. The importance of other requirements men-tioned above is trivial and will not be discussed further.

For rest of the paper, we present the related workin Section 2, discussing what criteria above are ignoredby the existing approaches. The detailed description ofour approach is presented in Section 3. An examplescenario is presented in Section 4. Section 5 presents thesimulation experiments and the results. Finally, Section6 concludes the paper.

2 Related work

The routing protocols for MANET can be broadlyclassified into two categories: reactive and proactive.The reactive routing protocol finds the route on de-mand, i.e., finding the route to the destination when thedata is to be sent. AODV [16] is one example of thereactive routing protocols. The reactive protocol expe-riences a larger delivery delay and is not efficient forheavy traffic. Proactive routing protocols periodicallyupdate the routing information in all nodes regardlessof whether or not the data is to be sent to those nodes.OLSR [15] is one example of the proactive protocols.The proactive routing enables the source node to for-ward the data packet immediately towards the destina-tion, eliminating the delay for route discovery.

Diego et al. [7] improves the performance of Chord[1] over MANET by proposing redundant transmis-sions of the file-lookup query to avoid frequent loss ofthe query packets due to packet collision in MANET.The initiating peer sends the lookup query to multi-ple neighbor peers according to its finger-table. Thisapproach has the following limitations. First, AODV[16] is used as the underlying routing protocol. Dueto the reactive nature of AODV, the requesting peermay not know the shortest route to the source peerwhen receiving the reply to the query. In this case, therequesting peer can retrieve the file following the routein the P2P overlay, which may involve a longer paththan the possible shortest path in the physical network.Thus, the approach does not satisfy the requirement(3). This approach will also result in a large file-retrievaldelay. Second, this approach does not attempt to con-struct an overlay which matches to the physical networkand may perform poorly in MANET as discussed in[14]. Third, redundant file-lookup query copies in theoverlay network may pass some common links in the

Page 4: MANET adaptive structured P2P overlay

146 Peer-to-Peer Netw. Appl. (2012) 5:143–160

physical network. This will lead to congestion on com-mon links and hence increase the chances of packetcollision in the physical network. Taking the scenarioin Fig. 1 as an example, the overlay links from P1 toP3 and from P1 to P2 share the links P1–N1 and N1–P2 in the physical network. Thus when P1 initiatesredundant queries to each of its neighbor peers, P2 andP3, the queries will pass the same links P1–N1 and N1–P2 in the physical network, making those common linksvulnerable to packet collision.

Kummer et al. [8] improves Chord over MANETby maintaining peer’s physically adjacent peers alongwith the logical neighbor peers. A lookup query frompeer P is forwarded to the closest logical neighborpeer among P’s physically adjacent neighbor peers. Thisapproach also has some limitations. First, maintainingthe physical adjacent neighbor peers along with thelogical neighbor peers will generate redundant routingtraffic. Second, the physically adjacent peers are notnecessary to be the logical neighbor peers. This will leadto random distribution of the DHT structure ratherthan a systematic one in the network, resulting in alarger file lookup delay.

Min et al. [9] presents an approach called M-Chordthat applies Chord to MANET. They classify thenodes into super-nodes and normal nodes. To pub-lish a shared file in M-Chord, the node registers toa super-node according to the ID of the shared file.Similarly, to access a file in M-Chord, the node com-putes the ID of the file and forwards the query tothe corresponding super-node. The super-node in M-Chord uses the procedure similar to the Chord ringto forward the request to the next super-node until ahit or fail message is returned. This approach cannotavoid ill-match between the overlay and the physicalnetworks.

Hassan et al. [11] use the distributed hashing table(DHT) and the topology-based tree-structure to storethe file index and the routing information and unifythe lookup and routing functionalities. Their approachhas some limitations. First, two peers cannot commu-nicate if they are separated by some intermediate non-peer(s), resulting in P2P network partition. This meansby default, all nodes in the physical network must bepeers in the P2P network regardless of whether or notthe node wants to be part of the P2P network. Sec-ondly, two peers cannot directly communicate if theydon’t have the parent-child relationship even they arewithin communication range in the physical network.The communication between such two peers is onlypossible by following the route in tree structure. Thiswill result in larger lookup delay and more routingtraffic. Third, routing between the requesting peer and

the source peer by following the tree structure oftenresults non-shortest path in the physical network [11].This will lead to higher path-stretch and does not meetthe requirement (3) mentioned above. Fourth, whenpeer P disconnects with one of its child peers, say Q, itwill re-gain the responsibilities of Q’s identifier space.After re-gain Q’s ID space, P will broadcast to allpeers about this fact, enforcing all peers to restore theirshared files which lie in the re-gained ID space. Thisrecovery has a global effect and generates heavy con-trol traffic in the network, thus violating the require-ment (6).

Shin et al. [13] propose an approach called RIGS(Ring Interval Graph Search) suitable for static sce-narios of MANET. Instead of assigning the peer-IDrandomly as in Chord, RIGS assigns the ID to thepeer such that the assignment generates a Ring IntervalGraph (RIG). RIGS can build an overlay which closelymatches to the physical network. But when the physicaltopology changes due to node mobility in MANET,RIGS can not maintain the matching of the overlayand the physical networks. RIGS is not a distributedapproach because it needs the topology informationof the entire network to construct the spanning treecontaining all peers in the physical network for buildingup RIG. This is very difficult due to the dynamic natureof both P2P system and MANET. RIGS would haveto re-construct RIG from scratch when a peer joins orleaves the P2P network or connectivity among the peerchanges due to node mobility. Re-constructing RIGwill generate heavy redundant traffic in the network.Thus this approach can not meet the requirements of(4) and (5). Since building the spanning tree containingall peers in the network requires the global topol-ogy information, RIGS also cannot satisfy the require-ment (6).

Shah et al. [14] introduce a root-peer in the P2Pnetwork. In their approach, each peer stores a disjointportion of ID space such that the peer closer to theroot-peer has a lower portion of the ID space. Thisapproach has two limitations. First, due to node mo-bility in MANET, peers have to frequently exchangethe information about their ID space and the index ofthe stored files when their distance to the root-peerchanges, generating heavy network traffic. Secondly,a peer P (except the root-peer) has at least one di-rectly connected neighbor peer, say P1, such that P1is closer to the root-peer than P and P stores the por-tion of the identifier space higher than P1’s identifierspace. The peer P may not be neighbor in the DHTstructure (logical space) to all of its physical adjacentpeers. Thus this approach does not meet the require-ment (2).

Page 5: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 147

3 Proposed algorithm

In our system, each peer maintains the neighbor peersup to 2-hops (logically) away. A peer P builds up aweighted, undirected, connected graph consisting of Pitself, and P’s neighbor peers of directly connected and2-hops away (logically). The distance between two logi-cally linked peers is represented as weight of the link (interm of number of hops) in the physical network. Usingthis graph, then P executes the minimum spanning tree(MST) algorithm with itself as the source and removesthe far-away redundant links. This ensures that theoverlay network well-matches to the physical network,fulfilling the requirement (1).

Our system assigns an M-bit identifier (ID) to ashared data item using the hash function. The values ofthe ID space ranges from 0 to 2M−1. Each peer P storesa disjoint portion of the ID space which may be non-contiguous. A data item with key/identifier k is storedon the peer P if k lies in P’s portion of the ID space.The ID space is distributed among the peers in such away that the ID space at peer P is consecutive to the IDspace of each P’s directly connected neighbor peer. Thelower end (LE) of a contiguous portion of the ID spaceat P points to the neighbor peer P1 which stores theID space with values lower than the value of LE. Theupper end (UE) of a contiguous portion of the ID spaceat peer P points to its neighbor peer P2 which storesthe ID space with values greater than that of UE. Acontiguous portion of ID space at peer P is a five-tuple(m, P1, P, m + n, P2). The file lookup query for key kis routed at P using the following rules:

– If k < m then P routes the file lookup query topeer P1

– If m <= k < m + n then P is responsible for key k– If k >= m + n then P routes the query to peer P2

This can be represented in the form of binary-searchtree (BST) as shown in Fig. 3. Here m and n arevalues such that 0 <= m, m + n < 2M Our distributionof the ID space ensures that the physically adjacentpeers are also close to each other in the identifierspace (DHT structure) so that the file-lookup queryis always forwarded closer to the destination peer inboth physical network and DHT structure (the logicalspace), meeting the requirement (2).

In our system each peer maintains a peer-routingtable containing its ID space portion and the informa-tion of its directly connected neighbor peers. The infor-mation maintained for a neighbor peer P includes theportion of ID space owned by P, the directly connectedneighbor peers of P and the distances of the directlyconnected neighbor peers from P. We use a proactive

Fig. 3 Traversing a BSTfor key K

m

P1m+n

P P2

k < mk >= m

k < m+n k >= m+n

routing protocol OLSR as the underlying routing pro-tocol, in which each node maintains a physically shortroute to every other node in the network. Upon re-ceiving the reply for a file-lookup query, the requestingpeer can retrieve the data item from the source peer viathe short route in the physical network, which satisfiesthe requirement (3).

Each peer periodically exchanges the probe mes-sages with each of its directly connected neighbor peers.The probe message from a peer P contains the listof P’s directly connected neighbor peers along withtheir distances from P and P’s portion of ID space inthe form of five-tuple. Receiving updated information,the peer builds up an MST consisting of its neighborpeers up to 2-hops away (logically) and changes theoverlay topology accordingly. Our approach attemptsto maintain the overlay topology closer to the physicalnetwork when the physical network topology changesdue to node mobility. Therefore the requirement (4) issatisfied. When a peer joins the network, it is placedin the overlay topology in a systematic way discussed inSection 3.1, meeting the requirement (5). In our system,a peer builds up the MST and distributes the ID spaceby using local information from 2-hops away neighborpeers, and the operation has only local effect in thesystem. This makes our system distributive in nature,satisfying the requirement (6). The detail of our systemis discussed in the following sections.

3.1 Peer-join

To join the P2P network, a peer P j broadcasts the join-request message (JRQST) in the network using theexpanding ring search (ERS) algorithm [17]. This is tofind the peers which are physically adjacent to P j inthe network. A peer node sends the join-reply message(JRPLY) to the join peer when receiving JRQST. TheJRPLY from peer P contains P’s directly connectedneighbor peers along with their distances from P. Anon-peer node simply forwards the JRQST to othernode when receiving it, provided the time-to-live (TTL)value of the JRQST message is not expired. Sendingof JRQST is stopped when the join peer P j receives a

Page 6: MANET adaptive structured P2P overlay

148 Peer-to-Peer Netw. Appl. (2012) 5:143–160

JRPLY from at least one online peer or the TTL valuereaches the maximum threshold, which is one of thefollowing cases.

– The TTL value reaches the maximum threshold andthe join peer P j does not receive any JRPLY. P j

assumes that there exists no online peer in the P2Pnetwork so it acquires the whole ID space 0–2M–1.

– The join peer receives JRPLY from at least onephysically adjacent online peer and performs thefollowing actions.

Upon receiving JRPLY, P j stores the information ofthe JRPLY message in its peer-routing table. ThenP j builds up a weighted undirected connected graphconsisting of itself, its directly connected neighbor peersand its 2-hops away neighbor peers. The weight ofthe link in the graph between two linked peers is thedistance between them (in term of number of hops)in the underlying physical network. The distance in-formation can be found by P j’s routing agent usingthe cross-layer mechanism and from its peer-routingtable. Using this graph, the join peer P j executes theminimum-spanning tree (MST) algorithm with itself asthe source vertex. The join peer P j stores a peer as itsdirectly connected neighbor peer if that peer is directlyadjacent in MST and has not been selected as thedirectly connected neighbor peer before. Pj removesa peer from the directly connected neighbor peer listif that peer is no longer adjacent in its MST. Then P j

sends a connection-request message (CRQST) to eachof its directly connected neighbor peers to establish theneighbor connection. CRQST from peer P j contains thelist of P j’s directly connected neighbor peers and theirdistances from P j. When a peer receives CRQST, itstores the information of CRQST in its peer routing ta-ble and constructs its MST in the same way mentionedabove. The following rules are followed to distributethe ID space among the peers.

– Whenever a peer P learns from its MST that it canreach one of its current directly connected neighborpeers, say P2, only through P j, P searches the five-tuple list in its ID space to find the one having P2 asan element, e.g., (P3,m, P, m + n, P2). P splits theID space portion represented by that five-tuple intohalf and assigns one half having P2 as an element toP j and sends a connection-reply message (CRPLY)to P j (the format of CRPLY will be explained late).P does the same to each of its directly connectedneighbor peers.

– Whenever peer P finds from its MST that P j isits neighbor, it searches the five-tuple list of itsID space and finds the one with the largest range.

P splits the ID space portion represented by thatfive-tuple in a way that its connectivity with theexisting neighbor peers is not damaged, and thenassigns half of the range along with the correspond-ing index information to P j. The ID space splittingprocess can be one of the following cases dependingon the values of the five-tuple to be split.

– If the five-tuple to be split at P is of the form (m,NULL, P, m + n, NULL), this range is split into(m, NULL, P, m + (n/2), P j) and (m + (n/2),P, P j, m + n, NULL). Then peer P assigns theID space five-tuple (m + (n/2), P, P j, m + n,NULL) to P j and sends CRPLY to P j.

– If the five-tuple to be split at P is of the form (m,NULL, P, m + n, P3), this range is split into (m,NULL, P j, m + (n/2), P) and (m + (n/2), P j, P,m + n, P3). Then P assigns (m, NULL, P j,m + (n/2), P) to P j by sending the correspond-ing CRPLY to P j.

– If the five-tuple to be split at P is of the form(m, P3, P, m + n, NULL), this range is split into(m, P3, P, m + (n/2), P j) and (m + (n/2), P, P j,m + n, NULL). Then peer P assigns (m +(n/2), P, P j, m + n, NULL) to P j and sends thecorresponding CRPLY to P j.

– If the five-tuple to be split at peer P is of theform (m, P3, P, m + n, P4), this range is splitinto (m, P3, P, m + (n/4), P j), (m + (n/4),P, P j, m + (3n/4), P) and (m + (3n/4), P j, P,m + n, P4). Then P assigns (m + (n/4), P, P j,m + (3n/4), P) to P j by sending P j a CRPLYmessage.

– Otherwise P removes P j from its peer-routing tableand discards the CRQST. This is because P can ac-cess P j through another current directly connectedneighbor peer in the physical network.

The CRPLY message from peer P contains P’s directlyconnected neighbor peers along with their distancesfrom P, P’s ID space in five-tuple form and the portionof ID space in five-tuple form assigned to the request-ing peer P j. Receiving CRPLY, the join peer P j storesthe information in its peer-routing table. Any changeto the peer-routing table at a peer triggers updating ofinformation to its directly connected neighbor peers.P j also executes the reduce-table-entries operation toremove the redundant entries in its peer-routing table.After joining the P2P network, P j computes the ID ofits shared files by applying the hash function. Then P j

stores the index information of the shared files in thesimilar way as in forwarding the lookup query, whichwill be discussed in Section 3.6.

Page 7: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 149

To achieve a balanced distribution of ID space, weuse a simple approach as follows. A peer P has range ofID space I and one of P’s directly connected neighborpeers, say P1, has the range of ID space J. If I/J >=1.5, then P assigns (I–J)/2 portion of its ID space to P1.Though this does not ensure 100% uniform distributionof ID space among the peers, but this is a simpleapproach to achieve a nearly uniform distribution of IDspace. Load balancing in P2P system is itself a majorissue. Therefore, we would address it in our futurework.

3.2 Reduce-table-entries

A peer keeps its ID space five-tuple in ascending orderof the first element. Whenever a peer P has two five-tuples of the form (m, P1, P, m + n, P2) and (m + n,P2, P, m + n + n1, P3), the peer P combines them intoa single five-tuple (m, P1, P, m + n + n1, P3). A peerP examines its peer-routing table for redundant entriesof its ID space five-tuple in the following steps. Peer Pfirst makes two sets, X and Y. The first set X consists ofthe directly connected neighbor peers of P. The secondset Y arranges P’s ID space five-tuples so that a five-tuple pointing to two different neighbor peers is kept

Algorithm 1 Peer-join()set TTL = 1set P = current peerLAB:Broadcast JRQST with TTL valueif receive JRPLY then

Pruning(P)Connect with physically closer peers and acquirethe ID space accordingly {/*the ID space is ac-quired such that the ID space of peer P is con-secutive to the ID space of P’s directly connectedneighbor peers*/}

elseif TT L ≤ MaxValu then

increment TTLGOTO LAB

elseAcquire the whole ID space 0–2M−1

end ifend ifset File = {F \ F is a file shared by P}for each F ∈ File do

File-discovery(P,F) {/* this is to store the indexinformation of its shared files in the network */}

end for

Algorithm 2 Pruning (peer P)set X = {Px \ Px is a logical neighbor peer of P whichis either 1-hop or 2-hop away }Set X1 = {Px1 \ Px1 is a 1-hop (logically) neighborpeer of P}Build up a connected weighted undirected graph con-sisting of P and Px ∈ X {/*Weight of the link betweentwo logically connected peers represent the distance(in term of number of hops) between the peers in thephysical network*/}Execute the MST algorithm with P as a source vertexSet Y = { Py \ Py is a directly connected neighbor ofP in the MST}Set W = Y \X1 = {Pw \ Pw ∈ Y ∧ Pw /∈ X1}Establish connection with every Pw ∈ WSet Z = X1 − Y = {Pz \ Pz ∈ X1 ∧ Pz /∈ Y}Disconnect with every Pz ∈ Z

in the order of the firs element. P links the membersof set Y with the members of set X by connecting thesecond element and the last element of a Y’s member(five-tuple) with the members in the set X such that thisconnects at least one new member in the set X. Theunlinked members in set Y are the redundant entriesso they are returned to their corresponding neighborpeers.

Algorithm 3 Reduce-table-entries()Set P = current peerSet X = {Px \ Px is a directly connected neighbor peerof P}Set Y = {the five-tuple(s) of the form (m, P1, P, m +n, P2) at peer P}Combine any two consecutive five-tuple(s) in YCompare X and Y, and shift the redundant five-tupleto their corresponding peers

3.3 Update

Each peer periodically exchanges probe messages withits directly connected neighbor peers to update andmaintain connectivity. For two logically linked peers,the peer having the lower node ID initiates the sendingof the probe message to maintain the link. Followingthis rule is to avoid redundant probe message transmis-sions. The probe message of P contains the portion ofP’s ID space in the form of five-tuple and P’s directlyconnected neighbor peers along with their distancesfrom P. When P hasn’t received any probe messagefrom a neighbor peer P1 for certain period of time,

Page 8: MANET adaptive structured P2P overlay

150 Peer-to-Peer Netw. Appl. (2012) 5:143–160

P invokes the recovery operation for P1. Due to nodemobility in MANET, the distances among peers maychange. Therefore each time a peer P receives theupdated information, it builds up the MST consisting ofitself as the source vertex, its directly connected neigh-bor peers and its 2-hops away neighbor peers. Then itcompares its list of directly connected neighbor peerswith its direct neighbors in the MST. If P has a peerP1 as its direct neighbor in the MST while P1 is not inP’s list of directly connected neighbor peers, P connectswith P1 by sending CRQST to it. If P has a peer P2 in itslist of directly connected neighbor peers while P2 is notP’s direct neighbor in the MST, P removes P2 from itspeer-routing table and then executes the reduce-table-entries operation. Each peer in the P2P network alsoperiodically refreshes its shared file index informationby sending the probe messages to the correspondingpeers. Similarly, if P does not receive the probe messageof the index information for a file stored in its ID spaceand the lifetime of the index information expires, Premoves that index information from its ID space.

Algorithm 4 UpdateSet P = current peerSet X = { Px \ Px is a directly connected neighborpeer of P}Exchange probe messages with every Px ∈ Xif Px ∈ X gets disconnected then

Recovery(Px)end ifPruning()Reduce-table-entries()set File = {F \ F is a file shared by P}for each F ∈ File do

File-discovery(P,F) {/* this is to store the indexinformation of its shared files in the network*/}

end for

3.4 Peer-leave

When a peer P wants to leave the P2P file-sharing net-work, it can inform its neighbor peers about its leavingand transfers its portion of ID space as well as theindexes of its stored files to the corresponding neighborpeers. Normally, a peer does not have to inform itsneighbor peers about its leaving.

3.5 Recovery

When a peer P detects that one of its directly connectedneighbor peers, say P1, is disconnected, it waits for a

random period of time and then invokes the recov-ery operation if it does not hear any recovery actionabout P1. Setting the random waiting time is to avoidredundant simultaneous recoveries issued by multipledirectly connected neighbor peers of the disconnectedone. Disconnection of P1 may have different causes, forexample, P1 has left the P2P network or it has beenturned off. In any case, P sends the recovery requestmessage (RRQST) to each of the directly connectedneighbor peers of the disconnected peer P1 using theunderlying routing algorithm. The RRQST messagefrom P contains the disconnected neighbor peer andthe list of current neighbor peers of P along with theirdistances from the peer P. If more than one peer ini-tiates the RRQST for the same disconnected neighborpeer, then the one having the lowest node ID succeedsand takes over the portion of ID space of the discon-nected peer. When receiving RRQST, the receivingpeer, say P2, treats RRQST in the same way as CRQST,but in addition, it removes the disconnected peer P1from its peer-routing table and sends the recovery-replymessage (RRPLY) to the requesting peer P. RRPLYfrom P2 contains the acknowledgment to RRQST. Inaddition, RRPLY from P2 also contains the same infor-mation as in CRPLY if P2 can accommodate the senderpeer of RRQST, P in this case, in its peer-routing tableto establish the neighbor connection. Upon receivingthe updated information, P executes the reduce-table-entries operation.

Algorithm 5 Recover (disconnected peer Pdis)Set P = Current peerSet X = { Px \ Px is a directly connected neighborpeer of Pdis}Connect with every Px ∈ XPruning()Reduce-table-entries()

3.6 File-discovery

To retrieve a file F, the peer P applies the hash functionto F, producing a key/identifier K in the range from 0 to2M–1. Then P builds up the file-lookup query (FRQST)for key K. FRQST contains the requesting peer andthe key K. Then P builds up the BST from its IDspace as discussed in Section 3. Traversing the BSTaccording to key K, P finds the peer, say P1, which isresponsible for key K. If P1 is in fact P itself, P examinesits peer-routing table for index information matchingK. Otherwise P forwards the file-lookup query to P1.

Page 9: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 151

This process is repeated on each peer. When the peerresponsible for key K receives the file-lookup query, itsends the file-reply message (FRPLY) to the requestingpeer. FRPLY contains either the index informationof file F or a NULL value in case there is no indexinformation of file F at that peer. To have a limit onthe lifetime, the file-lookup query is associated witha TTL value. Receiving the index information for fileF, the requesting peer retrieves the file directly fromthe source peer using the underlying routing due to theproactive nature of OLSR. For the sack of simplicity,the scheduling algorithm similar to [14] can be used toretrieve the file in blocks. Since, a peer in our systemhas the information up to its 2-hops away neighborpeers, the lookup query moves two hops towards tothe destination peer. Therefore, in our system a lookupquery for the data item of key K can be resolved inO(�n/2�) time (where n is the number of peers in theP2P system). However, this does not mean that ourapproach has a longer lookup delay than Chord, asChord with a finger-table can resolve a lookup queryin (log n)/2 on average (where n is the number of peersin the P2P system). But this is the hop-cost of resolvinga lookup query in the overlay network. If the overlaytopology does not match the underlying physical net-work, which is the case of Chord, the real traverse costin the physical network may be much higher.

Algorithm 6 File-discovery(current peer P, File F)

Set Key K = Hash-function(F) where 0 ≤ K ≥ 2M−1,where M is the number of bits determining the size ofidentifier spaceArrange the five-tuple of P and of P’s directly con-nected neighbor peers in ascending order of firstelement of the five-tupleFrom these above five-tuple(s), construct the binary-search tree, as discussed in Section 3Traverse the binary-search tree to find the corre-sponding peer P1 for Key Kif P1 is current peer then

if this query is file-lookup request thenSend the reply to the requesting peer

end ifif This query is to store or refresh the file indexinformation then

store or refresh the file index information ac-cordingly

end ifelse

Forward the query to P1end if

4 An example

Figure 4a shows part of a P2P network. Node N2 joinsthe P2P network by broadcasting a JRQST using theERS algorithm. After receiving JRPLY from P1, P2and P3, N2’s weighted undirected graph is shown inFig. 4b and its corresponding MST with N2 as thesource vertex is shown by the bold lines. Then N2 sendsCRQST to P1, P2 and P3, respectively. Receiving aCRQST, peer P1 builds up its MST and assigns thefive-tuples (256, P3, N2, 384, P1) and (448, P1, N2, 512,P2) to N2. Similarly, peer P2 assigns N2 two five-tuples(512, P1, N2, 640, P2) and (704, P2, N2, 768, P3). N2also receives from P3 two five-tuples (128, P3, N2, 256,P1) and (768, P2, N2, 896, P3). In ascending order of thefirst element, the five-tuple received by N2 from P1, P2and P3 are {(128, P3, N2, 256, P1), (256, P3, N2, 384,P1), (448, P1, N2, 512, P2), (512, P1, N2, 640, P2), (704,P2, N2, 768, P3), (768, P2, N2, 896, P3)}. By combiningthe consecutive five-tuples into a single five-tuple, thefinal set of five-tuple at N2 is {(128, P3, N2, 384, P1),(448, P1, N2, 640, P2), (704, P2, N2, 896, P3)}. Afterexchanging updated information, the topology of thenetwork is shown in Fig. 4d. Now the set of P3’s directlyconnected neighbor peers becomes X = {N2} and P3’sID space five-tuple set is Y = {(0, NULL, P3, 128, N2),(896, N2, P3, 1024, NULL)}. P3 executes the reduce-table-entries operation by establishing links betweenmembers of Y and X, which is shown in Fig. 4c. ThenP3 sends the redundant five-tuple (896, N2, P3, 1024,NULL) to N2. Thus the portion of ID space at N2 is{(128, P3, N2, 384, P1), (448, P1, N2, 640, P2), (704, P2,N2, 1024, NULL)}. Similarly N2 performs the reduce-table-entries operation and sends the entry (704, P2,N2, 1024, NULL) to P2. The resulting P2P network isshown in Fig. 4e.

Taking the part of P2P network in Fig. 4e, if P1 wantsto send a file-lookup query for key 98, the BST at P1for the five-tuples of P1 and N2 (the direct neighborpeer of P1) is shown in Fig. 5. So P1 traverses the BSTaccordingly and finds that the responsible peer for key98 is P3. P1 then forwards the file-lookup query for key98 to P3. Receiving the file-lookup query for key 98, P3identifies that key 98 is within its ID space range andsends the index information for key 98 to P1.

By the sample scenario, we show that our schemeprovides consistent partitioning of the ID space. Thisexample also shows that as long as the peers are con-nected to the P2P network, the lookup query will returnthe result of queried information. However, when apeer P leaves, the index information stored on P is notavailable till the recovery operation for P is executed.After recovery operation and update operation, the

Page 10: MANET adaptive structured P2P overlay

152 Peer-to-Peer Netw. Appl. (2012) 5:143–160

Fig. 4 To show the joiningprocess

P1

P3

P2N2

N1

N4

N3 N6

N5

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

P3 3 (0, NULL, P3, 256,P1),(768, P2, P3, 1024, NULL)

P2 3

P2 3 (512, P1, P2, 768, P3) P3 3

The portion of ID space at P1 (256, P3, P1, 512, P2)

Peer-routing table on P1

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

P3 3 (0, NULL, P3, 256,P1),(768, P2, P3, 1024, NULL)

P1 3

P1 3 (256, P3, P1, 512, P2) P3 3

The portion of ID space at P2 (512, P1, P2, 768, P3)

Peer-routing table on P2

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

P2 3 (512, P1, P2, 768, P3) P1 3

P1 3 (256, P3, P1, 512, P2) P2 3

The portion of ID space at P3 (0, NULL, P3, 256,P1), (768, P2, P3, 1024, NULL)

Peer-routing table on P3

(a)

P1

P3

P2

3

3

3

21

2

N2

(b)

(0, NULL, P3, 128, N2) (896, N2, P3, 1024, NULL)

N2X

Y

(c)

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1), (448, P1,N2, 640, P2), (704, P2, N2, 896,P3)

P2, P3 2, 2

The portion of ID space at P1 (384, N2, P1, 448, N2)

Peer-routing table on P1

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1), (448, P1,N2, 640, P2), (704, P2, N2, 896,P3)

P1, P3 2, 2

The portion of ID space at P2 (640, N2, P2, 704, N2)

Peer-routing table on P2

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1), (448, P1,N2, 640, P2), (704, P2, N2, 896, P3)

P1, P2 2, 2

The portion of ID space at P3(0, NULL, P3, 128, N2), (896, N2,

P3, 1024, NULL)

Peer-routing table on P3

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

P3 2 (0, NULL, P3, 128, N2), (896, N2, P3,1024, NULL)

__

P2 2 (640, N2, P2, 704, N2) _ _

P1 1 (384, N2, P1, 448, N2) - _

The portion of ID space at N2(128, P3, N2, 384, P1), (448, P1, N2,

640, P2), (704, P2, N2, 896, P3)

Peer-routing table on N2

P1

P3

P2

N1

N4

N3 N6

N5N2

(d)

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

P3 2(0, NULL, P3, 128, N2) _

_

P2 2 (640, N2, P2, 1024, NULL) _ _

P1 1 (384, N2, P1, 448, N2) - _

The portion of ID space at N2(128, P3, N2, 384, P1), (448, P1, N2,

640, P2)

Peer-routing table on N2

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1), (448, P1,N2, 640, P2)

P2, P3 2, 2

The portion of ID space at P1 (384, N2, P1, 448, N2)

Peer-routing table on P1

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1),(448, P1, N2, 640, P2)

P1, P3 2, 2

The portion of ID space at P2 (640, N2, P2, 1024, NULL)

Peer-routing table on P2

Peer-routing table on P3

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N2 1 (128, P3, N2, 384, P1),(448, P1, N2, 640, P2)

P1, P2 2, 2

The portion of ID space at P3 (0, NULL, P3, 128, N2),

P1

P3

P2

N1

N4

N3 N6

N5N2

(e)

Peer Non-peer Communication link

Page 11: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 153

128

P3384

N2 448

k =98

P1

640

N2P2

Fig. 5 Traversing the BST at P1 for key 98

part of index information will be available again. Thisis also common in other P2P systems. Several replica-tion mechanisms have been proposed in literatures toensure the availability of a data item in case the itemis maintained by the disconnected peer. Design of thereplication mechanism for P2P systems is beyond thescope of this paper.

5 Simulation

We use simulator ns-21 in our simulation to compareour approach with three existing approaches [7, 11, 14].We name the approach in [7] as Modified-chord, theone in [14] as E-SP2P, and the one in [11] as P2P-WANT. Our approach is named as MA-SP2P. We im-plement Modified-chord using AODV as the underly-ing routing protocol. This is because the authors in [6, 7]claim that the AODV protocol performs better for P2Psystems over MANET as compared to other protocols.The approach in [13] is excluded from comparisonbecause it is based on a static scenario of MANET.In our scenario, the nodes randomly join/leave the P2Pnetwork while maintaining the specified ratio of peersamong all nodes.

We use OLSR [15] as the underlying routing proto-col in our approach. The mobility scenarios are createdaccording to the RandomWayPoint mobility model us-ing Bonnmotion2 to ensure the physical network con-nected. Each peer shares ten unique files. File discovery

1www.isi.edu/nsnam2http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/

is randomly initiated for total 100 random files bythe peers in the network. We study the performanceof overlay maintenance and file-discovery by varyingseveral parameters including the peers ratio and themaximum moving speed of the nodes. The peers ratiois defined as the ratio of the number of peers in the P2Pnetwork to the total number of nodes in the MANETnetwork. The simulation environment is given in Ta-ble 1. The following metrics are used in our comparison

– Routing overhead: The total number of packetstransmitted at the routing layer.

– Average file-discovery delay: The average timeelapsed from the moment when a file-lookup queryis issued to the moment when the first reply isreceived.

– False-negative (FN) ratio: The ratio between thenumbers of unresolved file-lookup queries for filesthat do exist in the P2P network and the totalnumber of initiated file-lookup queries.

– Path-stretch The ratio of the path length availableat the routing agent or in P2P network for fileretrieval and the length of the shortest path in thephysical network between two peers.

5.1 Routing overhead

Figure 6 shows that for all four approaches, the routingtraffic increases with the increase of the node movingspeed. This is due to the fact that frequent changein network topology will produce more traffic for re-adjusting the overlay topology to match the physicaltopology. Figure 6 also shows that the routing trafficof all approaches increases by increasing the peersratio in the network. This is due to the following tworeasons. First, increasing the number of peers in thenetwork introduces more traffic in maintaining connec-tivity among the peers. Second, more traffic will be gen-erated to maintain the index information maintained bypeers when the number of peers increases.

Table 1 Simulation environment

Parameter Value

MAC layer IEEE 802.11Transmission range 250 mTotal number of nodes 100Bandwidth 2 MBSimulation area 1000 × 1000Simulation time 1000 sMobility model Random way pointPropagation model Two ray groundNumber of file retries 2

Page 12: MANET adaptive structured P2P overlay

154 Peer-to-Peer Netw. Appl. (2012) 5:143–160

P2P-WANT has less routing traffic at low peers ratioas compared to the other three approaches. The rea-sons is that in P2P-WANT, only the peers periodicallybroadcast the Hello message and participate in theoverlay and physical routing, while non-peers don’t.Though having less routing traffic when the numberpeers is small, P2P network partition may happen inP2P-WANT even when the physical network is fullyconnected. Network partition will result in large false-negative ratio in P2P-WANT as explained in the Sec-tion 2. While in other three approaches, two neigh-bor peers can get connected even non-peer(s) existbetween them in the physical network. Thus consid-ering both routing traffic and false-negative ratio, ourapproach (MA-SP2P) still performs better than P2P-WANT when the peers ratio is low. We can also seethat when the peers ratio becomes larger, the routing

traffic of P2P-WANT has a larger increase comparedto three other approaches.

When the node moving speed increases, the routingtraffic of P2P-WANT has a larger increase comparedto three other approaches. It is due to the following rea-son. Increasing the node moving speed changes the net-work topology more frequently, which causes frequentexecution of the recovery and peer-join operationsand generates heavier routing traffic in P2P-WANT.Figure 6 also shows that MA-SP2P has a lower trafficoverhead as compared to E-SP2P and Modified-chordwhen the peers ratio in the network is above 10%. Thereason is that MA-SP2P builds up and maintains anoverlay which better matches to the physical network,eliminating redundant long links.

E-SP2P tries to match the overlay topology to thephysical network. However, in E-SP2P, the ID space is

120

140

160

180

200maximum speed 0.4 m/s

0

20

40

60

80

100

10% 20% 30% 40% 50%

Modified-chord MA-SP2P

E-SP2P P2P-WANT

Modified-chord MA-SP2PE-SP2P P2P-WANT

Rou

ting

over

head

in K

ilo

Rou

ting

over

head

in K

iloR

outin

g ov

erhe

ad in

Kilo

Rou

ting

over

head

in K

ilo

Peers ratio

(a) (b)

(c) (d)

340maximum speed 0.8 m/s

160180200220240260280300320

020406080

100120140

10% 20% 30% 40% 50%Peers ratio

280300320340360380400420440460480500520

maximum speed 1.2 m/s

020406080

100120140160180200220240260

10% 20% 30% 40% 50%

Modified-chord MA-SP2PE-SP2P P2P-WANT

Modified-chord MA-SP2PE-SP2P P2P-WANT

Peers ratio

330360390420450480510540570600630

maximum speed 1.6 m/s

0306090

120150180210240270300

10% 20% 30% 40% 50%Peers ratio

Fig. 6 The comparison of routing overhead

Page 13: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 155

distributed and maintained among the peers based onthe distance of the peers from the root-peer. When therelative distance of the peers to the root-peer changesdue to node mobility, the peers have to re-allocate theID space by exchanging the ID space information witheach other. Modified-chord, on the other hand, doesnot attempt to make a good match between the overlayand the physical network. It sends multiple copies ofthe lookup-query via multiple paths in the overlay inorder to address the issue of packet loss. These twofeatures of Modified-chord cause largest routing trafficin the network. Figure 6 shows the routing traffic ofModified-chord compared to the other two approaches.The routing traffic of Modified-chord increases morerapidly than MA-SP2P and E-SP2P when the peersratio and the node moving speed increase. The rea-son is straightforward. MA-SP2P and E-SP2P try tomatch the overlay to the physical network, when thepeers ratio increases, the path length between twopeers decreases, and so the average traffic overheadper peer. While Modified-chord does not guaranteea good matching between the overlay and the phys-ical network, the chance of having redundant linksamong peers increases with the increase of peers in thenetwork.

One interesting thing to notice is that Modified-chord has lower routing traffic than MA-SP2P and E-SP2P when the peers ratio is below 10%. It is be-cause Modified-chord uses reactive underlying routing,AODV, while MA-SP2P and E-SP2P use proactive un-derlying routing OLSR. When the number of peers inthe overlay is very low, the flooding operation requiredby on-demand routing generates a little routing traffic.The proactive routing on the other hand needs tomaintain the routing by periodically exchanging routinginformation among the nodes. But when the peers ratioincreases, the flooding traffic in AODV will eventu-ally exceed the routing maintenance traffic in OLSR.Reducing the traffic overhead, and consequently thechance of packet collision and node energy consump-tion, will increase the network performance and extendthe network lifetime, which is the goal of our approach.

5.2 Average file-discovery delay

Figure 7 indicates that when the peers ratio and nodemoving speed increase, the average file-discovery delayof all four approaches increases. This is caused bythe heavier routing traffic and more contention gener-ated by more peers in the network and more frequentchange of network topology. Though P2P-WANT haslarger routing traffic, Fig. 7 indicates that P2P-WANThas lower average file-discovery delay due to following

reasons. First, P2P-WANT has higher false-negativeratio than other three approaches. Some accesses tothe files never happen because of the false-negativeresult in locating the file. Second, P2P network parti-tion may exist in P2P-WANT, which also prevents theaccess to some file. Figure 7 shows that Modified-chordhas a larger average file-discovery delay compared toother two approaches, MA-SP2P and E-SP2P. ThoughModified-chord uses redundant file-lookup queries toavoid packet loss, however, topological ill-match be-tween the overlay and the physical network preventsModified-chord from being efficient in the file lookupprocess. The file-lookup query may experience largerdelay in the physical network. Multiple redundant file-lookup query copies may pass a common link in thephysical network, which causes a bottleneck problem.Redundant transmission of the file-lookup query inModified-chord also causes heavier routing traffic andincreases delay caused by contention.

Figure 7 shows that E-SP2P has a larger average file-discovery delay compared to MA-SP2P. This is due tothe following two reasons. E-SP2P has higher routingtraffic as compared to MA-SP2P, which leads to morecontention and larger delay in the network. Also, thetopology of E-SP2P is a matter. In E-SP2P, a peerP is not necessarily the neighbor of all its physicallyadjacent peers in the DHT of the network. This leadsto larger file-lookup delay and increased routing traffic.While in MA-SP2P, a peer P must be the neighbor ofall its physically adjacent neighbor peers in the logicalspace. Consequently in MA-SP2P, a file-lookup queryfrom a peer is always forwarded closer to the destina-tion peer in both overlay and physical networks. Thisreduces the lookup delay.

5.3 False-negative ratio

Figure 8 indicates that the false-negative (FN) ratio ofP2P-WANT is higher when the peers ratio is either lowor high. At the low peers ratio, the high FN ratio iscaused by P2P network partition in P2P-WANT. At thehigh peers ratio, P2P-WANT produces more routingtraffic, which causes high packet loss as a result ofpacket collision in the network.

Figure 8 shows that the FN ratio of all other threeapproaches (Modified-chord, E-SP2P and MA-SP2P)increases with the increase in the peers ratio and thenode moving speed. Increasing the peers ratio causesmore routing traffic, and therefore more serious con-tention and packet loss problem in the network. Simi-larly, by increasing the node moving speed, the networktopology changes more frequently, resulting in a larger

Page 14: MANET adaptive structured P2P overlay

156 Peer-to-Peer Netw. Appl. (2012) 5:143–160

250

100

150

200

0

50

10% 20% 30% 40% 50%

Modified-chord MA-SP2P

E-SP2P P2P-WANT

(a)

300maximum speed 0.8 m/s

150

200

250

0

50

100

10% 20% 30% 40% 50%

(b)

200

250

300

350maximum speed 1.2 m/s

0

50

100

150

Ave

rage

file

-dis

cove

ry d

elay

in m

illis

econ

dA

vera

ge fi

le-d

isco

very

del

ay in

mill

isec

ond

Ave

rage

file

-dis

cove

ry d

elay

in m

illis

econ

dA

vera

ge fi

le-d

isco

very

del

ay in

mill

isec

ond

(c)

0

50

100

150

200

250

300

350

400

10% 20% 30% 40% 50%10% 20% 30% 40% 50%

maximum speed 1.6 m/s

Peers ratioPeers ratio

Peers ratioPeers ratio

(d)

maximum speed 0.4 m/s

Modified-chord MA-SP2P

E-SP2P P2P-WANT

Modified-chord MA-SP2P

E-SP2P P2P-WANT

Modified-chord MA-SP2P

E-SP2P P2P-WANT

Fig. 7 The comparison of average file-discovery latency

delay caused by contention in accessing the data itemand by large number of packet collision in the network.

Modified-chord uses redundant lookup queries toimprove reliability in the file lookup process, we mightexpect a lower FN ratio achieved by Modified-chord.However, Fig. 8 indicates that Modified-chord has ahigher FN-ratio compared to E-SP2P and MA-SP2P.This is due to the following facts. First, Modified-chordgenerates more routing traffic, leading to more packetcollisions. Second, redundant lookup queries may passa common link in the physical network for the reasondiscussed in the previous section. The common linkbecomes a bottleneck which causes larger contentiondelay and more packet collisions in the network. Third,higher node moving speed may cause frequent discon-nection of logical peers. Recovery procedure must beexecuted to recover the connections. Modified-chord

uses the reactive underlying routing protocol AODVwhich adopts broadcast mechanism in routing recovery.This causes larger delay and more serious packet colli-sion in the network, and contributes to the increasedFN-ratio of Modified-chord.

Figure 8 shows that E-SP2P has a larger FN-ratiocompared to MA-SP2P. The reason is that E-SP2P hashigher routing traffic in the network than MA-SP2P.Also, as pointed out in the previous section, E-SP2Pdoes not guarantee to forward the lookup query closerto the destination peer in both overlay and physicalnetworks. Longer routes may be taken in the physicalnetwork, which increases the chances of packet loss dueto packet collisions in E-SP2P.

The simulation results reveals that increase in thepeers ratio and the node moving speed does not in-crease the routing overhead and the false negative

Page 15: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 157

25

30

35

40

45

50maximum speed 0.4 m/s

0

5

10

15

20

25

10% 20% 30% 40% 50%

Modified-chord E-SP2P

MA-SP2P P2P-WANT

Fals

e-ne

gativ

e ra

tioFa

lse-

nega

tive

ratio

Fals

e-ne

gativ

e ra

tioFa

lse-

nega

tive

ratio

Peers ratio

Peers ratio

(a)

45maximum speed 0.8 m/s

20

25

30

35

40

0

5

10

15

10% 20% 30% 40% 50%Peers ratio

Peers ratio

(b)

50maximum speed 1.2 m/s

25

30

35

40

45

50

0

5

10

15

20

10% 20% 30% 40% 50%

(c)

0

5

10

15

20

25

30

35

40

45

50

10% 20% 30% 40% 50%

maximum speed 1.6 m/s

(d)

Modified-chord E-SP2P

MA-SP2P P2P-WANT

Modified-chord E-SP2P

MA-SP2P P2P-WANT

Modified-chord E-SP2P

MA-SP2P P2P-WANT

Fig. 8 The comparison of false-negative ratio

ratio of MA-SP2P too much. This is because that ourapproach is distributive in nature and produces lessrouting traffic.

5.4 Path-stretch

Since we use the proactive underlying routing protocolOLSR for both E-SP2P and MA-SP2P, we take onlyMA-SP2P as the representative in comparison (in termof path-stretch) with other two approaches (Modified-chord and P2P-WANT).

In MA-SP2P once a requesting peer receives thereply to the lookup query from the source peer, it canretrieve the file from the source peer directly via apre-determined shortest route in the physical network.Due to the reactive nature of AODV used in Modified-chord, the requesting peer does not have the routeto the source peer when receiving the reply, an on-demand routing must be performed to find the route.

P2P-WANT does not even use an explicit underlyingrouting protocol. In P2P-WANT, the index informationof a data item contains the route to the source peerfrom the peer where the index information is stored.So P2P-WANT has to compute the route from therequesting peer to the source peer by using the index in-formation of a data item. However the route calculatedmay not be the shortest one in the physical networkas explained in [11]. Therefore we compare the aver-age path-stretch of P2P-WANT, Modified-chord andMA-SP2P.

Figure 9 shows that P2P-WANT has the largest path-stretch among three approaches. This is because of thetree based structure of P2P-WANT. The path-stretchof P2P-WANT increases with the increase of the peersratio. By increasing the peers ratio, the topology ofP2P-WANT scales up and the path length betweenthe requesting peer and the source peer also increases.Figure 9 also shows that Modified-chord has a larger

Page 16: MANET adaptive structured P2P overlay

158 Peer-to-Peer Netw. Appl. (2012) 5:143–160

2

2.5

3

3.5

4maximum speed 0.4 m/s

0

0.5

1

1.5

2

10% 20% 30% 40% 50%

Modified-chord MA-SP2P

P2P-WANT

Modified-chord MA-SP2P

P2P-WANT

Modified-chord MA-SP2P

P2P-WANT

Path

ske

tch

Path

ske

tch

2

2.5

3

3.5

4

0

0.5

1

1.5

2

Path

ske

tch

Peers ratio 10% 20% 30% 40% 50%

Modified-chord MA-SP2P

P2P-WANT

Peers ratio

(a)

maximum speed0.8 m/s

(b)

2.5

3

3.5

4

4.5maximum speed 1.2 m/s

0

0.5

1

1.5

2Pa

th s

ketc

h

2.5

3

3.5

4

4.5

0

0.5

1

1.5

2

10% 20% 30% 40% 50%Peers ratio

(c)

maximum speed 1.6 m/s

10% 20% 30% 40% 50%Peers ratio

(d)

Fig. 9 The comparison of Path-stretch values

average path-stretch compared to MA-SP2P. This isbecause of the reactive underlying routing protocolused by Modified-chord. By increasing the peers ratioin the network, the chance of having an indirect pathbetween the requesting peer and the source peer alsoincreases. That means, the requesting peer will have abetter chance to find a non-shortest route to the sourcepeer. Increasing the node moving speed in the networkhas the similar effect. In this case, the physical networkchanges more frequently and so the links availability,which makes the shortest route more difficult to find.Therefore the path-stretch of Modified-chord goes upwith the increase of the peers ratio and the node movingspeed. However, we can learn from Fig. 9 that theaverage path-stretch of MA-SP2P is not affected by thepeers ratio and the node moving speed. But the valuedoes not always equal to one. That means sometimesthe path between the requesting peer and the sourcepeer is not the shortest one in the physical network.

In our view, this is due to the MPR (multi-point relay)selection in the OLSR routing.

6 Conclusion and future work

This paper presents a MANET-adaptive structuredP2P overlay called MA-SP2P. Our approach constructsan efficient structured P2P overlay over MANET witha topology matching to the physical network. Usingthis structure of interconnection among the peers, wedesign a new overlay routing algorithm to distributethe ID space among the peers. To route the file-lookupquery, each peer builds up a binary search tree (BST)based on the knowledge of the ID space of itselfand of its directly connected neighbor peers. Simula-tion experiments have been conducted using scenarioswith relatively high peers ratio and low node movingspeed. The simulation results show that our approach

Page 17: MANET adaptive structured P2P overlay

Peer-to-Peer Netw. Appl. (2012) 5:143–160 159

outperforms the existing approaches in [7, 11, 14] interm of routing overhead, average file-discovery delay,false-negative ratio, and average path-stretch. The sce-narios with sparse peers and high node moving speedwould be considered in our further experiments tosee the applicability of our approach. An analyticalcomparison of our approach with other approaches willbe conducted in our future work. We would also liketo address other issues of P2P networks such as load-balancing, P2P network partition, user anonymity, andfree-riding in our future research.

References

1. Stoica I, Morris R, Karger D, Kaashoek MF, Balakrishnan H(2001) Chord: a scalable peer-to-peer lookup service for in-ternet applications. In: Proceedings of the ACM SIGCOMM01 conference, San Diego, California, USA

2. Rowstron A, Druschel P (2001) Pastry: scalable, decentral-ized object location and routing for large-scale peer-to-peersystems. In: IFIP/ACM international conference on distrib-uted systems platforms (Middleware), Germany

3. Pourebrahimi B, Bertels KLM, Vassiliadis S (2005) A surveyof peer-to-peer networks. In: Proceedings of the 16th annualworkshop proRisc

4. Ripeanu M, Foster I, Iamnitchi A (2002) Mapping theGnutella network: properties of large-scale peer-to-peer sys-tems and implications for system design. IEEE Int Comput J6(1):85–93 (special issue on peer-to-peer networking)

5. Meshkova E, Riihijrvi J, Petrova M, Mhnen P (2008) A sur-vey on resource discovery mechanisms, peer-to-peer and ser-vice discovery frameworks. Comput Networks 52(11):2097–2128. ISSN:1389-1286

6. Oliveira LB, Siqueira IG, Loureiro AF (2005) On the per-formance of ad hoc routing protocols under a peer-to-peerapplication. J Parallel Distrib Comput 65(11):1337–1347

7. da Hora DN, Macedo DF, Oliveira LB, Siqueira IG, LoureiroAAF, Nogueira JM, Pujolle G (2009) Enhancing peer-to-peercontent discovery techniques over mobile ad hoc networks.Comput Commun 32(13–14):1445–1459

8. Kummer R, Kropf P, Felber P (2006) Distributed lookup instructured peer-to-peer ad-hoc networks. In: Proceeding ofthe OTM conferences, vol 2, pp 1541–1554

9. Li M, Chen E, Sheu PC-y (2006) A chord-based novel mobilepeer-to-peer file sharing protocol. In: Proceeding of 8th asia-pacific web conference, Harbin, China, 16–18 January 2006

10. Hwang RH, Hoh CC (2009) Cross-layer design of P2P filesharing over mobile ad hoc networks. Telecommun Syst42:47–61. doi:10.1007/s11235-009-9168-7

11. Sozer H, Tekkalmaz M, Korpeoglu I (2009) A peer-to-peerfile search and download protocol for wireless ad hoc net-works. Comput Commun 32(1):41–50, Elsevier

12. Lee U, Park JS, Lee SH, Ro WW, Pau G, Gerla M (2008)Efficient peer-to-peer file sharing using network coding inMANET. J Commun Netw 10(4):422–429

13. Shin M, Arbaugh WA (2009) Efficient peer-to-peer lookupin multi-hop wireless networks. In: KSII transactions on in-ternet and information systems, vol 3, pp 5–25

14. Shah N, Qian D (2010) An efficient structured P2P overlayover MANET. In: MobiDE, ninth international ACM work-shop on data engineering for wireless and mobile access (inconjunction with SIGMOD/PODS 2010), Indianapolis, Indi-ana, USA

15. Clausen T, Jacquet P (2003) Optimized link-state routingprotocol. In: IETF RFC-3626

16. Perkins C, Belding-Royer E, Das S (2003) Ad hoc on-demanddistance vector (AODV) routing. In: RFC 3561

17. Deng J, Zuyev S (2008) On search sets of expanding ringsearch in wireless networks. Ad Hoc Networks 6(7):1168–1181

18. Macedo DF, dos Santos AL, Nogueira JM, Pujolle G (2011)Fuzzy-based load self-configuration in mobile P2P services.Comput Networks 55(8):1834–1848

19. Liang J-C, Chen J-C, Zhang T (2011) An adaptive low-overhead resource discovery protocol for mobile ad-hoc net-works. Wirel Netw 17(2):437–452

20. Lee S-B, Wong SHY, Lee K-W, Lu S (2011) Content man-agement in a mobile ad hoc network: beyond opportunisticstrategy. In: Infocom, Shanghai, China

Nadir Shah is a PhD student at Sino-German Joint SoftwareInstitute, Beihang University, Beijing, China. He earned M.S. inComputer Science from International Islamic University, Islam-abad, Pakistan in 2007. He earned B.Sc and M.Sc in ComputerScience from Peshawar University, Peshawar, Pakistan in 2002and 2005 respectively. He was a Lecturer at Department ofComputer Science, COMSATS Institute of Information Technol-ogy, Abbottabad, Pakistan between August 2007 and June 2008.His current research interests include mobile ad hoc networks,peer-to-peer network, and delay/disruption tolerant networks.He has published about 13 papers in international conferencesand journals.

Page 18: MANET adaptive structured P2P overlay

160 Peer-to-Peer Netw. Appl. (2012) 5:143–160

Depei Qian professor at Beihang University, director of Sino-German Joint Software Institute. His current research interestsinclude high performance computer architecture and implemen-tation technology, distributed systems, and network performancemeasurement. He has published more than 100 papers.

Rui Wang received the B.S. and M.S. degrees from Xi’anJiaotong University, Xi’an, China, in 2000 and 2003, respectively,and the Ph.D. degree from Beihang University, Beijing, China,in 2009, all in electrical engineering. His research interests are inthe area of P2P networks and multimedia social network. He iscurrently an assistant professor at Beihang University.