LDEPTH: A Low Diameter Hierarchical P2P Network Architecture KOUSHIK SINHA SOUTHERN ILLINOIS UNIVERSITY, CARBONDALE
LDEPTH: A Low Diameter Hierarchical P2P Network Architecture
KOUSHIK SINHA
SOUTHERN ILLINOIS UNIVERSITY, CARBONDALE
Contents
Introduction
Background
LDEPTH P2P Architecture
Resource Look-up
Resource Join
Fault Tolerance
Conclusion
Introduction
Peer-to-Peer (P2P) overlay networks provide computational and data resource sharing capability
Scalable
Fault tolerant
Self-organizing
Distributed solution
2 broad classes of P2P networks
Unstructured
Structured
Introduction
Unstructured P2P networks
Peers are organized into arbitrary topologies
Flooding commonly used mechanism for resource look up
Resource look-up time complexity typically O(n), n = number of nodes in the P2P network
Example: Gnutella, Yappers
Structured P2P networks
Peers organized into specific topologies
Typically more efficient resource look-up time compared to Unstructured P2P networks [O(log n)]
Handling frequent peer joining and leaving (known as churn) more complex than in Unstructured P2P
Example: Chord, Pastry, Tapestry, HP2P
Structured P2P Networks
Typically use Distributed Hash Tables (DHTs)
Provides efficient data insertion, lookup, deletion operations
But, maintaining DHTs is complex task - needs significant effort to handle problem of churn
How to reduce the amount of effort in maintaining the structure while still providing an efficient resource query service?
Hybrid systems attempt to incorporate advantages of both structured and unstructured architectures
Efficient data look up vis-à-vis handling churn and providing fault tolerance still open problem
Basic Idea
Linear Diophantine Equation (LDE)
We consider solutions for LDE of the form
𝒂𝒏 ≡ 𝒃 𝒎𝒐𝒅 𝒄 𝑎, 𝑏, 𝑐 ∈ 𝐼
The above LDE has 𝒅 mutually incongruent solutions, where 𝑑 = gcd(𝑎, 𝑐)|𝑏
Alternative form of the above equation:
𝒂𝒏 + −𝒄 𝒌 = 𝒃, 𝑘 ∈ 𝐼
Solutions are of the form:
𝑛 = 𝑛0 + 𝑐𝑡
𝑑
𝑘 = 𝑘0 + 𝑎𝑡
𝑑
For a given 𝑡, all solutions of the form 𝒏𝟎 + 𝒕𝒄
𝒅+𝒎𝒄 are mutually congruent
𝑛0, 𝑛0 +𝑐
𝑑, 𝑛0 + 2
𝑐
𝑑, … , 𝑛0 + (𝑑 − 1)
𝑐
𝑑
Each of the 𝑑 solutions are mutually incongruent modulo 𝐜
LDEPTH Architecture
Solutions of LDE can be used as logical addresses of peers in P2P Network
Create overlay ring network consisting of maximum 𝒅 logical address points for each of 𝒅 equivalence classes
Each address point 𝑛0 + 𝑡𝑐
𝑑corresponds to a distinct resource/group identifier
Two resource-types/groups in the ring network are neighbors if their assigned addresses differ by 𝑐
𝑑
The last and first addresses on the ring differ by (r − 1)𝑐
𝑑
Diameter of the ring network can be at most 𝒅
𝟐
With each logical address 𝑛0 + 𝑡𝑐
𝑑on the ring:
Infinite number of mutually congruent logical addresses can be associated 𝒏𝟎 + 𝒕𝒄
𝒅+𝒎𝒄
Logically equivalent to peers one-hop away from each other clique
All peers in clique must contain resource-type of logical address 𝑛0 + 𝑡𝑐
𝑑
LDEPTH Architecture
We define resource as tuple < 𝑅𝑖 , 𝑉 >
𝑅𝑖 : resource type
𝑉: resource value
Each resource type can have many values
For example: 𝑅𝑖 denote resource type songs, 𝑉1, 𝑉2 particular artists
< 𝑅𝑖 , 𝑉1 > will denote songs by artist 𝑉1 ; < 𝑅𝑖 , 𝑉2 > will denote songs by artist 𝑉2
Peer 𝑝 can have multiple resource types
For resource types 𝑅𝑖 and 𝑅𝑗 , peer 𝑝 will be members of groups 𝐺𝑖 and 𝐺𝑗 with different logical addresses
LDEPTH Architecture
At level-1: Transit ring network consisting of max. 𝑑 peers, 𝑃𝑖 , 0 ≤ 𝑖 < 𝑑
Equal to number of distinct resource types
Transit ring network used for efficient data lookup
At level-2: Each 𝑃𝑖 head of group of peers with same resource type 𝑅𝑖
Level-2 peers form complete graph (𝐺𝑖)
Each 𝑃𝑖 in transit network maintains global resource table (GRT)
<Resource Type, Resource Code, Group Head Logical Address>
All communication between node 𝒑𝒊 ∈ 𝑮𝒊 and 𝒑𝒋 ∈ 𝑮𝒋 happens only via nodes in transit ring
G0
G1
Gr-1
Gi
Level 1
P0
P1
Pi
Pr-1
Gi = Group i
Pi = Group Head of G i
Transit Ring Network
Level 2 Networks
Data Lookup
Intra-Group Data Lookup
Data lookup in group 𝐺𝑖 : peer 𝑝𝑎 possessing < 𝑅𝑖 , 𝑉𝑎 > requests resource < 𝑅𝑖 , 𝑉𝑏 >
Peer 𝑝𝑎 sends requests to group head 𝑃𝑖
Group head 𝑃𝑖 broadcasts request for < 𝑅𝑖 , 𝑉𝑏 > in group 𝐺𝑖
Note: 𝐺𝑖 is a complete graph
If ∃𝑝𝑏 with < 𝑅𝑖 , 𝑉𝑏 > , 𝑝𝑏 unicasts < 𝑅𝑖 , 𝑉𝑏 > to requesting node 𝑝𝑎
Data Lookup
Inter-Group Data Lookup: 𝑝𝑖 ∈ 𝐺𝑖 requests resource < 𝑅𝑗 , 𝑉∗ > ∈ 𝐺𝑗
Assume there are currently 𝑟 distinct resource types in network 𝑟 groups on transit ring network
𝑝𝑖 unicasts resource lookup request to its group-head 𝑃𝑖
From GRT: 𝑃𝑖 determines Group Head Logical Address 𝑃𝑗 for group 𝐺𝑗 with resource type 𝑅𝑗
𝑃𝑖 computes ℎ = | 𝑛0 + 𝑖𝑐
𝑑− 𝑛0 + 𝑗
𝑐
𝑑|
If ℎ >𝑟
2, then forward message to predecessor: message moves anti-clockwise on transit ring to reach 𝑃𝑗
Otherwise, forward message to successor: message moves clockwise on transit ring to reach 𝑃𝑗
𝑃𝑗 broadcasts within its group 𝐺𝑗 for resource < 𝑅𝑗 , 𝑉∗ >
If found in some 𝑝𝑗 ∈ 𝐺𝑗, 𝑝𝑗 unicasts < 𝑅𝑗, 𝑉∗ > to 𝑝𝑖
Data Lookup
Complexity
Intra-Group Lookup
O(1) message complexity since each group is a complete graph
Inter-Group Lookup
Bounded by 2 +𝑟
2messages
Independent of number of peers in the P2P network (𝑛)
In existing structured P2P networks like Chord, message complexity is a function of 𝑛
New Resource/Peer Joining
New Peer 𝒑 with existing Resource Type 𝑹𝒊
Node 𝑝 contacts Group-head 𝑃0 of first group 𝐺0
𝑃0 determines address of 𝑃𝑖 (group head for resource type 𝑅𝑖)
𝑃0 unicasts address of 𝑝 to 𝑃𝑖
𝑃𝑖 allocates to 𝑝 next available logical address in 𝐺𝑖 𝑛0 + 𝑖𝑐
𝑑+ 𝑞𝑐
𝑃𝑖 asks all peers 𝑝𝑘 𝜖 𝐺𝑖 to update their routing tables with new peer 𝑝
𝑃𝑖 unicasts to 𝑝 its allotted logical address and list of neighbors in 𝐺𝑖
New Resource/Peer Joining
New Peer 𝒑 with new Resource Type 𝑹𝒕
Assume there are currently 𝑟 distinct resource types in LDEPTH transit ring
last group-head is 𝑃𝑟 with successor 𝑃0 and predecessor 𝑃𝑟−1
Node 𝑝 contacts Group-head 𝑃0 of first group 𝐺0 on transit ring
𝑃0 allocates next available logical address on transit ring to 𝑝 for new resource type 𝑅𝑡 𝑛0 + (𝑟 + 1)𝑐
𝑑 Logical address 𝑃𝑡 = 𝑃𝑟+1
𝑃0 unicasts newly allotted logical address of 𝑝 to 𝑃𝑟
𝑃0 updates its predecessor from 𝑃𝑟 to 𝑃𝑡
𝑃𝑟 updates its successor from 𝑃0 to 𝑃𝑡
𝑃0 broadcasts message to all other group heads to update their GRTs with information of new group 𝐺𝑡
𝑃0 unicasts logical address 𝑃𝑡 to 𝑝
𝑝 becomes group-head 𝑃𝑡 for new group 𝐺𝑡 containing resources of type 𝑅𝑡
New resource type always added after the last group-head 𝑷𝒓
Fault Tolerance
Case 1: Group member (but not group head) crashes or leaves
Group members periodically exchange HELLO packets
If a group member 𝑝 crashes or leaves, neighbors will eventually come to know of it
Other peers in group delete entry for 𝑝 from list of neighbors
Case 2: Group Head crashes or leaves
Each group 𝐺𝑖 maintains a candidate/back-up group head 𝑝𝑖∗
𝑝𝑖∗ chosen as second lowest logical address of 𝐺𝑖 𝑛0 + 𝑖
𝑐
𝑑+ 𝑐
𝑃𝑖 periodically copies its GRT to 𝑝𝑖∗
Group heads on the transit ring network periodically exchange HELLO packets with successor and predecessor peers
Group member exit news doesn’t propagate beyond group
Fault Tolerance
Case 2.1: Group head 𝑃𝑖 leaves
First broadcasts in 𝐺𝑖 that 𝑝𝑖∗ will henceforth be new group head
Informs predecessor 𝑃𝑖−1 and successor 𝑃𝑖+1 of 𝑝𝑖∗’s IP address
Logical address of 𝑝𝑖∗ changed to 𝑛0 + 𝑖
𝑐
𝑑 designated logical address of 𝐺𝑖 ’s group-head
𝑝𝑖∗ chooses a new back-up group head 𝑝𝑖
∗∗ node with logical address 𝑛0 + 𝑖
𝑐
𝑑+ 2𝑐
Case 2.2: Group head 𝑃𝑖 fails
Peers 𝑃𝑖−1, 𝑃𝑖+1 on transit ring, and back-up group-head 𝑝𝑖∗ learns about failure eventually
𝑝𝑖∗ broadcasts in 𝐺𝑖 that 𝑝𝑖
∗ will henceforth be new group head
𝑝𝑖∗ informs predecessor transit ring predecessor 𝑃𝑖−1 and successor 𝑃𝑖+1 of 𝑝𝑖
∗’s new status & IP address
𝑝𝑖∗ chooses a new back-up group head 𝑝𝑖
∗∗ 𝑛0 + 𝑖
𝑐
𝑑+ 2𝑐
Group Head exit updates restricted to group peers, and transit ring predecessor & successor nodes
Conclusion
Proposed new 2-level hierarchical structured P2P network architecture
LDE computationally lightweight as compared to existing DHT based P2P networks
Efficient intra and inter group data/resource look-up algorithms
Message complexity independent of number of nodes in P2P network
Efficient algorithms proposed for new resources/nodes joining network
Efficient handling of peers leaving/failing
Updates restricted only to group members and transit ring successor & predecessor nodes
Thank You