A WebRTC DHT. Andres Ledesma (UCY) in cooperation with Mikael (Peerialism).

Similar documents
R/Kademlia: Recursive and Topology-aware Overlay Routing

Kademlia: A P2P Informa2on System Based on the XOR Metric

Problems in Reputation based Methods in P2P Networks

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. File Sharing

Overlay networks. To do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. Turtles all the way down. q q q

GNUnet Distributed Data Storage

TinyTorrent: Implementing a Kademlia Based DHT for File Sharing

BitTorrent. Masood Khosroshahy. July Tech. Report. Copyright 2009 Masood Khosroshahy, All rights reserved.

Peer-to-Peer Internet Applications: A Review

Leveraging Social Links for Trust and Privacy

Telematics Chapter 9: Peer-to-Peer Networks

Peer-to-peer systems and overlay networks

P2PSIP, ICE, and RTCWeb

Overlay networks. T o do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. q q q. Turtles all the way down

Scalability In Peer-to-Peer Systems. Presented by Stavros Nikolaou

Kademlia: A peer-to peer information system based on XOR. based on XOR Metric,by P. Maymounkov and D. Mazieres

Faster Content Access in KAD

Survey of DHT Evaluation Methods

P2PNS: A Secure Distributed Name Service for P2PSIP

Abstract /08/$ IEEE 601

internet technologies and standards

Overview Computer Networking Lecture 16: Delivering Content: Peer to Peer and CDNs Peter Steenkiste

Overlay networks. Today. l Overlays networks l P2P evolution l Pastry as a routing overlay example

Peer-to-peer computing research a fad?

Distributed Hash Tables

Searching in variably connected P2P networks

08 Distributed Hash Tables

Adaptive Server Allocation for Peer-assisted VoD

A Peer-To-Peer-based Storage Platform for Storing Session Data in Internet Access Networks

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

PeerfactSim.KOM: A Simulation Framework for Peer-to-Peer Systems

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

Dynamic Search Algorithm in P2P Networks

CIS 700/005 Networking Meets Databases

Module SDS: Scalable Distributed Systems. Gabriel Antoniu, KERDATA & Davide Frey, ASAP INRIA

MULTI-DOMAIN VoIP PEERING USING OVERLAY NETWORK

Distributed Hash Tables

15-744: Computer Networking P2P/DHT

PERFORMANCE ANALYSIS OF R/KADEMLIA, PASTRY AND BAMBOO USING RECURSIVE ROUTING IN MOBILE NETWORKS

Architectures for Distributed Systems

Hello everyone. My name is Kundan Singh and today I will describe a project we did at Avaya Labs.

On Minimizing Packet Loss Rate and Delay for Mesh-based P2P Streaming Services

CRESCENDO GEORGE S. NOMIKOS. Advisor: Dr. George Xylomenos

Distributed Hash Table

Flooded Queries (Gnutella) Centralized Lookup (Napster) Routed Queries (Freenet, Chord, etc.) Overview N 2 N 1 N 3 N 4 N 8 N 9 N N 7 N 6 N 9

P2P Network Structured Networks: Distributed Hash Tables. Pedro García López Universitat Rovira I Virgili

Peer-to-Peer Systems and Security

Web caches (proxy server) Applications (part 3) Applications (part 3) Caching example (1) More about Web caching

Distributed Systems. 16. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2017

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Peer-To-Peer Techniques

A Multilingual Video Chat System Based on the Service-Oriented Architecture

(Im)possibility of Enumerating Zombies. Yongdae Kim (U of Minnesota - Twin Cities)

Peer-to-Peer Systems and Security IN2194. Chapter 1 Peer-to-Peer Systems 1.3 Structured Networks

Democratizing Content Publication with Coral

Blockchains and the Web

Exploiting KAD: Possible Uses and Misuses

PUB-2-SUB: A Content-Based Publish/Subscribe Framework for Cooperative P2P Networks

Motivation. The Impact of DHT Routing Geometry on Resilience and Proximity. Different components of analysis. Approach:Component-based analysis

Unit 8 Peer-to-Peer Networking

The Impact of DHT Routing Geometry on Resilience and Proximity. Acknowledgement. Motivation

Introduction to Peer-to-Peer Systems

CompSci 356: Computer Network Architectures Lecture 21: Overlay Networks Chap 9.4. Xiaowei Yang

Overview. Peer-to-Peer Systems and Security IN2194. Chapter 1 Peer-to-Peer Systems 1.3 Structured Networks. Motivation. Routing on the Internet

CS 43: Computer Networks BitTorrent & Content Distribution. Kevin Webb Swarthmore College September 28, 2017

Motivation and goal Design concepts and service model Architecture and implementation Performance, and so on...

Considerations for deploying a geographically distributed video conferencing system

Introduction to P2P Computing

Distributed Systems. 17. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2016

Searching for Shared Resources: DHT in General

Winter CS454/ Assignment 2 Instructor: Bernard Wong Due date: March 12 15, 2012 Group size: 2

IN recent years, the amount of traffic has rapidly increased

A Directed-multicast Routing Approach with Path Replication in Content Addressable Network

Survive Under High Churn in Structured P2P Systems: Evaluation and Strategy

Goals. EECS 122: Introduction to Computer Networks Overlay Networks and P2P Networks. Solution. Overlay Networks: Motivations.

Simulation of the Impact of Packet Errors on the Kademlia Peer-to-Peer Routing

Searching for Shared Resources: DHT in General

Overlay Networks for Multimedia Contents Distribution

Krowd: A Key-Value Store for Crowded Venues

The Design and Implementation of a Next Generation Name Service for the Internet (CoDoNS) Presented By: Kamalakar Kambhatla

BitTorrent and CoolStreaming

Architectural Approaches for Social Networks. Presenter: Qian Li

S/Kademlia: A Practicable Approach Towards Secure Key Based Routing

Effects of Churn on Structured P2P Overlay Networks

Lecture 6: Overlay Networks. CS 598: Advanced Internetworking Matthew Caesar February 15, 2011

Providing File Services using a Distributed Hash Table

INF5070 media storage and distribution systems. to-peer Systems 10/

: Scalable Lookup

Peer 2 Peer Massively Multiuser VEs. Patrice Torguet Université Paul Sabatier

Oracle Communications WebRTC Session Controller

Democratizing Content Publication with Coral

Peer-to-Peer Systems. Network Science: Introduction. P2P History: P2P History: 1999 today

Design and Implementation of A P2P Cooperative Proxy Cache System

A Structured Overlay for Non-uniform Node Identifier Distribution Based on Flexible Routing Tables

Janus: back to the future of WebRTC!

DISTRIBUTED SYSTEMS CSCI 4963/ /4/2015

P2P: Distributed Hash Tables

Peer-to-Peer Systems and Distributed Hash Tables

Fixing the Embarrassing Slowness of OpenDHT on PlanetLab

CS 43: Computer Networks. 14: DHTs and CDNs October 3, 2018

Transcription:

A WebRTC DHT Andres Ledesma (UCY) in cooperation with Mikael (Peerialism).

Preface I Existing DHT overlays have been optimized using one criteria (network proximity, social links, content caching or others). An adaptable overlay that uses more than one criteria, should improve performance, reliability and availability in distributed (social) applications.

Preface II Currently we are experimenting with Web browsers to build an initial DHT overlay. After the implementation, we will extend the overlay to be adaptable.

What do we mean by adaptable overlay? Different applications have different requirements. A distributed YouTube would prefer high bandwidth among the peers. A cloud storage would prefer peers with sufficient storage and perhaps good reputation. A social network would favor peers that belong to actual friends.

Example

Fastest Possible Bandwidth Fastest bandwidth Store in this node

Social Links

Reputation

Problem Formulation A node is a processing entity connected to a network. The network implements a Distributed Hash Table (DHT). Given that: Node u ε V and a set of functions f i : 0 < i < C such that f i u, v R, u ε V, v ε N u (v is connected or it is considered to be a neighbor of u) o where C is the number of criterion specified by the application o where N u = {v: u, v ε } (there is a connection between the nodes) Vector w ε 1 C where w i is the element and represents the weight of f i Node u needs to find v such that: v = arg max v [ C i=0 w i f i (u, v) ]

Problem Formulation A node is a processing entity connected to a network. The network implements a Distributed Hash Table (DHT). Given that: Node u ε V and a set of functions f i : 0 < i < C such that f i u, v R, u ε V, v ε N u (v is connected or it is considered to be a Among neighbor the of options u) that a peer has to send data, use the o where C is the number of criterion specified by the application one that gives the best match given a criteria. o where N u = {v: u, v ε } (there is connection between the nodes) Vector w ε 1 C where w i is the element and represents the weight of f i Node u needs to find v such that: v = arg max v [ C i=0 w i f i (u, v) ]

Research Objectives Extend existing state-of-the-art DHT techniques Adaptable overlays: adapt to application requirements Backend for distributed and social applications First step: build an overlay for a DHT comprised of web browsers using WebRTC and HTML5.

Research Objectives Extend existing state-of-the-art DHT techniques Adaptable overlays: adapt to application requirements Backend for distributed and social applications First step: Long-term build research an overlay direction for a DHT comprised of web browsers using WebRTC and HTML5.

Research Objectives Extend existing state-of-the-art DHT techniques Adaptable overlays: adapt to application requirements Backend Short-term for distributed research and direction social applications First step: build an overlay for a DHT comprised of web browsers using WebRTC and HTML5.

Recap from Barcelona Sept. 2013 An ideal DOSN No installation No extra hardware No configuration All in the browser!

A WebRTC DHT Objective: Build a backend for distributed applications using web browsers. Select DHT to Implement Build overlay Test it Build apps with it

Select DHT to Implement: Kademlia Most suitable DHT for unreliable peers. Several improvements over the years. Building a Reliable P2P System Out of Unreliable P2P Clients: The Case of KAD. Damiano Carra and Ernst W. Biersack. Institut Eurecom. Sophia-Antipolis, France. ACM Conference on Emerging Network Experiment and Technology (CoNEXT), 2007.

Active Research on Kademlia Fast Lookups Social analysis Network proximity Caching system

Active Research on Kademlia Embracing the Peer Next Door: Proximity in Kademlia. Sebastian Kaune, et al. Technische Universitat Darmstadt. KOM Multimedia Communications Lab. International Conference on Peer-to-peer Computing 2008. IEEE Computer Society Press. Improving the Routing Performance of KAD through Social Network Analysis. Xiangtao Liu, et al. Institute of Computing Technology, Chinese Academy of Science. International Symposium on Computers and Communications, 2010. Revisiting Why Kad Lookup Fails. Bingshuang Liu, et al. Peking University, Beijing, China. IEEE International Conference on Peer-to-Peer Computing, 2012. Kaleidoscope: Adding Colors to Kademlia. Gil Einziger, et al. Computer Science Department, Technion Haifa. IEEE International Conference on Peer-to-Peer Computing, 2013.

How does Kademlia work? 160-bit keys and 160-bit node identifiers Distances between nodes and keys are calculated using XOR Each step is one bit closer to the destination. Peers have routing tables Routes are grouped on 160 buckets ( one for each different bit )

This node has the id 0011 In this node the others are grouped in buckets: 1*** bucket 1 01** bucket 2 0001 bucket 3 0000 bucket 4 (contains one node)

bucket 2 bucket 1 bucket 4 This node has the id 0011 In this node the others are grouped in buckets: 1*** bucket 1 01** bucket 2 0001 bucket 3 0000 bucket 4 (contains one node) bucket 3

Kademlia: A Peer-to-peer Information System Based on the XOR Metric. Petar Maymounkov and David Mazieres. New York University. International Workshop on Peer-to-peer Systems, 2002.

Tools used to build a WebDHT Storage: HTML5 (through providing the localstorage object that enables permanent storage) P2P Communication : WebRTC a W3C Standard and the only mechanism to enable browser-to-browser communication without plugins or third-party extensions (Java, ActiveX, Flash, etc.).

WebRTC Considerations For peers to contact each other, they need a signal server for the initial connection. ICE (Interactive Connectivity Establishment) STUN (Session Traversal Utility for NAT) TURN (Traversal Using Relays around NAT)

Expensive process in terms of performance.

Memory There is a limited amount of RAM the OS assigns to the browser (between 2 to 4 Gigabytes of RAM). Each connection demands a chunk of this memory. Aw, Snap!

Kademlia requires communication with 160 buckets. There are two ways of doing this: Connect and disconnect OR Keep connections open

Kademlia requires communication with 160 buckets. There are two ways of doing this: Connect and disconnect OR Keep connections open This will trigger too many hits on the signal server. For every request to the signal server, the performance is affected.

Kademlia requires communication with 160 buckets. There are two ways of doing this: Connect and disconnect OR Keep connections open Memory limitations of the browser. Consider mobile devices Consider peers leaving

Can we extend Kademlia? =Memory= Keep as few open connections as possible =Performance= Try to avoid opening and closing connections =Distribution= Use XOR to compute distances

This is how we extended Kademlia Node aggregation and find/store key operations are done via routing instead of opening new connections. XOR-wise Forward OR Store/Connect (-)Disadvantages: Lookups will not perform as fast as opening and keeping the connections open. TTL is needed when packages cannot be delivered.

Node Aggregation 6 9 8 B A new node contacts the signal server to receive an identifier and a list of peers. The identifier is a string such as xpqr34trs. The node uses SHA1 to transform it into a 160-bit identifier.

Node Aggregation 6 9 8 B A new node contacts any other peer in the network.

Node Aggregation 6 9 Node 9: 6 XOR 9 = F 6 XOR 8 = E 6 XOR B = D 8 B The contacted peer finds among itself and its open connections the closest node in terms of XOR.

Node Aggregation 6 9 ROUTING: Forward request to join the network. 8 B

Node Aggregation 6 Connect to the closest node in terms of XOR. 9 8 B Node 9 forward the request to node B. Node B would compute in the same way and ultimately connect to the new node, node 6.

Node Aggregation 6 Connect to the closest node in terms of XOR. 9 8 B Node 9 forward the request to node B. Node B would compute in the same way and ultimately connect to the new node, node 6.

Node Aggregation X 9 8 B If a new node is inserted in between two other nodes, a connection from both ends is opened.

Key Space 9 8 B 00X16 FFX16

Key Space K K 9 8 B K 00X16 FFX16

Key Space K K 9 8 B K Key redistribution: Node joins Node leaves 00X16 FFX16

Key Space K K 9 8 B K Replication of degree one. A node replicates the keys from its immediate neighbor. 00X16 FFX16

Find / Store Key Serialize data (JSON) Hash with SHA1 (node identifier as salt) The result is a 160-bit key Find the closest XOR distance among the open connections and the peer itself. Forward OR Store On each peer stamps its id to the message => create a trace route

Find / Store Key Serialize data (JSON) Hash with SHA1 (node identifier as salt) The result is a 160-bit key Find the closest XOR distance among the open connections and the peer itself. Forward OR Store On each peer stamps its id to the message => create a trace route Just like node aggregation

Example : Serialization and Key Construction nodeid = rqpws49p321 ; data = [ { hello: world:, name: andres, project: isocial } ]; var value = JSON.Stringify(data); var key = SHA1(nodeId + value); console.log( key: + key); console.log( value: + value); > key: 97295d659d44340d72f084553239428de4b4f094 > value: [{hello: world:, name: andres, project: isocial }]

Follow us! github.com / landreus / isocial Read me Commit logs Latest version

Follow us! github.com / landreus / isocial Read me Commit logs Latest version alias project

What do we have so far? 160-bit key management XOR-wise distance calculation Node aggregation Find node and key Store put(key, value) Retrieve get(key) Trace communication route Avoid deadlocks TTL

Finalize the first step Implement look-ahead to speed up the finding process Testing: Simulate 100 000+ nodes Aspects to measure Performance response time of a find key operation Reliability how many nodes can fail while still maintaining an operation network? More testing along with Peerialism Come up with improvements Allow new connections under certain conditions to reduce the number of hops => subject to testing Build demo applications Micro-blogging Social network Put it on paper

What comes after the first step? Investigate DHT overlays Design adaptable or multiple-criteria overlays bandwidth network proximity reputation social links etc Implementation of a prototype Allow applications to choose overlays based on requirements Experiment with key space Faster recovery when nodes go offline Faster lookups in large systems Improve replication strategy (performance and reliability)

Thank you for your attention! Questions? Feedback?