A configuration method for structured P2P overlay network considering delay variations
Resource Discovery for the Web Platform using a P2P Overlay Network with WebRTC as the layer of...
-
Upload
david-dias -
Category
Technology
-
view
137 -
download
2
Transcript of Resource Discovery for the Web Platform using a P2P Overlay Network with WebRTC as the layer of...
HI, I’M DAVID://daviddias.me://blog.daviddias.me://github.com/diasdavid://twitter.com/daviddias
RESOURCE DISCOVERY FOR THE WEB PLATFORM ON TOP OF A P2P
OVERLAY NETWORK USING WEBRTC AS THE LAYER OF TRANSPORT
P2P networks are only as useful as their Resource Discovery capabilities remain efficient when they scale up
• march 2000, Justin Frankel and Tom Pepper
• topology is completely random
• routing and search using flooding with TTL and hop counter
• really slow
• lot’s of signalling traffic
• DHT
• Highly scalable
• Each node only knows of m number of other nodes
• Each node has a unique identifier
• Each node is responsible for a segment of the data
• Ids are 160 bits (SHA-1 for Uniform Distribution)
• CHORD is awesome
start interval sucessor
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ m
interval(k) = start(k) = start(k+1)
sucessor - first node after start(k)
0
1
2
3
4
5
6
7
start interval sucessor
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
0
1
2
3
4
5
6
7
start interval sucessor1
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*1-1) mod 23 ,(0+2*2-1) mod 23) =[1,2)
0
1
2
3
4
5
6
7
start interval sucessor1 [1,2) 1
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*1-1) mod 23 ,(0+2*2-1) mod 23) =
0
1
2
3
4
5
6
7
start interval sucessor1 [1,2) 12
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*2-1) mod 23 ,(0+2*3-1) mod 23)
0
1
2
3
4
5
6
7
start interval sucessor1 [1,2) 12 [2,4) 3
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*2-1) mod 23 ,(0+2*3-1) mod 23)
0
1
2
3
4
5
6
7
start interval sucessor1 [1,2) 12 [2,4) 34
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*3-1) mod 23 ,(0+2*4-1) mod 23)
0
1
2
3
4
5
6
7
start interval sucessor1 [1,2) 12 [2,4) 34 [4,0) 6
start(k) = (n+2k-1) mod 2m, 1 ≤ k ≤ minterval(k) = [start(k), start(k+1) )sucessor - first node after start(k)
interval(k) = [(0+2*3-1) mod 23 ,(0+2*4-1) mod 23)
• Chord inspired P2P overlay network designed for the Web Platform
• Uses CHORD routing scheme
• Uses WebRTC for transport
• WebSockets for Signalling
• Peers (browsers) route messages amongst them
• 48 bits Ids
• Brings a full DHT to the browser
WEBRTC-EXPLORER
WEBRTC-RINGhttp://blog.daviddias.me/2014/12/20/webrtc-ring
var Explorer = require(‘webrtc-explorer’);
var config = { signalingURL: '<url>'};
var peer = new Explorer(config);
peer.events.on(‘registered', function(data) { console.log('Id:', data.peerId);});
peer.events.on('ready', function() { console.log('ready to send messages');});
peer.events.on('message', function(envelope) { console.log(envelope);});
peer.register();
//peer.send(‘<dst_id>’, <data_to_send>);
s-register
c-registered{
id: “<this_node_id>”}
1
2
PAPERS• A study on peer-to-peer based discovery of grid resource information by
Rajiv Ranjan, Aaron Harwood, Rajkumar Buyya
• Peer-to-peer architecture case study: Gnutella network by M. Ripeanu
• Dynamo : Amazon ’ s Highly Available Key-value Store by Giuseppe DeCandia, Deniz Hastorun, Madan Jampani, Gunavardhan Kakulapati, Avinash Lakshman, Alex Pilchin, Swaminathan Sivasubramanian, Peter Vosshall, Werner Vogels
• The Gnutella Protocol Specification v0.6 by Tor Klingberg, Raphael Manfredi
• Chord : A Scalable Peer-to-peer Lookup Service for Internet by Ion Stoica, Robert Morris, David Karger, M Frans Kaashoek, Hari Balakrishnan Ý