0% found this document useful (0 votes)
12 views

MANET Adaptive Structured P2P Overlay: Nadir Shah Depei Qian Rui Wang

another p2p paper

Uploaded by

nadir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

MANET Adaptive Structured P2P Overlay: Nadir Shah Depei Qian Rui Wang

another p2p paper

Uploaded by

nadir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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 Keywords Structured overlay · MANET · OLSR
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 1 Introduction
tree (MST) at each peer using the information of the
peer’s logical neighbors which are either directly con- Peer-to-peer (P2P) network is a robust, distributed and
nected (1-hop) or 2-hops away. Using this intercon- fault tolerant network structure for sharing resources
nection structure among the peers, we design a new like CPU, memory and files. The existing approaches
algorithm to distribute the contents information in the for P2P over wired network (e.g., the Internet) [1–5]
overlay by partitioning the identifier (ID) space among can be roughly classified into structured, unstructured
the peers. In this algorithm, each peer maintains a and hybrid architectures [5]. Each of them has its own
disjoint portion of the ID space. The ID space at a applications and advantages.
peer may be non-contiguous and each contiguous part Mobile and wireless technology has experienced a
is consecutive to the ID space of its directly connected great progress in recent years. Today’s cell phones,
neighbor peers. To route the file-lookup query, each PDAs and other handheld devices have larger memory,
peer builds up a binary search tree (BST) using the higher processing capability and richer functionalities.
knowledge of the ID space of itself and of its directly The user can store more audio, video, text and image
connected neighbor peers. Simulation results show that data with handheld devices. These devices are also
our approach outperforms the existing approaches in equipped with low radio range technology, like Blue-
term of routing overhead, average file-discovery delay, tooth and Wi-Fi. By means of the low radio range tech-
false-negative ratio and average path-stretch value. nology, these devices can communicate with each other
without using communication infrastructure (e.g. cellu-
lar infrastructure) and form a mobile ad hoc network
N. Shah · D. Qian · R. Wang (MANET). Each node in MANET works as both a host
Sino-German Joint Software Institute,
(for sending/receiving the data) and a router (for main-
Beihang University, Room-G816 New Main Building,
Beijing, China taining the routing information about other nodes).
MANET is deployed in the places where infrastructure
D. Qian
e-mail: [email protected] is either not available, for example disaster scenario,
or too expensive. Due to high capability of the mobile
R. Wang
e-mail: [email protected] devices, P2P networks can be deployed over MANET
composed of mobile devices. There are various P2P
N. Shah (B) applications over this kind of MANET. For example,
Department of Computer Science, COMSATS Institute
of Information Technology, Wah Campus, Quaid Avenue,
the users equipped with the cell phones, PDAs or other
Wah Cantt, Pakistan handheld devices, communicating through low radio
e-mail: [email protected] range, can form a P2P network for sharing audio/video
144 Peer-to-Peer Netw. Appl. (2012) 5:143–160

clips, pictures, files and other information. Possible file query will therefore take a short route in the physical
sharing application scenarios can be found at airport network, speeding up the lookup process and reducing
lounges, music concerts, bus stops, railway stations, the routing traffic. (3) The file should be retrieved from
university campus and cafeteria. the source peer (the peer with the actual data item)
We consider the scenarios of P2P system over to the requesting peer via the shortest physical route
MANET where not all the nodes are to share and in the network. (4) The system should be adaptive to
access the files, i.e. some nodes are peers and others are node mobility. When the connectivity among the peers
non-peers. A peer node is member of the P2P network changes in the physical network due to node mobility,
while a non-peer node is not. Recently, several schemes the overlay network should adjust itself accordingly. (5)
have been proposed for P2P networks over MANET The system should be adaptive to peers churn. When a
[6–14, 18–20]. As pointed out in [14], by constructing a peer joins or leaves the P2P network, the P2P overlay
random P2P overlay, the traditional structured P2P sys- should update itself accordingly. (6) The system should
tem constructed would produce heavy redundant traffic be distributive in nature in the following sense. First, a
in MANET. In a traditional structured P2P network, a system operation should be locally carried out so that
peer has to maintain connection with a fixed number the operation has the minimum global effect in the
of neighbor peers according to its routing algorithm. A network. Second, the system operation should require
peer’s logical neighbors may not be close-by physically. local information rather than global information of the
For example, in Chord [1] of M-bit key/identifier, each network.
peer maintains M entries in its finger-table to point The importance of requirement (1) is discussed in
to its neighbor peers besides the successor peer. For [13, 14]. In Chord [1] and Pastry [2], a new node com-
a structured P2P overlay over MANET, each peer putes its identifier (ID) by applying a hash function to
may have different number of physically nearby peers. its IP address or the public key. Then the new node
Also, the number of physically adjacent neighbors may sets up connection with neighbor peers in the overlay
change over time due to node mobility and/or peers network which are close to its ID according to the
churn in the network. Most of the existing approaches overlay routing algorithm. In MANET, this may pre-
for structured P2P over MANETs [7–9, 11, 13, 14] opti- vent a peer from setting connection with neighbor peers
mize the traditional structured P2P by exploiting partic- which are adjacent in the physical network, leading to
ular features of the underlying routing using cross-layer ill-match between the overlay and physical networks.
mechanism in MANET. Figure 1 shows an example. The network in Fig. 1a has
We have identified the following basic requirements a corresponding Chord ring shown in Fig. 1b according
for designing an efficient structured P2P network over to the routing algorithm. The neighbors in the overlay
MANET. (1) Neighbor peers in the overlay network are not adjacent in the physical network. Let peer P1
should also be adjacent in the physical network. This initiates a file-lookup query for key K. If the key K is
means a peer should be connected to peers which are at P6 then the query will be forwarded along the path
close to it in the physical network. This would reduce consists of a series of links P1–N1, N1–P2, P2–P3, P3–
control traffic and lookup latency in the network, as P2, P2–P5, P5–N1, N1–P4, P4–N1, N1–P2, P2–P3 and
discussed in [13, 14]. (2) A peer should be the logical P3–P6 in the physical network. We can see that the
neighbor of all its physically adjacent peers in the DHT query traverses certain links, e.g. N1–P2, P2–P3, N1–
structure so that a lookup query from the peer is always P4, more than once. This results in redundant traffic
forwarded closer to the destination peer in both physi- and larger lookup latency. We can learn from this sce-
cal network and logical network (overlay). The lookup nario that redundant traffic would also be produced in

Fig. 1 a A P2P network.


P5
b Chord ring
P3

P1 N1 P1 P2
P2 P3 N2 N3

P4 N5 P6
P6 P5

Peer Non-peer Communication link P4

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

maintaining the routing information among the peers is that the peer needs not only to maintain connection
by periodically exchanging the probe messages. Simi- with physically adjacent peers, but also to have log-
larly, maintaining the index information of the shared ical neighbor relationship with all physically adjacent
files in the network may also produce redundant traffic. peers. This will ensure to forward the lookup query to
To explain the importance of requirement (2), we take the destination peer via a short route in the physical
an example scenario in Fig. 2 for the approach in network. The importance of other requirements men-
[8]. In this approach, a peer maintains its physically tioned above is trivial and will not be discussed further.
adjacent peers along with the logical neighbor peers. For rest of the paper, we present the related work
A lookup query from peer P is forwarded to the clos- in Section 2, discussing what criteria above are ignored
est logical neighbor peer among these neighbor peers. by the existing approaches. The detailed description of
But this approach does not avoid ill-matching between our approach is presented in Section 3. An example
the physical topology and the overlay topology, which scenario is presented in Section 4. Section 5 presents the
causes redundant traffic and longer lookup latency. For simulation experiments and the results. Finally, Section
example, if peer 2 wants to send a lookup query for a 6 concludes the paper.
data item of key 9 residing at peer 9. According to the
routing scheme in [8], peer 2 will forward the query to
peer 8 which is logically closer to key 9, according to the 2 Related work
knowledge of peer 2. Though the lookup query moves
logically closer to the destination peer 9 in the DHT The routing protocols for MANET can be broadly
structure, but in the physical network the lookup query classified into two categories: reactive and proactive.
moves away from the destination peer, generating one The reactive routing protocol finds the route on de-
transmission in the physical network, as shown by the mand, i.e., finding the route to the destination when the
bold one-head arrow. Peer 8 forwards the lookup query data is to be sent. AODV [16] is one example of the
to peer 9 because peer 9 is the responsible peer accord- reactive routing protocols. The reactive protocol expe-
ing to the knowledge of peer 8. This produces three riences a larger delivery delay and is not efficient for
transmissions in the physical network by traversing the heavy traffic. Proactive routing protocols periodically
links 8–2, 2–3 and 3–9, as shown by the bold one-head update the routing information in all nodes regardless
arrows. So the total number of routing traffic is four for of whether or not the data is to be sent to those nodes.
this lookup procedure. However there exists a shorter OLSR [15] is one example of the proactive protocols.
route from peer 2 to peer 9 via the links of 2–3 and 3– The proactive routing enables the source node to for-
9, which will require only two transmissions. We can ward the data packet immediately towards the destina-
see that though in the scheme in [8] a peer P maintains tion, eliminating the delay for route discovery.
connection with its physically adjacent peers, but P is Diego et al. [7] improves the performance of Chord
not necessary the neighbor of all its physically adjacent [1] over MANET by proposing redundant transmis-
peers in the DHT structure, which leads to increased sions of the file-lookup query to avoid frequent loss of
routing traffic and data lookup latency. So our point the 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. This
approach has the following limitations. First, AODV
[16] is used as the underlying routing protocol. Due
2 3
to the reactive nature of AODV, the requesting peer
1 12 11 6 9
4 may not know the shortest route to the source peer
7 5 3
when receiving the reply to the query. In this case, the
5 4 1 2
12 requesting peer can retrieve the file following the route
10 8 in the P2P overlay, which may involve a longer path
6
11 Physical network than the possible shortest path in the physical network.
Logical link Thus, the approach does not satisfy the requirement
10 9 Physical lin (3). This approach will also result in a large file-retrieval
7 8
delay. Second, this approach does not attempt to con-
The path followed by the lookup query for the peer 9 in the physical struct an overlay which matches to the physical network
network from peer 2 to peer 9
and may perform poorly in MANET as discussed in
Fig. 2 To show the limitation of DHT model for ad hoc network [14]. Third, redundant file-lookup query copies in the
proposed in [8] overlay network may pass some common links in the
146 Peer-to-Peer Netw. Appl. (2012) 5:143–160

physical network. This will lead to congestion on com- the source peer by following the tree structure often
mon links and hence increase the chances of packet results non-shortest path in the physical network [11].
collision in the physical network. Taking the scenario This will lead to higher path-stretch and does not meet
in Fig. 1 as an example, the overlay links from P1 to the requirement (3) mentioned above. Fourth, when
P3 and from P1 to P2 share the links P1–N1 and N1– peer P disconnects with one of its child peers, say Q, it
P2 in the physical network. Thus when P1 initiates will re-gain the responsibilities of Q’s identifier space.
redundant queries to each of its neighbor peers, P2 and After re-gain Q’s ID space, P will broadcast to all
P3, the queries will pass the same links P1–N1 and N1– peers about this fact, enforcing all peers to restore their
P2 in the physical network, making those common links shared files which lie in the re-gained ID space. This
vulnerable to packet collision. recovery has a global effect and generates heavy con-
Kummer et al. [8] improves Chord over MANET trol traffic in the network, thus violating the require-
by maintaining peer’s physically adjacent peers along ment (6).
with the logical neighbor peers. A lookup query from Shin et al. [13] propose an approach called RIGS
peer P is forwarded to the closest logical neighbor (Ring Interval Graph Search) suitable for static sce-
peer among P’s physically adjacent neighbor peers. This narios of MANET. Instead of assigning the peer-ID
approach also has some limitations. First, maintaining randomly as in Chord, RIGS assigns the ID to the
the physical adjacent neighbor peers along with the peer such that the assignment generates a Ring Interval
logical neighbor peers will generate redundant routing Graph (RIG). RIGS can build an overlay which closely
traffic. Second, the physically adjacent peers are not matches to the physical network. But when the physical
necessary to be the logical neighbor peers. This will lead topology changes due to node mobility in MANET,
to random distribution of the DHT structure rather RIGS can not maintain the matching of the overlay
than a systematic one in the network, resulting in a and the physical networks. RIGS is not a distributed
larger file lookup delay. approach because it needs the topology information
Min et al. [9] presents an approach called M-Chord of the entire network to construct the spanning tree
that applies Chord to MANET. They classify the containing all peers in the physical network for building
nodes into super-nodes and normal nodes. To pub- up RIG. This is very difficult due to the dynamic nature
lish a shared file in M-Chord, the node registers to of both P2P system and MANET. RIGS would have
a super-node according to the ID of the shared file. to re-construct RIG from scratch when a peer joins or
Similarly, to access a file in M-Chord, the node com- leaves the P2P network or connectivity among the peer
putes the ID of the file and forwards the query to changes due to node mobility. Re-constructing RIG
the corresponding super-node. The super-node in M- will generate heavy redundant traffic in the network.
Chord uses the procedure similar to the Chord ring Thus this approach can not meet the requirements of
to forward the request to the next super-node until a (4) and (5). Since building the spanning tree containing
hit or fail message is returned. This approach cannot all peers in the network requires the global topol-
avoid ill-match between the overlay and the physical ogy information, RIGS also cannot satisfy the require-
networks. ment (6).
Hassan et al. [11] use the distributed hashing table Shah et al. [14] introduce a root-peer in the P2P
(DHT) and the topology-based tree-structure to store network. In their approach, each peer stores a disjoint
the file index and the routing information and unify portion of ID space such that the peer closer to the
the lookup and routing functionalities. Their approach root-peer has a lower portion of the ID space. This
has some limitations. First, two peers cannot commu- approach has two limitations. First, due to node mo-
nicate if they are separated by some intermediate non- bility in MANET, peers have to frequently exchange
peer(s), resulting in P2P network partition. This means the information about their ID space and the index of
by default, all nodes in the physical network must be the stored files when their distance to the root-peer
peers in the P2P network regardless of whether or not changes, generating heavy network traffic. Secondly,
the node wants to be part of the P2P network. Sec- a peer P (except the root-peer) has at least one di-
ondly, two peers cannot directly communicate if they rectly connected neighbor peer, say P1, such that P1
don’t have the parent-child relationship even they are is closer to the root-peer than P and P stores the por-
within communication range in the physical network. tion of the identifier space higher than P1’s identifier
The communication between such two peers is only space. The peer P may not be neighbor in the DHT
possible by following the route in tree structure. This structure (logical space) to all of its physical adjacent
will result in larger lookup delay and more routing peers. Thus this approach does not meet the require-
traffic. Third, routing between the requesting peer and ment (2).
Peer-to-Peer Netw. Appl. (2012) 5:143–160 147

Fig. 3 Traversing a BST


3 Proposed algorithm for key K k<m
m
k >= m

In our system, each peer maintains the neighbor peers


P1
up to 2-hops (logically) away. A peer P builds up a m+n

weighted, undirected, connected graph consisting of P


k < m+n k >= m+n
itself, and P’s neighbor peers of directly connected and
2-hops away (logically). The distance between two logi- P P2
cally linked peers is represented as weight of the link (in
term of number of hops) in the physical network. Using
this graph, then P executes the minimum spanning tree
(MST) algorithm with itself as the source and removes routing protocol OLSR as the underlying routing pro-
the far-away redundant links. This ensures that the tocol, in which each node maintains a physically short
overlay network well-matches to the physical network, route to every other node in the network. Upon re-
fulfilling the requirement (1). ceiving the reply for a file-lookup query, the requesting
Our system assigns an M-bit identifier (ID) to a peer can retrieve the data item from the source peer via
shared data item using the hash function. The values of the short route in the physical network, which satisfies
the ID space ranges from 0 to 2M −1. Each peer P stores the requirement (3).
a disjoint portion of the ID space which may be non- Each peer periodically exchanges the probe mes-
contiguous. A data item with key/identifier k is stored sages with each of its directly connected neighbor peers.
on the peer P if k lies in P’s portion of the ID space. The probe message from a peer P contains the list
The ID space is distributed among the peers in such a of P’s directly connected neighbor peers along with
way that the ID space at peer P is consecutive to the ID their distances from P and P’s portion of ID space in
space of each P’s directly connected neighbor peer. The the form of five-tuple. Receiving updated information,
lower end (LE) of a contiguous portion of the ID space the peer builds up an MST consisting of its neighbor
at P points to the neighbor peer P1 which stores the peers up to 2-hops away (logically) and changes the
ID space with values lower than the value of LE. The overlay topology accordingly. Our approach attempts
upper end (UE) of a contiguous portion of the ID space to maintain the overlay topology closer to the physical
at peer P points to its neighbor peer P2 which stores network when the physical network topology changes
the ID space with values greater than that of UE. A due to node mobility. Therefore the requirement (4) is
contiguous portion of ID space at peer P is a five-tuple satisfied. When a peer joins the network, it is placed
(m, P1, P, m + n, P2). The file lookup query for key k in the overlay topology in a systematic way discussed in
is routed at P using the following rules: Section 3.1, meeting the requirement (5). In our system,
a peer builds up the MST and distributes the ID space
– If k < m then P routes the file lookup query to
by using local information from 2-hops away neighbor
peer P1
peers, and the operation has only local effect in the
– If m <= k < m + n then P is responsible for key k
system. This makes our system distributive in nature,
– If k >= m + n then P routes the query to peer P2
satisfying the requirement (6). The detail of our system
This can be represented in the form of binary-search is discussed in the following sections.
tree (BST) as shown in Fig. 3. Here m and n are
values such that 0 <= m, m + n < 2 M Our distribution 3.1 Peer-join
of the ID space ensures that the physically adjacent
peers are also close to each other in the identifier To join the P2P network, a peer P j broadcasts the join-
space (DHT structure) so that the file-lookup query request message (JRQST) in the network using the
is always forwarded closer to the destination peer in expanding ring search (ERS) algorithm [17]. This is to
both physical network and DHT structure (the logical find the peers which are physically adjacent to P j in
space), meeting the requirement (2). the network. A peer node sends the join-reply message
In our system each peer maintains a peer-routing (JRPLY) to the join peer when receiving JRQST. The
table containing its ID space portion and the informa- JRPLY from peer P contains P’s directly connected
tion of its directly connected neighbor peers. The infor- neighbor peers along with their distances from P. A
mation maintained for a neighbor peer P includes the non-peer node simply forwards the JRQST to other
portion of ID space owned by P, the directly connected node when receiving it, provided the time-to-live (TTL)
neighbor peers of P and the distances of the directly value of the JRQST message is not expired. Sending
connected neighbor peers from P. We use a proactive of JRQST is stopped when the join peer P j receives a
148 Peer-to-Peer Netw. Appl. (2012) 5:143–160

JRPLY from at least one online peer or the TTL value P splits the ID space portion represented by that
reaches the maximum threshold, which is one of the five-tuple in a way that its connectivity with the
following cases. existing neighbor peers is not damaged, and then
assigns half of the range along with the correspond-
– The TTL value reaches the maximum threshold and ing index information to P j. The ID space splitting
the join peer P j does not receive any JRPLY. P j process can be one of the following cases depending
assumes that there exists no online peer in the P2P on the values of the five-tuple to be split.
network so it acquires the whole ID space 0–2M –1.
– The join peer receives JRPLY from at least one – If the five-tuple to be split at P is of the form (m,
physically adjacent online peer and performs the NULL, P, m + n, NULL), this range is split into
following actions. (m, NULL, P, m + (n/2), P j) and (m + (n/2),
P, P j, m + n, NULL). Then peer P assigns the
Upon receiving JRPLY, P j stores the information of ID space five-tuple (m + (n/2), P, P j, m + n,
the JRPLY message in its peer-routing table. Then NULL) to P j and sends CRPLY to P j.
P j builds up a weighted undirected connected graph – If the five-tuple to be split at P is of the form (m,
consisting of itself, its directly connected neighbor peers NULL, P, m + n, P3), this range is split into (m,
and its 2-hops away neighbor peers. The weight of NULL, P j, m + (n/2), P) and (m + (n/2), P j, P,
the link in the graph between two linked peers is the m + n, P3). Then P assigns (m, NULL, P j,
distance between them (in term of number of hops) m + (n/2), P) to P j by sending the correspond-
in the underlying physical network. The distance in- ing CRPLY to P j.
formation can be found by P j’s routing agent using – If the five-tuple to be split at P is of the form
the cross-layer mechanism and from its peer-routing (m, P3, P, m + n, NULL), this range is split into
table. Using this graph, the join peer P j executes the (m, P3, P, m + (n/2), P j) and (m + (n/2), P, P j,
minimum-spanning tree (MST) algorithm with itself as m + n, NULL). Then peer P assigns (m +
the source vertex. The join peer P j stores a peer as its (n/2), P, P j, m + n, NULL) to P j and sends the
directly connected neighbor peer if that peer is directly corresponding CRPLY to P j.
adjacent in MST and has not been selected as the – If the five-tuple to be split at peer P is of the
directly connected neighbor peer before. Pj removes form (m, P3, P, m + n, P4), this range is split
a peer from the directly connected neighbor peer list into (m, P3, P, m + (n/4), P j), (m + (n/4),
if that peer is no longer adjacent in its MST. Then P j P, P j, m + (3n/4), P) and (m + (3n/4), P j, P,
sends a connection-request message (CRQST) to each m + n, P4). Then P assigns (m + (n/4), P, P j,
of its directly connected neighbor peers to establish the m + (3n/4), P) to P j by sending P j a CRPLY
neighbor connection. CRQST from peer P j contains the message.
list of P j’s directly connected neighbor peers and their
distances from P j. When a peer receives CRQST, it – Otherwise P removes P j from its peer-routing table
stores the information of CRQST in its peer routing ta- and discards the CRQST. This is because P can ac-
ble and constructs its MST in the same way mentioned cess P j through another current directly connected
above. The following rules are followed to distribute neighbor peer in the physical network.
the ID space among the peers.
The CRPLY message from peer P contains P’s directly
– Whenever a peer P learns from its MST that it can connected neighbor peers along with their distances
reach one of its current directly connected neighbor from P, P’s ID space in five-tuple form and the portion
peers, say P2, only through P j, P searches the five- of ID space in five-tuple form assigned to the request-
tuple list in its ID space to find the one having P2 as ing peer P j. Receiving CRPLY, the join peer P j stores
an element, e.g., (P3,m, P, m + n, P2). P splits the the information in its peer-routing table. Any change
ID space portion represented by that five-tuple into to the peer-routing table at a peer triggers updating of
half and assigns one half having P2 as an element to information to its directly connected neighbor peers.
P j and sends a connection-reply message (CRPLY) P j also executes the reduce-table-entries operation to
to P j (the format of CRPLY will be explained late). remove the redundant entries in its peer-routing table.
P does the same to each of its directly connected After joining the P2P network, P j computes the ID of
neighbor peers. its shared files by applying the hash function. Then P j
– Whenever peer P finds from its MST that P j is stores the index information of the shared files in the
its neighbor, it searches the five-tuple list of its similar way as in forwarding the lookup query, which
ID space and finds the one with the largest range. will be discussed in Section 3.6.
Peer-to-Peer Netw. Appl. (2012) 5:143–160 149

To achieve a balanced distribution of ID space, we Algorithm 2 Pruning (peer P)


use a simple approach as follows. A peer P has range of set X = {Px \ Px is a logical neighbor peer of P which
ID space I and one of P’s directly connected neighbor is either 1-hop or 2-hop away }
peers, say P1, has the range of ID space J. If I/J >= Set X1 = {Px1 \ Px1 is a 1-hop (logically) neighbor
1.5, then P assigns (I–J)/2 portion of its ID space to P1. peer of P}
Though this does not ensure 100% uniform distribution Build up a connected weighted undirected graph con-
of ID space among the peers, but this is a simple sisting of P and Px ∈ X {/*Weight of the link between
approach to achieve a nearly uniform distribution of ID two logically connected peers represent the distance
space. Load balancing in P2P system is itself a major (in term of number of hops) between the peers in the
issue. Therefore, we would address it in our future physical network*/}
work. Execute the MST algorithm with P as a source vertex
Set Y = { P y \ P y is a directly connected neighbor of
3.2 Reduce-table-entries P in the MST}
Set W = Y \X1 = {Pw \ Pw ∈ Y ∧ Pw ∈ / X1}
A peer keeps its ID space five-tuple in ascending order Establish connection with every Pw ∈ W
of the first element. Whenever a peer P has two five- Set Z = X1 − Y = {Pz \ Pz ∈ X1 ∧ Pz ∈ / Y}
tuples of the form (m, P1, P, m + n, P2) and (m + n, Disconnect with every Pz ∈ Z
P2, P, m + n + n1, P3), the peer P combines them into
a single five-tuple (m, P1, P, m + n + n1, P3). A peer
P examines its peer-routing table for redundant entries
in the order of the firs element. P links the members
of its ID space five-tuple in the following steps. Peer P
of set Y with the members of set X by connecting the
first makes two sets, X and Y. The first set X consists of
second element and the last element of a Y’s member
the directly connected neighbor peers of P. The second
(five-tuple) with the members in the set X such that this
set Y arranges P’s ID space five-tuples so that a five-
connects at least one new member in the set X. The
tuple pointing to two different neighbor peers is kept
unlinked members in set Y are the redundant entries
so they are returned to their corresponding neighbor
peers.
Algorithm 1 Peer-join()
set TTL = 1 Algorithm 3 Reduce-table-entries()
set P = current peer Set P = current peer
LAB: Set X = {Px \ Px is a directly connected neighbor peer
Broadcast JRQST with TTL value of P}
if receive JRPLY then Set Y = {the five-tuple(s) of the form (m, P1, P, m +
Pruning(P) n, P2) at peer P}
Connect with physically closer peers and acquire Combine any two consecutive five-tuple(s) in Y
the ID space accordingly {/*the ID space is ac- Compare X and Y, and shift the redundant five-tuple
quired such that the ID space of peer P is con- to their corresponding peers
secutive to the ID space of P’s directly connected
neighbor peers*/}
else 3.3 Update
if TT L ≤ MaxValu then
increment TTL Each peer periodically exchanges probe messages with
GOTO LAB its directly connected neighbor peers to update and
else maintain connectivity. For two logically linked peers,
Acquire the whole ID space 0–2 M −1 the peer having the lower node ID initiates the sending
end if of the probe message to maintain the link. Following
end if this rule is to avoid redundant probe message transmis-
set File = {F \ F is a file shared by P} sions. The probe message of P contains the portion of
for each F ∈ File do P’s ID space in the form of five-tuple and P’s directly
File-discovery(P,F) {/* this is to store the index connected neighbor peers along with their distances
information of its shared files in the network */} from P. When P hasn’t received any probe message
end for from a neighbor peer P1 for certain period of time,
150 Peer-to-Peer Netw. Appl. (2012) 5:143–160

P invokes the recovery operation for P1. Due to node random period of time and then invokes the recov-
mobility in MANET, the distances among peers may ery operation if it does not hear any recovery action
change. Therefore each time a peer P receives the about P1. Setting the random waiting time is to avoid
updated information, it builds up the MST consisting of redundant simultaneous recoveries issued by multiple
itself as the source vertex, its directly connected neigh- directly connected neighbor peers of the disconnected
bor peers and its 2-hops away neighbor peers. Then it one. Disconnection of P1 may have different causes, for
compares its list of directly connected neighbor peers example, P1 has left the P2P network or it has been
with its direct neighbors in the MST. If P has a peer turned off. In any case, P sends the recovery request
P1 as its direct neighbor in the MST while P1 is not in message (RRQST) to each of the directly connected
P’s list of directly connected neighbor peers, P connects neighbor peers of the disconnected peer P1 using the
with P1 by sending CRQST to it. If P has a peer P2 in its underlying routing algorithm. The RRQST message
list of directly connected neighbor peers while P2 is not from P contains the disconnected neighbor peer and
P’s direct neighbor in the MST, P removes P2 from its the list of current neighbor peers of P along with their
peer-routing table and then executes the reduce-table- distances from the peer P. If more than one peer ini-
entries operation. Each peer in the P2P network also tiates the RRQST for the same disconnected neighbor
periodically refreshes its shared file index information peer, then the one having the lowest node ID succeeds
by sending the probe messages to the corresponding and takes over the portion of ID space of the discon-
peers. Similarly, if P does not receive the probe message nected peer. When receiving RRQST, the receiving
of the index information for a file stored in its ID space peer, say P2, treats RRQST in the same way as CRQST,
and the lifetime of the index information expires, P but in addition, it removes the disconnected peer P1
removes that index information from its ID space. from its peer-routing table and sends the recovery-reply
message (RRPLY) to the requesting peer P. RRPLY
from P2 contains the acknowledgment to RRQST. In
Algorithm 4 Update addition, RRPLY from P2 also contains the same infor-
Set P = current peer mation as in CRPLY if P2 can accommodate the sender
Set X = { Px \ Px is a directly connected neighbor peer of RRQST, P in this case, in its peer-routing table
peer of P} to establish the neighbor connection. Upon receiving
Exchange probe messages with every Px ∈ X the updated information, P executes the reduce-table-
if Px ∈ X gets disconnected then entries operation.
Recovery(Px )
end if
Pruning() Algorithm 5 Recover (disconnected peer Pdis )
Reduce-table-entries() Set P = Current peer
set File = {F \ F is a file shared by P} Set X = { Px \ Px is a directly connected neighbor
for each F ∈ File do peer of Pdis }
File-discovery(P,F) {/* this is to store the index Connect with every Px ∈ X
information of its shared files in the network*/} Pruning()
end for Reduce-table-entries()

3.4 Peer-leave
3.6 File-discovery
When a peer P wants to leave the P2P file-sharing net-
work, it can inform its neighbor peers about its leaving To retrieve a file F, the peer P applies the hash function
and transfers its portion of ID space as well as the to F, producing a key/identifier K in the range from 0 to
indexes of its stored files to the corresponding neighbor 2M –1. Then P builds up the file-lookup query (FRQST)
peers. Normally, a peer does not have to inform its for key K. FRQST contains the requesting peer and
neighbor peers about its leaving. the key K. Then P builds up the BST from its ID
space as discussed in Section 3. Traversing the BST
3.5 Recovery according to key K, P finds the peer, say P1, which is
responsible for key K. If P1 is in fact P itself, P examines
When a peer P detects that one of its directly connected its peer-routing table for index information matching
neighbor peers, say P1, is disconnected, it waits for a K. Otherwise P forwards the file-lookup query to P1.
Peer-to-Peer Netw. Appl. (2012) 5:143–160 151

This process is repeated on each peer. When the peer 4 An example


responsible for key K receives the file-lookup query, it
sends the file-reply message (FRPLY) to the requesting Figure 4a shows part of a P2P network. Node N2 joins
peer. FRPLY contains either the index information the P2P network by broadcasting a JRQST using the
of file F or a NULL value in case there is no index ERS algorithm. After receiving JRPLY from P1, P2
information of file F at that peer. To have a limit on and P3, N2’s weighted undirected graph is shown in
the lifetime, the file-lookup query is associated with Fig. 4b and its corresponding MST with N2 as the
a TTL value. Receiving the index information for file source vertex is shown by the bold lines. Then N2 sends
F, the requesting peer retrieves the file directly from CRQST to P1, P2 and P3, respectively. Receiving a
the source peer using the underlying routing due to the CRQST, peer P1 builds up its MST and assigns the
proactive nature of OLSR. For the sack of simplicity, five-tuples (256, P3, N2, 384, P1) and (448, P1, N2, 512,
the scheduling algorithm similar to [14] can be used to P2) to N2. Similarly, peer P2 assigns N2 two five-tuples
retrieve the file in blocks. Since, a peer in our system (512, P1, N2, 640, P2) and (704, P2, N2, 768, P3). N2
has the information up to its 2-hops away neighbor also receives from P3 two five-tuples (128, P3, N2, 256,
peers, the lookup query moves two hops towards to P1) and (768, P2, N2, 896, P3). In ascending order of the
the destination peer. Therefore, in our system a lookup first element, the five-tuple received by N2 from P1, P2
query for the data item of key K can be resolved in and P3 are {(128, P3, N2, 256, P1), (256, P3, N2, 384,
O(n/2) time (where n is the number of peers in the P1), (448, P1, N2, 512, P2), (512, P1, N2, 640, P2), (704,
P2P system). However, this does not mean that our P2, N2, 768, P3), (768, P2, N2, 896, P3)}. By combining
approach has a longer lookup delay than Chord, as the consecutive five-tuples into a single five-tuple, the
Chord with a finger-table can resolve a lookup query final set of five-tuple at N2 is {(128, P3, N2, 384, P1),
in (log n)/2 on average (where n is the number of peers (448, P1, N2, 640, P2), (704, P2, N2, 896, P3)}. After
in the P2P system). But this is the hop-cost of resolving exchanging updated information, the topology of the
a lookup query in the overlay network. If the overlay network is shown in Fig. 4d. Now the set of P3’s directly
topology does not match the underlying physical net- connected neighbor peers becomes X = {N2} and P3’s
work, which is the case of Chord, the real traverse cost ID space five-tuple set is Y = {(0, NULL, P3, 128, N2),
in the physical network may be much higher. (896, N2, P3, 1024, NULL)}. P3 executes the reduce-
table-entries operation by establishing links between
members of Y and X, which is shown in Fig. 4c. Then
P3 sends the redundant five-tuple (896, N2, P3, 1024,
Algorithm 6 File-discovery(current peer P, File F)
NULL) to N2. Thus the portion of ID space at N2 is
Set Key K = Hash-function(F) where 0 ≤ K ≥ 2 M −1, {(128, P3, N2, 384, P1), (448, P1, N2, 640, P2), (704, P2,
where M is the number of bits determining the size of N2, 1024, NULL)}. Similarly N2 performs the reduce-
identifier space table-entries operation and sends the entry (704, P2,
Arrange the five-tuple of P and of P’s directly con- N2, 1024, NULL) to P2. The resulting P2P network is
nected neighbor peers in ascending order of first shown in Fig. 4e.
element of the five-tuple Taking the part of P2P network in Fig. 4e, if P1 wants
From these above five-tuple(s), construct the binary- to send a file-lookup query for key 98, the BST at P1
search tree, as discussed in Section 3 for the five-tuples of P1 and N2 (the direct neighbor
Traverse the binary-search tree to find the corre- peer of P1) is shown in Fig. 5. So P1 traverses the BST
sponding peer P1 for Key K accordingly and finds that the responsible peer for key
if P1 is current peer then 98 is P3. P1 then forwards the file-lookup query for key
if this query is file-lookup request then 98 to P3. Receiving the file-lookup query for key 98, P3
Send the reply to the requesting peer identifies that key 98 is within its ID space range and
end if sends the index information for key 98 to P1.
if This query is to store or refresh the file index By the sample scenario, we show that our scheme
information then provides consistent partitioning of the ID space. This
store or refresh the file index information ac- example also shows that as long as the peers are con-
cordingly nected to the P2P network, the lookup query will return
end if the result of queried information. However, when a
else peer P leaves, the index information stored on P is not
Forward the query to P1 available till the recovery operation for P is executed.
end if After recovery operation and update operation, the
152 Peer-to-Peer Netw. Appl. (2012) 5:143–160

Fig. 4 To show the joining


N4 P3 Peer-routing table on P3
process
The portion of ID space at P3 (0, NULL, P3, 256,P1), (768, P2, P3, 1024, NULL)

N3 N1 N6 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
P1 N2 N5 P2
Peer-routing table on P2
Peer-routing table on P1
The portion of ID space at P2 (512, P1, P2, 768, P3)
The portion of ID space at P1 (256, P3, P1, 512, P2)
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
P3 3 (0, NULL, P3, 256,P1), P1 3
P3 3 (0, NULL, P3, 256,P1), P2 3
(768, P2, P3, 1024, NULL) (768, P2, P3, 1024, NULL)
P2 3 (512, P1, P2, 768, P3) P3 3 P1 3 (256, P3, P1, 512, P2) P3 3

(a)
X N2

P3

3
2
3
1 N2 2
P1 P2 Y (0, NULL, P3, 128, N2) (896, N2, P3, 1024, NULL)

(b) (c)
Peer-routing table on P3
(0, NULL, P3, 128, N2), (896, N2,
The portion of ID space at P3
P3, 1024, NULL)
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
N2 1
(128, P3, N2, 384, P1), (448, P1, P1, P2 2, 2

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

N4 P3 Peer-routing table on N2
(128, P3, N2, 384, P1), (448, P1, N2,
The portion of ID space at N2
640, P2), (704, P2, N2, 896, P3)
Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N3 N1 N6 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)
P1 N2 N5 P2
Peer-routing table on P2
Peer-routing table on P1 The portion of ID space at P2 (640, N2, P2, 704, N2)
The portion of ID space at P1 (384, N2, P1, 448, N2) Neighbor Its distance Its ID five_tuple Its neighbors Their distance
Neighbor Its distance Its ID five_tuple Its neighbors Their distance N2 1 (128, P3, N2, 384, P1), (448, P1, P1, P3 2, 2
N2 1 (128, P3, N2, 384, P1), (448, P1, P2, P3 2, 2 N2, 640, P2), (704, P2, N2, 896,
N2, 640, P2), (704, P2, N2, 896, P3)
P3)
(d)
Peer-routing table on P3
The portion of ID space at P3 (0, NULL, P3, 128, N2),

Neighbor Its distance Its ID five_tuple Its neighbors Their distance

N4 P3 N2 1
(128, P3, N2, 384, P1), P1, P2 2, 2

(448, P1, N2, 640, P2)

Peer-routing table on P2
N3 N1 N6
The portion of ID space at P2 (640, N2, P2, 1024, NULL)
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
N2 1 P1, P3 2, 2
P1 N2 P2 (128, P3, N2, 384, P1),
N5
(448, P1, N2, 640, P2)

Peer-routing table on N2
Peer-routing table on P1 (128, P3, N2, 384, P1), (448, P1, N2,
The portion of ID space at N2
The portion of ID space at P1 (384, N2, P1, 448, N2) 640, P2)
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
Neighbor Its distance Its ID five_tuple Its neighbors Their distance
P3 2 _
N2 1 P2, P3 2, 2 (0, NULL, P3, 128, N2) _
(128, P3, N2, 384, P1), (448, P1,
N2, 640, P2) P2 2 (640, N2, P2, 1024, NULL) _ _

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

(e)
Peer Non-peer Communication link
Peer-to-Peer Netw. Appl. (2012) 5:143–160 153

128 is randomly initiated for total 100 random files by


k =98
the peers in the network. We study the performance
of overlay maintenance and file-discovery by varying
P3
384
several parameters including the peers ratio and the
maximum moving speed of the nodes. The peers ratio
is defined as the ratio of the number of peers in the P2P
network to the total number of nodes in the MANET
N2 448 network. The simulation environment is given in Ta-
ble 1. The following metrics are used in our comparison

P1 – Routing overhead: The total number of packets


640
transmitted at the routing layer.
– Average file-discovery delay: The average time
N2
elapsed from the moment when a file-lookup query
P2 is issued to the moment when the first reply is
received.
Fig. 5 Traversing the BST at P1 for key 98 – False-negative (FN) ratio: The ratio between the
numbers of unresolved file-lookup queries for files
that do exist in the P2P network and the total
part of index information will be available again. This number of initiated file-lookup queries.
is also common in other P2P systems. Several replica- – Path-stretch The ratio of the path length available
tion mechanisms have been proposed in literatures to at the routing agent or in P2P network for file
ensure the availability of a data item in case the item retrieval and the length of the shortest path in the
is maintained by the disconnected peer. Design of the physical network between two peers.
replication mechanism for P2P systems is beyond the
scope of this paper. 5.1 Routing overhead

Figure 6 shows that for all four approaches, the routing


5 Simulation traffic increases with the increase of the node moving
speed. This is due to the fact that frequent change
We use simulator ns-21 in our simulation to compare in network topology will produce more traffic for re-
our approach with three existing approaches [7, 11, 14]. adjusting the overlay topology to match the physical
We name the approach in [7] as Modified-chord, the topology. Figure 6 also shows that the routing traffic
one in [14] as E-SP2P, and the one in [11] as P2P- of all approaches increases by increasing the peers
WANT. Our approach is named as MA-SP2P. We im- ratio in the network. This is due to the following two
plement Modified-chord using AODV as the underly- reasons. First, increasing the number of peers in the
ing routing protocol. This is because the authors in [6, 7] network introduces more traffic in maintaining connec-
claim that the AODV protocol performs better for P2P tivity among the peers. Second, more traffic will be gen-
systems over MANET as compared to other protocols. erated to maintain the index information maintained by
The approach in [13] is excluded from comparison peers when the number of peers increases.
because it is based on a static scenario of MANET.
In our scenario, the nodes randomly join/leave the P2P
network while maintaining the specified ratio of peers
Table 1 Simulation environment
among all nodes.
We use OLSR [15] as the underlying routing proto- Parameter Value
col in our approach. The mobility scenarios are created MAC layer IEEE 802.11
Transmission range 250 m
according to the RandomWayPoint mobility model us-
Total number of nodes 100
ing Bonnmotion2 to ensure the physical network con- Bandwidth 2 MB
nected. Each peer shares ten unique files. File discovery Simulation area 1000 × 1000
Simulation time 1000 s
Mobility model Random way point
1 www.isi.edu/nsnam Propagation model Two ray ground
2 http://net.cs.uni-bonn.de/wg/cs/applications/bonnmotion/ Number of file retries 2
154 Peer-to-Peer Netw. Appl. (2012) 5:143–160

P2P-WANT has less routing traffic at low peers ratio traffic of P2P-WANT has a larger increase compared
as compared to the other three approaches. The rea- to three other approaches.
sons is that in P2P-WANT, only the peers periodically When the node moving speed increases, the routing
broadcast the Hello message and participate in the traffic of P2P-WANT has a larger increase compared
overlay and physical routing, while non-peers don’t. to three other approaches. It is due to the following rea-
Though having less routing traffic when the number son. Increasing the node moving speed changes the net-
peers is small, P2P network partition may happen in work topology more frequently, which causes frequent
P2P-WANT even when the physical network is fully execution of the recovery and peer-join operations
connected. Network partition will result in large false- and generates heavier routing traffic in P2P-WANT.
negative ratio in P2P-WANT as explained in the Sec- Figure 6 also shows that MA-SP2P has a lower traffic
tion 2. While in other three approaches, two neigh- overhead as compared to E-SP2P and Modified-chord
bor peers can get connected even non-peer(s) exist when the peers ratio in the network is above 10%. The
between them in the physical network. Thus consid- reason is that MA-SP2P builds up and maintains an
ering both routing traffic and false-negative ratio, our overlay which better matches to the physical network,
approach (MA-SP2P) still performs better than P2P- eliminating redundant long links.
WANT when the peers ratio is low. We can also see E-SP2P tries to match the overlay topology to the
that when the peers ratio becomes larger, the routing physical network. However, in E-SP2P, the ID space is

maximum speed 0.4 m/s maximum speed 0.8 m/s


340
200 320
180 300
280
Routing overhead in Kilo
Routing overhead in Kilo

160 260
240
140 220
120 200
180
100 160
80 140
120
60 100
80
40 60
20 40
20
0 0
Peers ratio 10% 20% 30% 40% 50% Peers ratio 10% 20% 30% 40% 50%
Modified-chord MA-SP2P Modified-chord MA-SP2P
E-SP2P P2P-WANT E-SP2P P2P-WANT
(a) (b)
maximum speed 1.2 m/s maximum speed 1.6 m/s
520 630
500 600
480
460 570
440 540
420
Routing overhead in Kilo

Routing overhead in Kilo

510
400 480
380
360 450
340 420
320 390
300 360
280 330
260
240 300
220 270
200 240
180 210
160
140 180
120 150
100 120
80 90
60 60
40
20 30
0 0
Peers ratio 10% 20% 30% 40% 50% 10% 20% 30% 40% 50%
Peers ratio
Modified-chord MA-SP2P Modified-chord MA-SP2P
E-SP2P P2P-WANT E-SP2P P2P-WANT

(c) (d)
Fig. 6 The comparison of routing overhead
Peer-to-Peer Netw. Appl. (2012) 5:143–160 155

distributed and maintained among the peers based on reasons. First, P2P-WANT has higher false-negative
the distance of the peers from the root-peer. When the ratio than other three approaches. Some accesses to
relative distance of the peers to the root-peer changes the files never happen because of the false-negative
due to node mobility, the peers have to re-allocate the result in locating the file. Second, P2P network parti-
ID space by exchanging the ID space information with tion may exist in P2P-WANT, which also prevents the
each other. Modified-chord, on the other hand, does access to some file. Figure 7 shows that Modified-chord
not attempt to make a good match between the overlay has a larger average file-discovery delay compared to
and the physical network. It sends multiple copies of other two approaches, MA-SP2P and E-SP2P. Though
the lookup-query via multiple paths in the overlay in Modified-chord uses redundant file-lookup queries to
order to address the issue of packet loss. These two avoid packet loss, however, topological ill-match be-
features of Modified-chord cause largest routing traffic tween the overlay and the physical network prevents
in the network. Figure 6 shows the routing traffic of Modified-chord from being efficient in the file lookup
Modified-chord compared to the other two approaches. process. The file-lookup query may experience larger
The routing traffic of Modified-chord increases more delay in the physical network. Multiple redundant file-
rapidly than MA-SP2P and E-SP2P when the peers lookup query copies may pass a common link in the
ratio and the node moving speed increase. The rea- physical network, which causes a bottleneck problem.
son is straightforward. MA-SP2P and E-SP2P try to Redundant transmission of the file-lookup query in
match the overlay to the physical network, when the Modified-chord also causes heavier routing traffic and
peers ratio increases, the path length between two increases delay caused by contention.
peers decreases, and so the average traffic overhead Figure 7 shows that E-SP2P has a larger average file-
per peer. While Modified-chord does not guarantee discovery delay compared to MA-SP2P. This is due to
a good matching between the overlay and the phys- the following two reasons. E-SP2P has higher routing
ical network, the chance of having redundant links traffic as compared to MA-SP2P, which leads to more
among peers increases with the increase of peers in the contention and larger delay in the network. Also, the
network. topology of E-SP2P is a matter. In E-SP2P, a peer
One interesting thing to notice is that Modified- P is not necessarily the neighbor of all its physically
chord has lower routing traffic than MA-SP2P and E- adjacent peers in the DHT of the network. This leads
SP2P when the peers ratio is below 10%. It is be- to larger file-lookup delay and increased routing traffic.
cause Modified-chord uses reactive underlying routing, While in MA-SP2P, a peer P must be the neighbor of
AODV, while MA-SP2P and E-SP2P use proactive un- all its physically adjacent neighbor peers in the logical
derlying routing OLSR. When the number of peers in space. Consequently in MA-SP2P, a file-lookup query
the overlay is very low, the flooding operation required from a peer is always forwarded closer to the destina-
by on-demand routing generates a little routing traffic. tion peer in both overlay and physical networks. This
The proactive routing on the other hand needs to reduces the lookup delay.
maintain the routing by periodically exchanging routing
information among the nodes. But when the peers ratio
increases, the flooding traffic in AODV will eventu- 5.3 False-negative ratio
ally exceed the routing maintenance traffic in OLSR.
Reducing the traffic overhead, and consequently the Figure 8 indicates that the false-negative (FN) ratio of
chance of packet collision and node energy consump- P2P-WANT is higher when the peers ratio is either low
tion, will increase the network performance and extend or high. At the low peers ratio, the high FN ratio is
the network lifetime, which is the goal of our approach. caused by P2P network partition in P2P-WANT. At the
high peers ratio, P2P-WANT produces more routing
5.2 Average file-discovery delay traffic, which causes high packet loss as a result of
packet collision in the network.
Figure 7 indicates that when the peers ratio and node Figure 8 shows that the FN ratio of all other three
moving speed increase, the average file-discovery delay approaches (Modified-chord, E-SP2P and MA-SP2P)
of all four approaches increases. This is caused by increases with the increase in the peers ratio and the
the heavier routing traffic and more contention gener- node moving speed. Increasing the peers ratio causes
ated by more peers in the network and more frequent more routing traffic, and therefore more serious con-
change of network topology. Though P2P-WANT has tention and packet loss problem in the network. Simi-
larger routing traffic, Fig. 7 indicates that P2P-WANT larly, by increasing the node moving speed, the network
has lower average file-discovery delay due to following topology changes more frequently, resulting in a larger
156 Peer-to-Peer Netw. Appl. (2012) 5:143–160

maximum speed 0.8 m/s


maximum speed 0.4 m/s

Average file-discovery delay in millisecond


300
Average file-discovery delay in millisecond
250

250
200
200
150
150
100
100

50
50

0 0
10% 20% 30% 40% 50% 10% 20% 30% 40% 50%
Peers ratio Peers ratio
Modified-chord MA-SP2P Modified-chord MA-SP2P
E-SP2P P2P-WANT E-SP2P P2P-WANT
(a) (b)
maximum speed 1.2 m/s maximum speed 1.6 m/s
400
Average file-discovery delay in millisecond

Average file-discovery delay in millisecond


350
350
300
300
250
250
200
200
150
150
100 100
50 50

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

Modified-chord MA-SP2P Modified-chord MA-SP2P


E-SP2P P2P-WANT E-SP2P P2P-WANT

(c) (d)
Fig. 7 The comparison of average file-discovery latency

delay caused by contention in accessing the data item uses the reactive underlying routing protocol AODV
and by large number of packet collision in the network. which adopts broadcast mechanism in routing recovery.
Modified-chord uses redundant lookup queries to This causes larger delay and more serious packet colli-
improve reliability in the file lookup process, we might sion in the network, and contributes to the increased
expect a lower FN ratio achieved by Modified-chord. FN-ratio of Modified-chord.
However, Fig. 8 indicates that Modified-chord has a Figure 8 shows that E-SP2P has a larger FN-ratio
higher FN-ratio compared to E-SP2P and MA-SP2P. compared to MA-SP2P. The reason is that E-SP2P has
This is due to the following facts. First, Modified-chord higher routing traffic in the network than MA-SP2P.
generates more routing traffic, leading to more packet Also, as pointed out in the previous section, E-SP2P
collisions. Second, redundant lookup queries may pass does not guarantee to forward the lookup query closer
a common link in the physical network for the reason to the destination peer in both overlay and physical
discussed in the previous section. The common link networks. Longer routes may be taken in the physical
becomes a bottleneck which causes larger contention network, which increases the chances of packet loss due
delay and more packet collisions in the network. Third, to packet collisions in E-SP2P.
higher node moving speed may cause frequent discon- The simulation results reveals that increase in the
nection of logical peers. Recovery procedure must be peers ratio and the node moving speed does not in-
executed to recover the connections. Modified-chord crease the routing overhead and the false negative
Peer-to-Peer Netw. Appl. (2012) 5:143–160 157

maximum speed 0.4 m/s maximum speed 0.8 m/s


50 45
45 40
False-negative ratio

False-negative ratio
40 35
35 30
30
25
25
20
20
15
15
10 10

5 5
0 0
Peers ratio 10% 20% 30% 40% 50% 10% 20% 30% 40% 50%
Peers ratio
Modified-chord E-SP2P Modified-chord E-SP2P
MA-SP2P P2P-WANT MA-SP2P P2P-WANT
(a) (b)
maximum speed 1.2 m/s maximum speed 1.6 m/s
50 50
45 45
40 40
False-negative ratio

False-negative ratio
35 35
30 30
25 25
20 20
15 15
10 10
5 5
0 0
Peers ratio 10% 20% 30% 40% 50% Peers ratio 10% 20% 30% 40% 50%
Modified-chord E-SP2P Modified-chord E-SP2P
MA-SP2P P2P-WANT MA-SP2P P2P-WANT
(c) (d)
Fig. 8 The comparison of false-negative ratio

ratio of MA-SP2P too much. This is because that our P2P-WANT does not even use an explicit underlying
approach is distributive in nature and produces less routing protocol. In P2P-WANT, the index information
routing traffic. of a data item contains the route to the source peer
from the peer where the index information is stored.
5.4 Path-stretch So P2P-WANT has to compute the route from the
requesting peer to the source peer by using the index in-
Since we use the proactive underlying routing protocol formation of a data item. However the route calculated
OLSR for both E-SP2P and MA-SP2P, we take only may not be the shortest one in the physical network
MA-SP2P as the representative in comparison (in term as explained in [11]. Therefore we compare the aver-
of path-stretch) with other two approaches (Modified- age path-stretch of P2P-WANT, Modified-chord and
chord and P2P-WANT). MA-SP2P.
In MA-SP2P once a requesting peer receives the Figure 9 shows that P2P-WANT has the largest path-
reply to the lookup query from the source peer, it can stretch among three approaches. This is because of the
retrieve the file from the source peer directly via a tree based structure of P2P-WANT. The path-stretch
pre-determined shortest route in the physical network. of P2P-WANT increases with the increase of the peers
Due to the reactive nature of AODV used in Modified- ratio. By increasing the peers ratio, the topology of
chord, the requesting peer does not have the route P2P-WANT scales up and the path length between
to the source peer when receiving the reply, an on- the requesting peer and the source peer also increases.
demand routing must be performed to find the route. Figure 9 also shows that Modified-chord has a larger
158 Peer-to-Peer Netw. Appl. (2012) 5:143–160

maximum speed 0.4 m/s maximum speed0.8 m/s


4 4
3.5 3.5
3 3
Path sketch

Path sketch
2.5 2.5
2 2
1.5 1.5
1 1
0.5 0.5
0 0
Peers ratio 10% 20% 30% 40% 50% Peers ratio 10% 20% 30% 40% 50%
Modified-chord MA-SP2P Modified-chord MA-SP2P
P2P-WANT P2P-WANT
(a) (b)
maximum speed 1.2 m/s maximum speed 1.6 m/s
4.5
4.5
4 4
3.5 3.5
3
Path sketch

Path sketch
2.5 2.5
2 2
1.5 1.5
1 1
0.5 0.5
0 0
Peers ratio 10% 20% 30% 40% 50% Peers ratio 10% 20% 30% 40% 50%
Modified-chord MA-SP2P Modified-chord MA-SP2P
P2P-WANT P2P-WANT
(c) (d)
Fig. 9 The comparison of Path-stretch values

average path-stretch compared to MA-SP2P. This is In our view, this is due to the MPR (multi-point relay)
because of the reactive underlying routing protocol selection in the OLSR routing.
used by Modified-chord. By increasing the peers ratio
in the network, the chance of having an indirect path
between the requesting peer and the source peer also 6 Conclusion and future work
increases. That means, the requesting peer will have a
better chance to find a non-shortest route to the source This paper presents a MANET-adaptive structured
peer. Increasing the node moving speed in the network P2P overlay called MA-SP2P. Our approach constructs
has the similar effect. In this case, the physical network an efficient structured P2P overlay over MANET with
changes more frequently and so the links availability, a topology matching to the physical network. Using
which makes the shortest route more difficult to find. this structure of interconnection among the peers, we
Therefore the path-stretch of Modified-chord goes up design a new overlay routing algorithm to distribute
with the increase of the peers ratio and the node moving the ID space among the peers. To route the file-lookup
speed. However, we can learn from Fig. 9 that the query, each peer builds up a binary search tree (BST)
average path-stretch of MA-SP2P is not affected by the based on the knowledge of the ID space of itself
peers ratio and the node moving speed. But the value and of its directly connected neighbor peers. Simula-
does not always equal to one. That means sometimes tion experiments have been conducted using scenarios
the path between the requesting peer and the source with relatively high peers ratio and low node moving
peer is not the shortest one in the physical network. speed. The simulation results show that our approach
Peer-to-Peer Netw. Appl. (2012) 5:143–160 159

outperforms the existing approaches in [7, 11, 14] in 14. Shah N, Qian D (2010) An efficient structured P2P overlay
term of routing overhead, average file-discovery delay, over MANET. In: MobiDE, ninth international ACM work-
shop on data engineering for wireless and mobile access (in
false-negative ratio, and average path-stretch. The sce-
conjunction with SIGMOD/PODS 2010), Indianapolis, Indi-
narios with sparse peers and high node moving speed ana, USA
would be considered in our further experiments to 15. Clausen T, Jacquet P (2003) Optimized link-state routing
see the applicability of our approach. An analytical protocol. In: IETF RFC-3626
16. Perkins C, Belding-Royer E, Das S (2003) Ad hoc on-demand
comparison of our approach with other approaches will
distance vector (AODV) routing. In: RFC 3561
be conducted in our future work. We would also like 17. Deng J, Zuyev S (2008) On search sets of expanding ring
to address other issues of P2P networks such as load- search in wireless networks. Ad Hoc Networks 6(7):1168–
balancing, P2P network partition, user anonymity, and 1181
18. Macedo DF, dos Santos AL, Nogueira JM, Pujolle G (2011)
free-riding in our future research.
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
References 20. Lee S-B, Wong SHY, Lee K-W, Lu S (2011) Content man-
agement in a mobile ad hoc network: beyond opportunistic
1. Stoica I, Morris R, Karger D, Kaashoek MF, Balakrishnan H strategy. In: Infocom, Shanghai, China
(2001) Chord: a scalable peer-to-peer lookup service for in-
ternet applications. In: Proceedings of the ACM SIGCOMM
01 conference, San Diego, California, USA
2. Rowstron A, Druschel P (2001) Pastry: scalable, decentral-
ized object location and routing for large-scale peer-to-peer
systems. In: IFIP/ACM international conference on distrib-
uted systems platforms (Middleware), Germany
3. Pourebrahimi B, Bertels KLM, Vassiliadis S (2005) A survey
of peer-to-peer networks. In: Proceedings of the 16th annual
workshop proRisc
4. Ripeanu M, Foster I, Iamnitchi A (2002) Mapping the
Gnutella network: properties of large-scale peer-to-peer sys-
tems and implications for system design. IEEE Int Comput J
6(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-peer
application. J Parallel Distrib Comput 65(11):1337–1347
7. da Hora DN, Macedo DF, Oliveira LB, Siqueira IG, Loureiro
AAF, Nogueira JM, Pujolle G (2009) Enhancing peer-to-peer
content discovery techniques over mobile ad hoc networks.
Comput Commun 32(13–14):1445–1459
8. Kummer R, Kropf P, Felber P (2006) Distributed lookup in
structured peer-to-peer ad-hoc networks. In: Proceeding of
the OTM conferences, vol 2, pp 1541–1554
9. Li M, Chen E, Sheu PC-y (2006) A chord-based novel mobile
peer-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 file Nadir Shah is a PhD student at Sino-German Joint Software
sharing over mobile ad hoc networks. Telecommun Syst Institute, Beihang University, Beijing, China. He earned M.S. in
42:47–61. doi:10.1007/s11235-009-9168-7 Computer Science from International Islamic University, Islam-
11. Sozer H, Tekkalmaz M, Korpeoglu I (2009) A peer-to-peer abad, Pakistan in 2007. He earned B.Sc and M.Sc in Computer
file search and download protocol for wireless ad hoc net- Science from Peshawar University, Peshawar, Pakistan in 2002
works. Comput Commun 32(1):41–50, Elsevier and 2005 respectively. He was a Lecturer at Department of
12. Lee U, Park JS, Lee SH, Ro WW, Pau G, Gerla M (2008) Computer Science, COMSATS Institute of Information Technol-
Efficient peer-to-peer file sharing using network coding in ogy, Abbottabad, Pakistan between August 2007 and June 2008.
MANET. J Commun Netw 10(4):422–429 His current research interests include mobile ad hoc networks,
13. Shin M, Arbaugh WA (2009) Efficient peer-to-peer lookup peer-to-peer network, and delay/disruption tolerant networks.
in multi-hop wireless networks. In: KSII transactions on in- He has published about 13 papers in international conferences
ternet and information systems, vol 3, pp 5–25 and journals.
160 Peer-to-Peer Netw. Appl. (2012) 5:143–160

Depei Qian professor at Beihang University, director of Sino- Rui Wang received the B.S. and M.S. degrees from Xi’an
German Joint Software Institute. His current research interests Jiaotong University, Xi’an, China, in 2000 and 2003, respectively,
include high performance computer architecture and implemen- and the Ph.D. degree from Beihang University, Beijing, China,
tation technology, distributed systems, and network performance in 2009, all in electrical engineering. His research interests are in
measurement. He has published more than 100 papers. the area of P2P networks and multimedia social network. He is
currently an assistant professor at Beihang University.

You might also like