• Non ci sono risultati.

DHT and DOLR Peer to Peer systems

N/A
N/A
Protected

Academic year: 2021

Condividi "DHT and DOLR Peer to Peer systems"

Copied!
12
0
0

Testo completo

(1)

DHT and DOLR Peer to Peer systems

Andrea Marin

Universit`a Ca’ Foscari di Venezia Dipartimento di Informatica

Corso di Sistemi Distribuiti

2009

(2)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Presentation outline

1 Routing overlays Introduction

2 Distributed hash tables (DHT) Main idea

Basic programming interface for DHT Minor issues

3 Distributed object location and routing (DOLR) Main idea

Basic programming interface for DOLR

(3)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Introduction

Routing overlays

Definition (Routing overlay)

The routing overlay is the algorithm of the P2P middleware that locates the nodes and the objects.

(4)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Introduction

Salient features

Objects are placed and relocated to any node without the client involvement

A node can access a resource by routing the request through a sequence of nodes

If multiple copies of a resource are stored, the routing overlay stores the location of any available replica

A request is routed to the nearest node that provides a replica of the required resource

Nodes andObjectsare identified by GUIDs (opaque identifiers)

(5)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Introduction

Routing overlay tasks

A client is expected to be able to. . .

1 specify a GUID and an operation to the routing overlay. This sends the request to a live node with a replica of the required resource

2 provide a new resource after computing its GUID

3 remove a resource

4 join or leave (maybe because of a failure) the network

(6)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DHT Minor issues

Distributed hash tables: Main idea

Distributed hash tables (DHT) are a family of algorithms Every object and node have a GUID

1 GUID are usually computed with hash functions (e.g. SHA-1)

2 Nodes with the same GUID are searched in the network to avoid name clashes

When a client requires to publish a resource, it has to. . .

1 compute the GUID

2 ask the routing overlay to publish it

When the routing overlay is asked to publish a resource, it. . .

1 stores the resource in the node whose GUID is closest to that of the resource

2 stores r replicas of the resources in the r nodes whose GUIDs are closest to that of the resource. r is the replication factor

(7)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DHT Minor issues

Basic programming interface for DHT

DHT API

put(GUID, data)

Publish an object with GUID. The data is stored in all the nodes responsible for a replica

remove(GUID)

Remove all the replicas of the object whose GUID is GUID get(GUID)

The data associated with the object GUID are retrived

(8)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DHT Minor issues

Computing the GUID distance

Different approaches are defined, with pro and cons prefix routing: usage of a binary mask that selects an

increasing number of hexadecimal digits from the destination GUID after each hop. Used by Patry.

Numerical difference: used by CAN Exclusive OR:used by Kademlia

(9)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DHT Minor issues

How to retrieve a resource GUID?

GUID are not human readable

Indexes of resource descriptions - GUIDs may be stored in a distributed way among the P2P network

In practice these indices are often stored in web pages (like for BitTorrent)

(10)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DHT Minor issues

Using DHT for file sharing

DHTs may be used for file sharing applications (e.g. Kademlia with Emule)

GUIDs are hashes of the shared resources and the associated data is the IP address of a client sharing that resource

When a node shares a file, it computes the GUID and then stores its own IP address in the r nearest nodes (to the GUID)

(11)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DOLR

Distributed object location and routing (DOLR): Main idea

Objects can be stored anywhere

DOLR layer maintains a mapping between GUIDs and the addresses of the nodes at which replicas of the objects are located

DOLR layer routes the requests to the nearest available replica Note that location of the replicas are decided outside the routing layer

(12)

Routing overlays Distributed hash tables (DHT) Distributed object location and routing (DOLR)

Main idea

Basic programming interface for DOLR

Basic programming interface for DOLR

DOLR API

publish(GUID)

Publish an object with GUID.

unpublish(GUID)

Makes the object whose GUID is GUID inaccessible sendToObj(msg,GUID, [n])

Sent a message msg to n replicas of object whose GUID is GUID

Riferimenti

Documenti correlati

ne Wurzel kann eine Bedeutung wie ‘trampeln, einen Pfad trampeln’ (lautnachah- mend?) angenommen werden, wie eine gewisse semantische „Solidarität“ von bat- tuo mit path / pad /

Route locality The entries in the routing table of each Pastry node are chosen to be close to the present node, according to the proximity metric, among all nodes with the

Ting Chen (University of Electronic Science and Technology of China), Wanyu Huang (University of Electronic Science and Technology of China), Muhui Jiang (The Hong

TERA’s internal components (Event Management, Sub- scription Management, Access Point Lookup, Partition Merging, Inner-Cluster Dissemination), detailed in Section 3, working on

La costruzione dei saperi ludici attraverso la Ricerca Azione Partecipativa e il Teatro Tra gli approcci metodologici della Pedagogia ludica applicabile nei contesti

Horowitz and Malkhi [9]propose a scheme for dynamically estimating net- work size at each node of the network as the network evolves (that is, nodes join and leave the network),

the propagation is limited by a maximum number of hops version 0.4: a node knows 5 neighbors, hop limit is 7 versione 0.6: nodes can be either a standard peer (leaf) or a ultrapeer.

• Based on central index server (farm).. • User register and give list of files