Joohwan ¡Kim ¡and ¡R. ¡Srikant ¡ ¡
- Dept. ¡of ¡Electrical ¡and ¡Computer ¡Engineering ¡and ¡ ¡
Coordinated ¡Science ¡Lab ¡ University ¡of ¡Illinois ¡at ¡Urbana-‑Champaign ¡
1 ¡
Joohwan Kim and R. Srikant Dept. of Electrical and - - PowerPoint PPT Presentation
Joohwan Kim and R. Srikant Dept. of Electrical and Computer Engineering and Coordinated Science Lab University of Illinois at Urbana-Champaign 1
1 ¡
Consider ¡N ¡nodes: ¡1,2,…, ¡𝑂. ¡ ¡ Create ¡a ¡directed ¡cycle ¡by ¡randomly ¡permuFng ¡the ¡nodes. ¡ Create ¡another ¡independent ¡cycle ¡ Max ¡distance ¡between ¡any ¡pair ¡of ¡nodes ¡in ¡each ¡cycle: ¡𝑃(𝑂) ¡
¡ ¡
2 ¡
8
2 ¡
7 1
10 ¡
6 ¡
4 9 5
12 ¡
3
11 ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Consider ¡the ¡superposed ¡graph ¡of ¡the ¡two ¡cycles ¡
¡
Distance ¡between ¡any ¡pair ¡of ¡two ¡nodes? ¡
Answer: ¡𝑃(log𝑂 ) ¡ ¡(Kim ¡and ¡Wormald, ¡2001) ¡
3 ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Remove ¡each ¡RED ¡edge ¡with ¡some ¡probability ¡(say ¡½). ¡
¡ ¡
Maximum ¡distance ¡from ¡node ¡1 ¡to ¡all ¡nodes? ¡
Answer: ¡𝑃(log𝑂 ) ¡with ¡high ¡probability ¡
4 ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Minimal ¡centralized ¡support ¡
Superposi#on ¡of ¡random ¡Hamiltonian ¡cycles ¡(even ¡
Two ¡ways ¡to ¡construct ¡Hamiltonian ¡cycles ¡
5 ¡
Client-‑Server ¡ Peer-‑to-‑Peer ¡
𝑂 ¡clients ¡
6 ¡
Required ¡bandwidth ¡for ¡P2P ¡streaming ¡does ¡not ¡grow ¡with ¡the ¡network ¡size! ¡
P2P ¡File-‑sharing ¡
Big ¡file ¡→ ¡MulFple ¡chunks. ¡ ObjecFve: ¡Collect ¡all ¡the ¡chunks ¡ ¡ Gnutella, ¡BitTorrent, ¡etc. ¡
In ¡this ¡talk: ¡P2P ¡Streaming ¡
Source ¡peer ¡: ¡generates ¡chunks ¡of ¡real-‑Fme ¡content ¡ ¡sequenFally ¡ ObjecFve: ¡Play ¡out ¡chunks ¡sequenFally ¡with ¡low ¡delay ¡ PPLive, ¡CoolStreaming, ¡etc. ¡
7 ¡
1
Streaming ¡delay: ¡Fme ¡taken ¡for ¡a ¡chunk ¡to ¡be ¡disseminated ¡
from ¡the ¡source ¡to ¡all ¡peers ¡
Buffering ¡to ¡miFgate ¡out ¡of ¡sequence ¡delivery ¡of ¡chunks ¡
OpFmal ¡streaming ¡delay? ¡How ¡to ¡achieve ¡this? ¡
2
8 ¡
Playout ¡buffer ¡of ¡a ¡Peer ¡ 1 2 3 4 playout ¡ Broadcaster ¡ (Source) ¡ 3 4 5
6
We ¡want ¡each ¡peer ¡to ¡have ¡a ¡small ¡number ¡of ¡neighbors ¡with ¡
whom ¡it ¡interacts ¡
QuesFons: ¡
neighbors? ¡
to ¡peer ¡churn ¡(arrivals, ¡departures ¡of ¡peers)? ¡ ¡
Goal: ¡Design ¡an ¡algorithm ¡that ¡can ¡achieve ¡high ¡throughput, ¡
low ¡delay, ¡and ¡is ¡robust ¡to ¡peer ¡churn. ¡
9 ¡
Every ¡peer ¡(including ¡the ¡source) ¡has ¡at ¡most ¡two ¡children ¡and ¡
two ¡parents. ¡
Two ¡outgoing ¡edges ¡(Blue ¡and ¡Red) ¡per ¡peer ¡ Two ¡incoming ¡edges ¡(Blue ¡and ¡Red) ¡per ¡peer ¡
Neighborhood ¡is ¡updated ¡locally ¡in ¡response ¡to ¡peer ¡churn. ¡
10 ¡
v ¡ Children ¡ Parents ¡
(Law-‑Siu ¡2003) ¡When ¡a ¡new ¡peer ¡arrives, ¡the ¡peer ¡
1.
Independently ¡chooses ¡one ¡BLUE ¡edge ¡and ¡one ¡RED ¡edge ¡ uniformly ¡at ¡random. ¡(Using ¡a ¡tracker) ¡
2.
Breaks ¡into ¡the ¡edges. ¡
11 ¡
1 2 1 2
Blue ¡Layer ¡ Red ¡Layer ¡
3 3
When ¡a ¡new ¡peer ¡arrives, ¡the ¡peer ¡
1.
Independently ¡chooses ¡one ¡BLUE ¡and ¡one ¡RED ¡edge ¡uniformly ¡ at ¡random. ¡(Note: ¡needs ¡a ¡tracker) ¡
2.
Breaks ¡into ¡the ¡edges. ¡
12 ¡
1 2 1 2
Blue ¡Layer ¡ Red ¡Layer ¡
3 3 4 4
When ¡an ¡exisFng ¡peer ¡leaves, ¡ ¡
Its ¡parent ¡in ¡each ¡layer ¡contacts ¡its ¡child ¡directly. ¡ They ¡repair ¡the ¡pairing. ¡
Takes ¡advantange ¡of ¡peer ¡churn ¡
13 ¡
1 1 2 2
Blue ¡Layer ¡ Red ¡Layer ¡
3 3 4 4
BLUE ¡and ¡RED ¡layers ¡are ¡cycles ¡with ¡independently ¡permuted ¡
¡
14 ¡
8
2 ¡
7 1
10 ¡
6 ¡
4 9 5
12 ¡
3
11 ¡
Blue ¡Layer ¡ Red ¡Layer ¡ ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Recall ¡that ¡mulFmedia ¡content ¡is ¡generated ¡in ¡the ¡form ¡of ¡
chunks ¡ ¡
At ¡each ¡Fme ¡instant, ¡a ¡peer ¡has ¡a ¡subset ¡of ¡the ¡chunks ¡
generated ¡so ¡far. ¡It ¡has ¡to ¡make ¡two ¡decisions: ¡
Neighbor ¡selecFon: ¡It ¡has ¡to ¡pick ¡a ¡neighbor ¡to ¡which ¡it ¡will ¡
upload ¡one ¡of ¡its ¡chunks ¡
Chunk ¡SelecFon: ¡It ¡has ¡to ¡decide ¡which ¡chunk ¡to ¡upload ¡
Chunk ¡DisseminaFon: ¡Neighbor ¡selecFon ¡+ ¡Chunk ¡selecFon ¡
15 ¡
Each ¡peer ¡can ¡upload ¡ ¡one ¡chunk ¡per ¡Fme ¡slot ¡to ¡one ¡of ¡its ¡
neighbors ¡ ¡
If ¡there ¡are ¡N ¡peers ¡in ¡the ¡network, ¡the ¡total ¡upload ¡capacity ¡is ¡
N ¡chunks ¡per ¡Fme ¡slot ¡
This ¡upload ¡capacity ¡must ¡be ¡used ¡to ¡serve ¡N ¡peers. ¡So ¡max ¡
streaming ¡rate ¡possible ¡is ¡𝑂/𝑂 =1 ¡
We ¡will ¡first ¡present ¡an ¡algorithm ¡which ¡achieves ¡a ¡streaming ¡
rate ¡of ¡1/2 . ¡
16 ¡
One ¡chunk ¡arrives ¡at ¡the ¡source ¡during ¡every ¡two ¡Fmeslots ¡
Arrival ¡rate ¡at ¡source ¡= ¡1/2 ¡
¡
Every ¡peer ¡(including ¡the ¡source) ¡alternates ¡between ¡
transmilng ¡over ¡the ¡BLUE ¡edge ¡and ¡ ¡the ¡RED ¡edge: ¡
Transmits ¡the ¡latest ¡chunk ¡over ¡the ¡selected ¡edge. ¡
17 ¡
v ¡
1 2 3 4 2 2 2
Under ¡our ¡pairing ¡and ¡disseminaFon ¡algorithm: ¡
Streaming ¡rate ¡= ¡1/2 ¡
Each ¡chunk ¡is ¡eventually ¡disseminated ¡to ¡all ¡peers. ¡
𝑃(log𝑂 ) ¡delay ¡with ¡high ¡probability. ¡ ¡
Each ¡chunk ¡is ¡disseminated ¡to ¡all ¡peers ¡within ¡𝑃(log𝑂 ) ¡
Fmeslots ¡
¡
18 ¡
¡
Fmeslot ¡𝑢 ¡by ¡a ¡peer, ¡then ¡the ¡peer ¡must ¡have ¡received ¡ chunk ¡𝑙−1 ¡by ¡Fmeslot ¡𝑢−2. ¡ ¡
receives ¡a ¡new ¡chunk ¡within ¡2𝑒 ¡Fmeslots. ¡
19 ¡
1 3 5
Proof ¡by ¡InducFon ¡
¡
Depth=3 ¡hops ¡ Source ¡ 1 2 3 1 2 1 2 1 2 3 2 4 6 1 2 1 2 1 1 2 1 1 1 1 1 1
within ¡3 ¡hops ¡by ¡Fmeslot ¡7. ¡ ¡
¡Each ¡chunk ¡is ¡transmiped ¡over ¡both ¡blue ¡and ¡red ¡edges ¡
¡So ¡we ¡need ¡to ¡compute ¡the ¡shortest ¡distance ¡from ¡the ¡source ¡to ¡
a ¡peer ¡in ¡the ¡superposed ¡graph ¡of ¡red ¡and ¡blue ¡edges ¡
¡Recall ¡that ¡if ¡the ¡max ¡depth ¡= ¡𝑃(log𝑂 ), ¡delay ¡= ¡𝑃(log𝑂 ) ¡
21 ¡
Is ¡the ¡max ¡depth ¡= ¡𝑃(log𝑂 )? ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Cut-‑set(S, ¡Sc) ¡: ¡set ¡of ¡edges ¡that ¡go ¡out ¡
from ¡the ¡peers ¡in ¡set ¡𝑇. ¡
Conductance ¡of ¡cut ¡(𝑇,𝑇↑𝑑 ): ¡ ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡𝜒(𝑇)≜|𝑑𝑣𝑢−𝑡𝑓𝑢(𝑇,𝑇↑𝑑 )|/ min┬ {|𝑇|, ¡|𝑇↑𝑑 |} ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡𝜒↑∗ =min┬(𝑇,𝑇↑𝑑 ) 𝜒 (𝑇) ¡ ¡ Theorem: ¡ ¡There ¡exists ¡𝜔>0 ¡ ¡such ¡that ¡𝜒↑∗ >𝜔 ¡with ¡high ¡ probability ¡(w.h.p.) ¡ ¡
The ¡number ¡of ¡nodes ¡in ¡𝑇↑𝑑 ¡connected ¡to ¡𝑇 ¡is ¡at ¡least ¡𝜔|𝑇|/2 ¡ ¡
22 ¡
|𝑑𝑣𝑢−𝑡𝑓𝑢(𝑇,𝑇↑𝑑 )|=4 ¡ 𝑇 ¡ 𝑇↑𝑑 ¡
(1+𝜔′)↑ℎ ¡peers ¡within ¡ℎ ¡hops ¡from ¡the ¡first ¡𝑙 ¡peers. ¡ Θ(log𝑂 ) ¡steps ¡to ¡cover ¡𝑂/2 ¡peers! ¡
23 ¡
𝑙 ¡peers ¡ 𝜔′⋅𝑙 ¡ ¡ peers ¡ ¡ (1+𝜔′)𝑙 ¡peers ¡ 𝜔′(1+𝜔′) ¡𝑙 ¡ ¡ peers ¡ (1+𝜔′)↑2 𝑙 ¡peers ¡
¡
¡
24 ¡
¡
¡
25 ¡
Two ¡chunks ¡arrives ¡at ¡the ¡source ¡during ¡every ¡three ¡Fmeslots ¡
Odd ¡chunks ¡and ¡even ¡chunks ¡ Arrival ¡rate ¡at ¡source ¡= ¡2/3 ¡
¡
Every ¡peer ¡(including ¡the ¡source) ¡cycles ¡through ¡(blue, ¡blue, ¡red) ¡
edges ¡and ¡transmits ¡the ¡latest ¡(odd, ¡even, ¡𝜓↓𝑤 ) ¡chunk. ¡ ¡
𝜓↓𝑤 ¡is ¡random ¡: ¡Odd ¡or ¡Even ¡on ¡Red ¡edge ¡
Different ¡for ¡each ¡peer, ¡but ¡fixed ¡once ¡selected ¡
26 ¡
7
O E O E O E Neighbor ¡SelecFon: ¡ ¡B, ¡B, ¡R, ¡ ¡ ¡B, ¡B, ¡R, ¡ ¡B, ¡B, ¡R ¡ 𝜓↓7 =Even ¡
3
B, ¡B, ¡R, ¡ ¡ ¡B, ¡B, ¡R, ¡ ¡B, ¡B, ¡R ¡ O, ¡E,O, ¡ ¡ ¡O, ¡E,O, ¡ ¡O, ¡E, ¡O ¡ 𝜓↓3 =Odd ¡ Chunk ¡SelecFon: ¡ ¡ ¡ ¡O, ¡E, ¡E, ¡ ¡ ¡O, ¡E, ¡E, ¡ ¡O, ¡E, ¡E ¡
Odd ¡(Even) ¡Graph ¡
Graph ¡only ¡with ¡the ¡edges ¡delivering ¡Odd ¡(Even) ¡chunks ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8 8
2 ¡
7 1
10 ¡
6 ¡
4 9 5
12 ¡
3
11 ¡
Blue ¡Layer ¡ Red ¡Layer ¡with ¡𝜓 ¡values ¡ E ¡ E ¡ E ¡ E ¡ E ¡ E ¡ E ¡ O ¡ O ¡ O ¡ O ¡ O ¡
27 ¡
4
12 ¡
1 9
3 ¡
10 ¡
7 ¡
6 2
11 ¡
5 8
Odd ¡Graph ¡
Even ¡Graph ¡
Draw ¡BLUE ¡and ¡RED ¡edges ¡itera#vely. ¡ ¡ On ¡average, ¡each ¡node ¡
generates ¡ ¡less ¡than ¡1.5 ¡new ¡ nodes ¡ ¡
𝑎(𝑢) ¡: ¡Set ¡of ¡nodes ¡generated ¡
by ¡iteraFon ¡𝑢. ¡
Includes ¡the ¡children ¡of ¡the ¡𝑢 ¡ closest ¡peers ¡to ¡node ¡1 ¡
¡
28 ¡
12 ¡ 4 ¡ 3 ¡ 2 ¡ 9 ¡ 6 ¡ 8 ¡ 1 ¡
Source ¡
5 ¡
11 ¡ 6 ¡closest ¡ peers ¡ 𝑎(6) ¡
Recursive ¡form ¡of ¡𝐹[ ¡|𝑎(𝑢)| ¡] ¡
𝐶(𝑢−1) ¡={Blue ¡edges ¡drawn ¡by ¡iteraFon ¡t-‑1} ¡ 𝑆(𝑢−1) ¡={Red ¡edges ¡drawn ¡by ¡iteraFon ¡t-‑1} ¡
¡
𝐹[ ¡𝑂−|𝑎(𝑢)| ¡|𝐶(𝑢−1), ¡𝑆(𝑢−1) ¡]=𝑂−𝑢−1/𝑂−𝑢 (1−1/2(𝑂−1−|𝑆(𝑢 −1)|) )(𝑂−|𝑎(𝑢−1)|) ¡
[Expression ¡for ¡|Z(t)|] ¡ ¡For ¡1≤𝑢≤𝑂−1, ¡
¡ ¡ ¡ ¡𝐹[ ¡|𝑎(𝑢)| ¡]=1/2(𝑂−1) (3(𝑂−1)𝑢−𝑢↑2 )+1. ¡
29 ¡
𝐹[ ¡|𝑎(𝑢)| ¡]>(1+𝜔) ¡𝑢 ¡ ¡for ¡some ¡𝜔∈(0,1/4 ) ¡and ¡𝑢≤1/2 (𝑂−1) ¡ ¡ ¡
¡
Is ¡|𝑎(𝑢)|>(1+𝜔) ¡𝑢 ¡ ¡with ¡high ¡
¡ ¡with ¡high ¡ probability? ¡
[ConcentraFon ¡Result] ¡ ¡
For ¡any ¡𝜔∈(0,1/4 ), ¡there ¡exists ¡𝜏>0 ¡such ¡that ¡|𝑎(𝑢)|>(1+𝜔)𝑢 ¡ with ¡prob. ¡1−𝑃(exp(−𝜏𝑢) ) ¡
30 ¡
𝑢 ¡closest ¡ peers ¡ |𝑎(𝑢)|−𝑢 ¡ ¡ peers ¡
(1+𝜔)↑ℎ ¡peers ¡within ¡ℎ ¡hops ¡from ¡the ¡first ¡𝑙 ¡peers. ¡ Θ(log𝑂 ) ¡steps ¡to ¡cover ¡𝑂/2 ¡peers! ¡
31 ¡
𝑙 ¡closest ¡ peers ¡ 𝜔⋅𝑙 ¡ ¡ peers ¡ ¡ (1+𝜔)𝑙 ¡peers ¡ 𝜔(1+𝜔) ¡𝑙 ¡ ¡ peers ¡ (1+𝜔)↑2 𝑙 ¡peers ¡
Why ¡use ¡only ¡two ¡parents ¡and ¡two ¡children? ¡
The ¡result ¡works ¡for ¡any ¡number ¡of ¡parents ¡and ¡children ¡
Small ¡number ¡of ¡neighbors ¡means ¡that ¡the ¡overhead ¡is ¡low ¡ More ¡neighbors ¡leads ¡to ¡a ¡more ¡robust ¡network ¡
32 ¡
¡
Two ¡directed ¡binary ¡trees ¡rooted ¡at ¡the ¡source ¡ Each ¡peer ¡must ¡be ¡an ¡internal ¡node ¡in ¡only ¡one ¡tree. ¡ Throughput ¡opFmal; ¡Depth ¡and ¡delay: ¡𝑃(log𝑂 ) ¡ Centralized ¡control ¡to ¡maintain ¡the ¡trees. ¡Vulnerable ¡to ¡
peer ¡churn. ¡
33 ¡
3 1 2 4 5 6 7 8 9 10 11 12 13 14 15
s
1 / 2 1 / 2 1 / 2
s
1 / 2 1 / 2 1 / 2 8 9 10 11 12 13 14 1 2 3 4 5 6 7 15
ConstrucFon ¡of ¡throughput-‑opFmal ¡overlay ¡trees ¡
Edge ¡capacitated ¡networks ¡
[Chu, ¡Liu ¡‘65] ¡[Edmonds ¡‘67] ¡[Tarjan ¡‘77] ¡
¡
Node ¡capacitated ¡networks ¡without ¡degree ¡bound ¡
[Li, ¡Chou, ¡Zhang ¡‘05] ¡, ¡[Ross, ¡Liu, ¡Kumar ¡‘07], ¡[Mundinger, ¡Weber ¡‘08] ¡
¡
Node ¡capacitated ¡networks ¡with ¡constant ¡neighborhood ¡size ¡
Snowball ¡Algo. ¡[Liu, ¡Zhang-‑Shen, ¡Jiang, ¡Rexford, ¡Chiang ¡‘08] ¡ Bubble ¡Algo. ¡[Liu, ¡Chen, ¡Sengupta, ¡Chiang, ¡Li, ¡Chou ¡‘10] ¡
34 ¡
Unstructured ¡Peer-‑to-‑Peer ¡networks ¡
CoolStreaming ¡[Zhang, ¡Liu, ¡Li, ¡Yum ¡05] ¡
Random ¡neighborhood ¡selecFon ¡
Throughput ¡opFmal ¡in ¡a ¡sparse ¡graph ¡[Zhao, ¡Lin, ¡Wu ¡11] ¡
Neighborhood ¡size ¡= ¡Θ(log𝑂 ) ¡ Delay ¡opFmality ¡is ¡not ¡assured ¡ ¡
OpFmal ¡delay ¡in ¡a ¡complete ¡graph ¡: ¡Θ(log𝑂) ¡ ¡
Single ¡chunk ¡disseminaFon ¡ ¡(gossip) ¡: ¡Θ(log𝑂) ¡delay ¡
[Frieze ¡and ¡Grimmep, ¡‘85] ¡
MulFple ¡chunk ¡disseminaFon ¡(streaming) ¡: ¡Θ(log𝑂) ¡delay ¡
Latest-‑blind ¡algorithm: ¡(1−𝑓↑−1 ) ¡opFmal ¡capacity ¡
¡[Sanghavi, ¡Hajek, ¡Massoulie ¡‘07]. ¡
Latest-‑useful ¡algorithm: ¡Almost ¡opFmal ¡capacity ¡ ¡
[Bonald, ¡Massoulie, ¡Mathieu, ¡Perino, ¡Twigg ¡‘10] ¡. ¡
35 ¡
36 ¡