Title: Multi-level Hashing for Peer-to-Peer System in Wireless Ad Hoc Environment
1Multi-level Hashing for Peer-to-Peer System in
Wireless Ad Hoc Environment
- Dewan Tanvir Ahmed and Shervin Shirmohammadi
- Distributed Collaborative Virtual Environments
Research Laboratory - School of Information Technology and Engineering
- University of Ottawa, Ottawa, Ontario, Canada
- dahmed, shervin_at_discover.uottawa.ca
- Pervasive Computing and Communications
Workshops(PerComW'07) - ?????
2Outline
- Introduction
- Multi-level hashing in wireless ad
hocpeer-to-peer systems - Wireless ad hoc p2p system node join
- Wireless ad hoc p2p system content publishing
- Wireless ad hoc p2p system content discovery
- Simulation
- Conclusion
3Introduction (1/2)
- Mobile peer-to-peer (MP2P) system faces more
constraints as compared to wired peer-to-peer
system. Some problems in this network are - Scarcity of bandwidth
- Short lifetime of the nodes due to power
constraint - Dynamic topology caused by the mobility of nodes.
- These constraints give hard challenges to the
researchers in the various aspects of the
peer-to-peer system in ad hoc environments such
as - Routing
- Content discovering
- Data retrieval
- Caching
4Introduction (2/2)
- Smart content discovery is the heart of peer-to-
peer system. In ad hoc network, routing is
expensive so it requires more effective content
discovery process. - We apply chord directly on top of wireless ad hoc
peer-to-peer system. - We use two-level distributed hashing scheme.
- First level hash maps a content request to a
region that greatly reduces routing overhead. - Second level hash discovers content location
after redirecting the request to that region.
5Multi-level hashing in wireless ad
hocpeer-to-peer systems (1/2)
- The entire system consists of a set of home
regions where peers in close proximity form home
region. - Each home region has a representative that plays
a supporting role to make the system operational.
6Multi-level hashing in wireless ad
hocpeer-to-peer systems (2/2)
- These representatives may change over the time
considering the ad hoc issues of the system. - Home region is identified by the Home-Region-ID.
- The representative functions as a rendezvous
point for incoming requests and also provides
useful information to its local peers.
7Wireless ad hoc p2p system node join (1/3)
- We use a pair, ltHome-Region-ID, Node-IDgt, to
identify a node. - Hash function generates Node-ID
- Node-ID Hl(Node-Address)
- Home-Region-ID depends on its location that may
change over time.
8Wireless ad hoc p2p system node join (2/3)
- Two ways to learn about home region
representative. - The home region representative periodically
broadcasts its own identity (address) and
Home-Region-ID. - Joining node explicitly floods Home-Region-Search-
Request. - Home-Region-Search-Request is a controlled flood
not flooded to the entire system. - An intermediate node does not forward the request
when it already has the answer of the request.
9Wireless ad hoc p2p system node join (3/3)
- The requester may get multiple responses based on
its location. - It marks minimum hops away response.
- The joining node confirms the representative for
its inclusion to the system. - It gets the identity of its successor and
predecessor from this representative. - The joining node determines its Node-ID using the
hash function Hl.
10Wireless ad hoc p2p system contentpublishing
(1/5)
- keyr Hr(Content-Name )
- Map the content name to a home region.
- keysHl(Content-Name)
- Determine the successor in a particular region,
i.e. the actual node where content information
has to be stored.
11Wireless ad hoc p2p system contentpublishing
(2/5)
- keyr, is used to determine the home region where
content has to be published. - The content publisher first builds a tuple
consisting of ltContent-Name, Own-Addressgt and
then asks local representative to store the
tuple.
12Wireless ad hoc p2p system contentpublishing
(3/5)
- Local representative transport the tuple to the
foreign region. But it may happen that content
has to be stored in the local region based on the
keyr.
13Wireless ad hoc p2p system contentpublishing
(4/5)
- successor(keys)
- the node identifier of the first actual node
following keys around the circle clockwise. - At a particular region, the successor of the
content is determined using keys and the
representative initiates tuple storing process.
14Wireless ad hoc p2p system contentpublishing
(5/5)
- The index is distributed over the nodes at
random. One of the shortcomings in this
environment is nodes ad hoc nature. - To recover from such unwanted events protocol
deploys multiple hash functions to store tuple in
multiple nodes.
15Wireless ad hoc p2p system contentdiscovery
(1/8)
- Hashes to get keyr using Hr(Content-Name).
- This key represents the home region where the
content information is stored. - If the content is not in local region, the
request is delegated to the foreign
representative. - Node gets the address of foreign representative
with the help of local representative. - The protocol allows local representative to
broadcast home regions addresses in its periodic
keep-alive messages.
16Wireless ad hoc p2p system contentdiscovery
(2/8)
- We applied chord like content searching process
with modified finger table in local region. - Lookup can proceed as follows.
- Based on keyr, either the initiating node or the
foreign representative sends a packet to its
successor containing requesters physical address
and the key, keys. - The packet is circulated around the logical
circle until it locates the successor or it fails.
17Wireless ad hoc p2p system contentdiscovery
(3/8)
- Chord uses finger table to speed up searching
process. If the hash address space is too large
as compared to the number of peers in the system - The most of the entries in finger table point to
the same node, and search continues in linear
way. - Let hash key is 128-bit long. Most entries of the
finger table point to the same successor. - We propose two approaches to construct finger
table for wireless ad hoc environments.
18Wireless ad hoc p2p system contentdiscovery
first approach (4/8)
- In the first design, the finger table is slightly
different from chord. - The finger table has m entries, indexed by 0
through m-1. It is divided into two halves - 0 to m/2
- m/2 to (m-1).
19Wireless ad hoc p2p system contentdiscovery
first approach (5/8)
- The values of the fields for entry i at node k
for the first half of the table are - First half table covers k to k 2m / 2-1 address
space.
start the physical address of successor(start)
k 2i mod 2m, where 0 i lt m/2 Physical address of successor(starti)
20Wireless ad hoc p2p system contentdiscovery
first approach (6/8)
- step-size
- a big number to jump more rapidly.
- The entries of the second half of the table are
incremented by the step size starting from k
2m / 2-1 . - Similarly we have corresponding physical
addresses of the successors.
21Wireless ad hoc p2p system contentdiscovery
first approach (7/8)
22Wireless ad hoc p2p system contentdiscovery
second approach (8/8)
- The values of the fields for entry i at table of
node k are - a is a constant
- One possible choice for the value of a is the
index of finger table. - i.e. it increase at a rate of ii 11, 22, 33.
- n is n-bit hash value.
- These approaches perform well when the number of
peers is too small as compared to the address
space otherwise we prefer the usual one.
Start the physical address of successor(start)
(k ai) mod 2n ,where m/2 i lt m Physical address of successor(starti)
23Simulation (1/8)
- 8000 10000 peers are randomly deployed in the
environment - Each peer has 0.2 movement probability.
- Nodes are allowed to move at any direction.
- 16 fixed adjacent regions.
- Not all nodes are involved in peer-to-peer
system. - If we have 8000 peers, system has more than 8000
nodes. - Peers are considered alive during the simulations
but helping nodes (intermediate ad hoc nodes that
provide routing service) are not all time. - The request may not end with a success.
24Simulation (2/8)
25Simulation (3/8)
- Applied chord directly on top of wireless ad hoc
network (Setup 1) . - Estimated search cost and routing cost of chord
for peer-to-peer system in wireless ad hoc
network. - Search cost
- How many peers are involved in a particular
content discovering process - Routing cost
- All ad hoc nodes that are involved in content
discovering process including the forwarding
nodes.
26Simulation (4/8)
- Chord in wireless ad hoc network is not suitable
as a peer-to-peer system because of its high
routing cost. - If the number of peers is too small as compared
to the hash address space, finger table has
little contribution in content discovering
process.
27Simulation (5/8)
- Two-level hashing presented in this paper is
tested and compared with chord for wireless ad
hoc p2p system. - Simulation environment(Setup 2)
- For the sake of fair experiment, we ignored
finger table in both approaches. This is because
we can deploy any variant of finger table in both
approaches.
28Simulation (6/8)
- On an average, chord requires 10 to 12 times more
searching cost than our two-level hashing
approach. - Content searching cost is reduced as we divide
the entire topology into multiple small regions
and first level hash makes it possible to explore
the content into that small region.
29Simulation (7/8)
- Chord requires 50 times more routing cost than
two level hashing scheme on an average. - Chord is a logical topology. It has no knowledge
of the physical structure. - Request is redirected to a node that is logically
close but physically far away.
30Simulation (8/8)
- It is also true in two-level hashing approach
when it enters in a local region. - But its logical ring is composed of close
proximity nodes as compared to one level hashing
in chord. - Reduces routing cost to a large extent.
- Proves the requirement of multi-level hashing.
31Conclusion(1/1)
- We present a two-level hashing scheme for
wireless ad hoc peer-to-peer system. - It shows that the performance of the system will
be increased once we have multi-level hashing in
terms of searching cost and routing overhead. - Modified finger tables works well when the number
of peers is too small as compared to the hash
address space.