49
Naming, Trading and P2P Systems Powerpoint presention has been adapted from: 1) www.scs.ryerson.ca/~aabhari/DS-CH9.ppt 2) www.cloudbus.org/652/L10-Chap9NamingServices.ppt 3) www.buyya.com/cv.html 4) cs865team4.wikispaces.com/file/view/Peer-to- Peer_100228.ppt

Naming, Trading and P2P Systems

  • Upload
    mikasi

  • View
    37

  • Download
    0

Embed Size (px)

DESCRIPTION

Naming, Trading and P2P Systems. Powerpoint presention has been adapted from: www.scs.ryerson.ca/~aabhari/DS-CH9. ppt www.cloudbus.org/652/L10- Chap 9 NamingServices . ppt www.buyya.com/cv.html cs865team4.wikispaces.com/file/view/ Peer -to- Peer _100228. ppt. Content. Naming & Trading - PowerPoint PPT Presentation

Citation preview

Page 1: Naming, Trading and P2P Systems

Naming, Trading and P2P Systems

Powerpoint presention has been adapted from:1) www.scs.ryerson.ca/~aabhari/DS-CH9.ppt2) www.cloudbus.org/652/L10-Chap9NamingServices.ppt3) www.buyya.com/cv.html4) cs865team4.wikispaces.com/file/view/Peer-to-Peer_100228.ppt

Page 2: Naming, Trading and P2P Systems

Content

• Naming & Trading• Case Study 1: The X.500 Directory Service• Peer-to-peer Systems• Case Study 2: Pastry

Page 3: Naming, Trading and P2P Systems

Content

• Naming & Trading• Case Study 1: The X.500 Directory Service• Peer-to-peer Systems• Case Study 2: Pastry

Page 4: Naming, Trading and P2P Systems

Naming & Trading

In a distributed system, names are used to refer to a wide variety of resources such as:

Computers, services, remote objects, and files, as well as users.

Basic design issues for name services, such as the structure and management of the spaces of names recognized by the service and the operations that the name service supports, are outlined and discussed in the context of the Internet Domain Name Service.

Introduction

Page 5: Naming, Trading and P2P Systems

Naming & Trading

Resources are accessed using identifier or reference An identifier can be stored in variables and retrieved from

tables quickly. Identifier includes or can be transformed to an address for

an object.E.g. NFS file handle, CORBA remote object reference.

A name is human-readable value (usually a string) that can be resolved to an identifier or address.

Internet domain name, file pathname, process numberE.g ./notes/week1, http://www.cdk3.net/

Introduction

Page 6: Naming, Trading and P2P Systems

Naming & Trading

Key benefitsResource localizationUniform namingDevice independent address (e.g., you can move domain

name/web site from one server to another server seamlessly).

Introduction

Page 7: Naming, Trading and P2P Systems

Naming & TradingIntroduction

Page 8: Naming, Trading and P2P Systems

Naming & Trading

Allow simple but meaningful names to be used Potentially infinite number of names Structured

to allow similar subnames without clashesto group related names

Allow re-structuring of name treesfor some types of change, old programs should

continue to work Management of trust

Requirements for name spaces

Page 9: Naming, Trading and P2P Systems

Naming & Trading

A name service is a specific service whose aim is to provide a consistent

and uniform naming of resources, this allowing other programs or services to localize them and obtain the required metadata for interacting with them.

stores a collection of one or more naming contexts, sets of bindings between textual names and attributes for objects such as computers, services, and users.

Name Services

Page 10: Naming, Trading and P2P Systems

Naming & Trading

Namespaces allows for structure in names. URLs provide a default structure that decompose the

location of a resource inprotocol used for retrieval internet end point of the service exposing the resource service specific path

This decomposition facilitates the resolution of the name into the corresponding resource

Moreover, structured namespaces allows for iterative navigation… the act of chaining multiple Naming Services in order to resolve a

single name to the corresponding resource.

Iterative Navigation

Page 11: Naming, Trading and P2P Systems

Naming & TradingIterative Navigation

Client 12

3

A client iteratively contacts name servers NS1–NS3 in order to resolve a name

NS2

NS1

NS3

Nameservers

Reason for NFS iterative name resolutionThis is because the file service may encounter a symbolic link (i.e. an alias) when resolving a name. A symbolic link must be interpreted in the client’s file system name space because it may point to a file in a directory stored at another server. The client computer must determine which server this is, because only the client knows its mount points.

Page 12: Naming, Trading and P2P Systems

Naming & Trading

The Iterative Navigation can be…Recursive:

• it is performed by the naming server• the server becomes like a client for the next server• this is necessary in case of client connectivity

constraintsNon recursive:

• it is performed by the client or the first server• if it is performed by the server it is “server controlled”• the server bounces back the next hop to its client

Recursive Navigation

Page 13: Naming, Trading and P2P Systems

Naming & Trading Non-recursive and recursive server-controlled navigation

A name server NS1 communicates with other name servers on behalf of a client

Recursiveserver-controlled

1

23

5

4client

NS2

NS1

NS3

12

34client

NS2

NS1

NS3

Non-recursiveserver-controlled

DNS offers recursive navigation as an option, but iterative is the standard technique. Recursive navigation must be used in domains that limit client access to their DNS information for security reasons.

Page 14: Naming, Trading and P2P Systems

Naming & Trading

A distributed naming database (specified in RFC 1034/1305) Name structure reflects administrative structure of the

Internet Rapidly resolves domain names to IP addresses

exploits caching heavily typical query time ~100 milliseconds

Scales to millions of computers partitioned database caching

Resilient to failure of a server replication

DNS - The Internet Domain Name System

Page 15: Naming, Trading and P2P Systems

Naming & TradingDNS - The Internet Domain Name System

a.root-servers.net(root)

ns0.ja.net(edu.au)

mulga.csse.unimelb.edu.au(csse.unimelb.edu.au)

abc.unimelb.edu.au(unimelb.edu.au)

dns0-doc.usyd.edu.au(usyd.edu.au)

ns.purdue.edu(purdue.edu)

aupurdue.edu

usyd.edu.au

unimelb.edu.au...

csse.unimelb.edu.au*.unimelb.edu.au

*.usyd.edu.au*.csse.unimelb.edu.au

* .purdue.edu

ns1.nic.au(au)

edu.au...

com.au

yahoo.com ....

Note: Name server names are in italics, and the corresponding domains are in parentheses.Arrows denote name server entries

DNS name servers

Page 16: Naming, Trading and P2P Systems

Naming & Trading

Main function is to resolve domain names for computers, i.e. to get their IP addressescaches the results of previous searches until they pass

their 'time to live' Other functions:

get mail host for a domain reverse resolution - get domain name from IP addressHost information - type of hardware and OSWell-known services - a list of well-known services offered

by a hostOther attributes can be included (optional)

DNS server functions and configuration

Page 17: Naming, Trading and P2P Systems

Naming & Trading

Zone data are stored by name servers in files in one of several fixed types of resource record.

DNS - The Internet Domain Name System

Record type Meaning Main contentsA A computer address IP numberNS An authoritative name server Domain name for serverCNAME The canonical name for an alias Domain name for aliasSOA Marks the start of data for a zone Parameters governing the zoneWKS A well-known service description List of service names and protocolsPTR Domain name pointer (reverse

lookups)Domain name

HINFO Host information Machine architecture and operatingsystem

MX Mail exchange List of <TXT Text string Arbitrary text

Page 18: Naming, Trading and P2P Systems

Naming & Trading

Name tables change infrequently, but when they do, caching can result in the delivery of stale data. Clients are responsible for detecting this and recovering

Its design makes changes to the structure of the name space difficult. For example: merging previously separate domain trees under a new root moving subtrees to a different part of the structure (e.g. if Scotland became a

separate country, its domains should all be moved to a new country-level domain.)

DNS issues

Page 19: Naming, Trading and P2P Systems

Naming & Trading

Sometime users wish to find a particular person or resource, but they don’t know its name, only some of its attributes.What is the name of the user with a telephone number

03-83441344?What is the name of professor teaching Cloud

computing at UniMelb (e.g., ask Google!) Sometime users require a service, but they are not

concerned with what system entity provides it.Where can I print high resolution colour image?

Directory services can help with above situation: they store collections of bindings and attributes and also looks up entries that match attribute-based specs.

Directory and discovery services

Page 20: Naming, Trading and P2P Systems

Naming & Trading

Directory service:- 'yellow pages' for the resources in a network Retrieves the set of names that satisfy a given description e.g. X.500, LDAP, MS Active Directory Services

• (DNS holds some descriptive data, but:– the data is very incomplete– DNS isn't organised to search it)

Discovery service:- a directory service that also: is automatically updated as the network configuration changes meets the needs of clients in spontaneous networks discovers services required by a client (who may be mobile) within the

current scope, for example, to find the most suitable printing service for image files after arriving at a hotel.

Examples of discovery services: Jini discovery service, the 'service location protocol', the 'simple service discovery protocol' (part of UPnP), the 'secure discovery service'.

Directory and discovery services

Page 21: Naming, Trading and P2P Systems

Content

• Naming & Trading• Case Study 1: The X.500 Directory Service• Peer-to-peer Systems• Case Study 2: Pastry

Page 22: Naming, Trading and P2P Systems

The Global Name Service, The X.500 Directory Service

X.500 and LDAPa hierarchically-structured standard directory service

designed for world-wide useX.500 is standardised by ITU (international

telecommunication union) and ISOaccommodates resource descriptions in a standard form

and their retrieval for any resource (online or offline)never fully deployed, but the standard forms the basis for

LDAP, the Lightweight Directory Access Protocol, which is widely used – IETF RFC 2251.

A secure access to directory through authentication is also supported.

X.500 Directory Service

Page 23: Naming, Trading and P2P Systems

The Global Name Service, The X.500 Directory ServicePart of the X.500 Directory Information Tree (DIT)

23

X.500 Service (root)

Australia (country) India USA

NSW (state) Vic (state)

Govt Private Educational

MonashUniMelb

CSSE Medicine

Staff Students

Object class for NSW govt.

Page 24: Naming, Trading and P2P Systems

Content

• Naming & Trading• Case Study 1: The Global Name Service, The

X.500 Directory Service• Peer-to-peer Systems• Case Study 2: Pastry

Page 25: Naming, Trading and P2P Systems

Peer-to-peer Systems

Client-Server relationships are more transaction-based than defined as permanent roles.

Peer-to-Peer elevates clients to servers – on an asynchronous basis

Subordinate hosts need to be aware that they are participating in the peer-to-peer system

Objective – to build a reliable resource sharing layer over an unreliable and untrusted collection of computers and networks

Introduction

Page 26: Naming, Trading and P2P Systems

Peer-to-peer Systems

Peer-to-Peer SystemsWhere data and computational resources are contributed

by many hostsObjective to balance network traffic and reduce the load

on the primary hostManagement requires knowledge of all hosts, their

accessibility, (distance in number of hops), availability and performance.

They exploit existing naming, routing, data replication and security techniques in new ways

Introduction

Page 27: Naming, Trading and P2P Systems

Peer-to-peer Systems

Goal of Peer-to-Peer SystemsSharing data and resources on a very large scale‘Applications that exploit resources available at

the edges of the Internet – storage, cycles, content, human presence’ (Shirky 2000)

Uses data and computing resources available in the personal computers and workstations

Introduction

Page 28: Naming, Trading and P2P Systems

Peer-to-peer Systems

Characteristics of Peer-to-Peer SystemsEach computer contributes resourcesAll the nodes have the same functional capabilities

and responsibilitiesNo centrally-administered systemOffers a limited degree of anonymityAlgorithm for placing and accessing the data

• Balance workload, ensure availability• Without adding undue overhead

Introduction

Page 29: Naming, Trading and P2P Systems

Peer-to-peer Systems

Evolution of Peer-to-Peer SystemsNapster – download music, return addressFreenet, Gnutella, Kazaa and BitTorrent

• More sophisticated – greater scalability, anonymity and fault tolerancePastry, Tapestry, CAN, Chord, Kademlia

• Peer-to-peer middleware Immutable Files, (music, video)GUIDs (Globally Unique Identifiers) Middleware to provide better routing algorithms, react to

outagesEvolve to mutable filesApplication within one company’s intranet

Introduction

Page 30: Naming, Trading and P2P Systems

Peer-to-peer Systems

Napster Provided a means for users to share music files –

primarily MP3s Launched 1999 – several million users Not fully peer-to-peer since it used central servers to

maintain lists of connected systems and the files they provided, while actual transactions were conducted directly between machines

Proved feasibility of a service using hardware and data owned by ordinary Internet users

Napster and its Legacy

Page 31: Naming, Trading and P2P Systems

Peer-to-peer SystemsNapster and its Legacy

Napster serverIndex1. File location

2. List of peers

request

offering the file

peers

3. File request

4. File delivered5. Index update

Napster serverIndex

Page 32: Naming, Trading and P2P Systems

Peer-to-peer SystemsNapster and its Legacy

Page 33: Naming, Trading and P2P Systems

Peer-to-peer Systems

To provide mechanism to access data resources anywhere in network

Functional Requirements :Simplify construction of services across many hosts in

wide network Add and remove resources at willAdd and remove new hosts at willInterface to application programmers should be simple

and independent of types of distributed resources

Peer To Peer Middleware

Page 34: Naming, Trading and P2P Systems

Peer-to-peer Systems

Non-Functional Requirements :Global Scalability Load BalancingOptimization for local interactions between

neighboring peers Accommodation to highly dynamic host availability Security of data in an environment simplify

construction of services across many hosts in wide network

Anonymity, deniability and resistance to censorship

Peer To Peer Middleware

Page 35: Naming, Trading and P2P Systems

Peer-to-peer Systems

Non-Functional Requirements :Global scalability, dynamic host availability and

load sharing and balancing across large numbers of computers pose major design challenges.

Design of Middleware layerKnowledge of locations of objects must be

distributed throughout network Use of replication to achieve this

Peer To Peer Middleware

Page 36: Naming, Trading and P2P Systems

Peer-to-peer SystemsPeer To Peer Middleware

Page 37: Naming, Trading and P2P Systems

Peer-to-peer Systems

Sub-systems, APIs, within the peer-to-peer middleware

Responsible for locating nodes and objects Implements a routing mechanism in the application

layerSeparate from any other routing mechanisms such as IP

routing Ensures that any node can access any object by

routing each request thru a sequence of nodesExploits knowledge at each node to locate the destination

Routing Overlays

Page 38: Naming, Trading and P2P Systems

Peer-to-peer Systems

GUIDs ‘pure’ names or opaque identifiers

• Reveal nothing about the locations of the objects• Building blocks for routing overlays

Computed from all or part of the state of the object using a function that deliver a value that is very likely to be unique. Uniqueness is then checked against all other GUIDs

Not human readable

Routing Overlays

Page 39: Naming, Trading and P2P Systems

Peer-to-peer Systems

Tasks of a routing overlayClient submits a request including the object

GUID, routing overlay routes the request to a node at which a replica of the object resides

A node introduces a new object by computing its GUID and announces it to the routing overlay

Clients can remove an objectNodes may join and leave the service

Routing Overlays

Page 40: Naming, Trading and P2P Systems

Peer-to-peer Systems

Types of Routing OverlaysDHT – Distributed Hash TablesDOLR – Distributed Object Location and RoutingDOLR is a layer over the DHT that maps GUIDs and

address of nodesDHT – GUIDs are stored based on the hash valueDOLR – GUIDs host address is notified using the

Publish() operation

Routing Overlays

Page 41: Naming, Trading and P2P Systems

Content

• Naming & Trading• Case Study 1: The X.500 Directory Service• Peer-to-peer Systems• Case Study 2: Pastry

Page 42: Naming, Trading and P2P Systems

Case Study 2: Pastry

A routing overlay with the common characteristics All the nodes and objects are assigned 128-bit GUIDs Nodes are computed by applying a secure hash function such

as SHA-1 to the public key with each node is provided Objects such as files, the GUIDs is computed by a secure hash

function to the object’s name or to some part of the object’s stored state

The resulting GUID has the usual properties of secure hash values randomly distributed in the range 0 to 2128 -1

In a network with N participating nodes, the Pastry routing algorithm will correctly route a message addressed to an GUID in O(log N) steps

Pastry

Page 43: Naming, Trading and P2P Systems

Case Study 2: Pastry

GUID delivers message to an identified active node, otherwise, delivers to another active node numerically closest to the original one

Active nodes take responsibility of processing requests addressed to al objects in their numerical neighborhood

Routing steps involve the user of an underlying transport protocol (normally UDP) to transfer the message to a Pastry node that is ‘closer’ to its destination

Pastry

Page 44: Naming, Trading and P2P Systems

Case Study 2: Pastry

The real transport of a message across the Internet between two Pastry nodes may requires a substantial number of IP hops

Pastry uses a locality metric based on network distance in the underlying network to select appropriate neighbors when setting up the routing tables used at each node

The participated Hosts are fully self organizing Nodes obtains data from network to construct a routing

table and other required state from existing members When a node fails, the remaining nodes reconfigure the

required changes in the routing structure

Pastry

Page 45: Naming, Trading and P2P Systems

Case Study 2: Pastry

Pastry Routing AlgorithmThe algorithm involves the user of a routing table

at each node to route messages efficiently.Describe the algorithm in two stages

• Stage 1: Simplified form to routes messages correctly but inefficiently without a routing table

• Stage 2: Describe full routing algorithm with routing table which routes a request to any node in O(log N) messages

Pastry

Page 46: Naming, Trading and P2P Systems

Case Study 2: Pastry

Stage 1:Each active node stores a leaf set – a vector L (of size of

2l)The vector contains the GUIDs and IP addresses of the

nodes whose GUIDs are numerically closest on either side of its own (l above and l below)

Leaf sets are maintained by Pastry as nodes join and leave

Even after a node failure they will be corrected within a short time within the defined maximum rate of failure

The GUID space is treated as circular

Pastry

Page 47: Naming, Trading and P2P Systems

Case Study 2: Pastry

Stage 2:Full Pastry algorithmEfficient routing is achieved with the aid of routing

tablesEach Pastry node maintains a tree-structured

routing table giving GUIDs and IP address for a set of nodes spread throughout the entire range of 2128 possible GUID values

Pastry

Page 48: Naming, Trading and P2P Systems

Case Study 2: PastryPastry

Page 49: Naming, Trading and P2P Systems

End of the chapter…