A Distributed and Oblivious Heap Christian Scheideler and Stefan Schmid Dept. of Computer Science University of Paderborn
Dec 17, 2015
A Distributed and Oblivious Heap
Christian Scheideler and Stefan SchmidDept. of Computer Science
University of Paderborn
Motivation
P2P systems: significant amount of attention.
Holy grail: P2P systems that are highly scalable and robust
Internet
Motivation
P2P systems face many threats:stop/fail attacks, join/leave attacks, Eclipse attacks, Sybil attacks, Denial-of-Service attacks, content pollution,…
Internet
Sybil Attacks
Goal: flood network with fake peers
Effect: disconnect good peers, drop messages, drop or manipulate data,…
Internet
Sybil Attacks
Previous solutions:• Douceur 02: Use trusted authority to limit generation of
identities• Bazzi et al. 05/06: Limit identities created at a particular
location (e.g., within an ISP) of the Internet• Danezis et al. 05, Yu et al. 06: Network based on social
contacts• Margolin & Levine 07: Game theoryGeneral approach: add constraintsOur approach: working P2P network despite Sybil attacks
Our Approach
Similar to preferential attachment graphs.
Hope: peers already in the system when Sybil attack starts are not affected by it.
28
232126
18 17 2019
169
10 3
Network Entry Point
How to connect to older peers?
Naive solution:
Connection to d older peers chosen uniformly at random:
• How to join and leave efficiently?• Not a self-routing topology!Better: distributed heap based on de Bruijn graph
145 3 2
Dynamic de Bruijn Network
Classical network theory: family of graphs
Example: d-dim. de Bruijn graph G=(V,E)• V = {0,1}d
• E = { {x,y} | x=(x1,…,xd), y=(b,x1,…,xd-1), for some b{0,1} }
We need: dynamic form of de Bruijn graph (nodes join and leave)
00
01
10
11
Dynamic de Bruijn Network
Example: d-dim. de Bruijn graph G=(V,E)• V = {0,1}d
• E = { {x,y} | x=(x1,…,xd), y=(b,x1,…,xd-1), for some b{0,1} }
• Represent (x1,…,xd) as 0.x1 x2…xd [0,1), e.g. 0.101 = 1(1/2) + 0(1/4) + 1(1/8)
• Let d
Dynamic de Bruijn Network
Example: d-dim. de Bruijn graph G=(V,E)• V = {0,1}d
• E = { {x,y} | x=(x1,…,xd), y=(b,x1,…,xd-1), for some b{0,1} }
Result for d:• V = [0,1)• E = { {x,y}[0,1)2 | y=x/2 or y=(1+x)/2 }
Dynamic de Bruijn Network
Continuous de Bruijn graph:• V = [0,1)• E = { {x,y}[0,1)2 | y=x/2 or y=(1+x)/2 }
0 1
For any two regions R, R´: {x,y}E: (x,y)RxR´ or (x,y)R´xR: each peer in R to all older peers in R´• cut [0,1) into regions of same size • assign peers to random points in [0,1)
RR´
Dynamic de Bruijn Network
Continuous de Bruijn graph:• V = [0,1)• E = { {x,y}[0,1)2 | y=x/2 or y=(1+x)/2 }
0 1
Dilemma: for any fixed region size EITHER : no neighbors OR : too many neighbors
SHELL
For every node v:• v has forward edges to older peers in its home region and
de Bruijn regions• v has backward edges to all peers that have forward edges
to it• Level of v is the lowest s.t. v´s home region contains at
least c log nv older nodes in this and higher levels(nv: total # nodes older than v) (How does v know?)
Forward degree: O(log n), backward degree: O(log2 n)(w.h.p., based on random positions of peers)
SHELL
Routing between two peers v and w:1. use deBruijn routing along forward edges till region of
w reached2. descend along backward edges till w reached
v
w
1.
2.
SHELL
Routing between two nodes v and w:1. use deBruijn routing along forward edges till region of
w reached2. descend along backward edges till w reached
v1.
forward edgeyoungest peer
SHELL
Routing between two nodes v and w:1. use deBruijn routing along forward edges till region
of w reached2. descend along backward edges till w reached
Nice properties:• Only nodes visited that are at least as old as v and w• When every node v sends packet to random w,
congestion at most O(log2 n) w.h.p.
SHELL
Join(v):1. find right region in right level prescribed by order nv and
random point assigned to vO(log n) time w.h.p. (use routing)
2. integrate v into SHELL and adapt regions of neighbors (if needed)O(1) time, O(log2 n) work w.h.p. (for general heap)
v
w Expected O(1) lifts per levelO(log n) work per lift w.h.p.
Join/leave verkehrt!!
SHELL
Leave(v):• Remove v from SHELL and adapt regions of
neighbors (if needed)O(1) time, O(log2 n) work w.h.p.
vw
Expected O(1) drops per levelO(log n) work per drop w.h.p.
SHELL
Problem: node v needs to estimate its order nv
(i.e. # nodes older than v)Solution:• B(j): number of nodes in home region of v in
level j that are older than v• v finds largest j so that j < B(j)/c – log B(j)
Chosen level deviates by 1 from ideal level w.h.p.
Distributed Heaps
Concurrent heaps:• Shavit & Zemach 99: skip queue• Shavit & Zemach 00: funnel treenot applicable in our context
Distributed heaps:• Bhargava et al. 04: PAGODA
join/leave: O(log2 n) time and work
Main Results
Theorem: For any Sybil attack after step t0, all peers that were in the SHELL system before t0 can still perform reliable and efficient routing (and based on that, also data management).
SHELL can also be applied as scalable, low-congestion network for peers with arbitrary bandwidths.