distributed systems

35
Distributed Systems 1 Distributed Systems Name Services Dr. Sunny Jeong. [email protected] Mr. Colin Zhang [email protected] With Thanks to Prof. G. Coulouris, Prof. A.S. Tanenbaum and Prof. S.C Joo

Upload: cyma

Post on 05-Jan-2016

22 views

Category:

Documents


3 download

DESCRIPTION

Distributed Systems. Name Services. Dr. Sunny Jeong. [email protected] Mr. Colin Zhang [email protected] With Thanks to Prof. G. Coulouris, Prof. A.S. Tanenbaum and Prof. S.C Joo. Overview. Naming concepts name space, contexts, hierarchies The service function and goals - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Distributed Systems

Distributed Systems

1

Distributed Systems

Name Services

Dr. Sunny Jeong. [email protected]

Mr. Colin Zhang [email protected]

With Thanks to Prof. G. Coulouris, Prof. A.S. Tanenbaum and Prof. S.C Joo

Page 2: Distributed Systems

Distributed Systems

2

Overview

Naming concepts name space, contexts, hierarchies

The service function and goals name resolution replication and caching

Examples Domain Name Service (DNS) Jini discovery service Global directory Service X.500 directory service

Page 3: Distributed Systems

Distributed Systems

3

Distributed Service

Page 4: Distributed Systems

Distributed Systems

4

Naming concepts

Names = strings used to identify objects (files, computers, people, processes, objects).

Textual names (human readable) used to identify individual services, people

email address: [email protected] URI(Uniform Resource Identifier): www.cdk3.net

URL(Uniform Resource Locator) URI’s particular type

URN(Uniform Resource Name) URI’s other particular type

URC(Uniform Resource Characteristics or Citations) URN’s subset

Groups of objects multicast address (e.g. IP Multicast, group of hosts) broadcast address (e.g. Ethernet, all hosts)

Page 5: Distributed Systems

Distributed Systems

5

Naming concepts -ctd

Numeric addresses (location dependent in Internet, now) 147.188.195.11, Object identifiers( = object handle) pure names (=bit patterns), usually numeric and large[Needham, 1993] never reused (include timestamp) location independent used for identification purposes

=>No real distinction between names and addresses.

=>Both must be looked up to obtain lower-level data (= name resolution).

Page 6: Distributed Systems

Distributed Systems

6

Examples of name services

DNS (=Domain Name Service) maps domain names to IP addresses

Jini discovery service looks up objects according to attributes(service)

GNS (=Global Name Service) GNS directory tree maps global names to their attributes (Resource Location, Mail address. Authentication)

scalable, can handle change

X.500 directory service (attribute service) maps person’s name to attributes (email address, phone number)

Page 7: Distributed Systems

Distributed Systems

7

DNS names & look-ups

http://www.cdk3.net:8888/WebExamples/earth.html

URL

Resource ID (IP number, port number, pathname)

Network address

2:60:8c:2:b0:5a file

Web server

55.55.55.55 WebExamples/earth.html8888

DNS lookup

Socket

Page 8: Distributed Systems

Distributed Systems

8

Name space

Name space = collection of all valid names recognized by a service with a syntax for specifying names, and rules for resolving names (left to right,

etc)

Naming context = maps a name onto primitive attributes directly, or onto another context and derived name (usually by prefixing) telephone No. : country, area, number Internet host names : contexts = domains Unix file system : contexts = directories

Page 9: Distributed Systems

Distributed Systems

9

Name space -ctd

Name binding an association between a name and an object names bound to attributes, one of which may be address

Naming domain has authority that assigns names to objects within a name space or context object may be registered more than once within context( replication)

Multiple names alias (alternative name for an object) symbolic name (alternative name which maps to a path name in the name

space)

Page 10: Distributed Systems

Distributed Systems

10

Hierarchic name spaces

Sequence of name tokens resolved in different context syntax: name token (text string) + delimiter DNS: cs.bham.ac.uk Unix: /usr/bin

Structure reflects organizational structure name changes if object migrates names relative to context or absolute local contexts managed in a distributed fashion

Examples domain names, Unix file system, etc

Page 11: Distributed Systems

Distributed Systems

11

Flat name spaces

Single global context and naming authority for all names computer serial number Ethernet address remote object reference (IP address, port, time, object number, interface id)

Names (are) not meaningful difficult to resolve (no tree hierarchy) easy to create easy to ensure uniqueness (timestamps)

Page 12: Distributed Systems

Distributed Systems

12

Name Resolution

Iteratively, presents name to a naming context, start with initial naming context repeat as long as contexts+derived names are returned aliases introduce cycles

Two solution for no cycle abandon after threshold No. of resolutions ensure no cycles by administrator

Replication used for improved fault-tolerance on large services (more than one server, cf

DNS) may need navigation, i.e. accessing several servers

Page 13: Distributed Systems

Distributed Systems

13

Iterative navigation

Client1

2

3

- Database partitioned into servers according to its domain.- A client iteratively contacts name servers NS1–NS3 in order to resolve a name.- Servers returns attributes if it knows name, otherwise suggests another server.

NS2

NS1

NS3

Nameservers

Page 14: Distributed Systems

Distributed Systems

14

Navigation methods

Multicast navigation client multicasts name to be resolved server who knows name responds with attributes problem: what if name unbound?

Non-recursive server controlled any name server can be chosen by the client chosen server multicast/iteratively calls other peer servers

Recursive server controlled each iteration through a single server calls continue recursively until resolution

Page 15: Distributed Systems

Distributed Systems

15

Server controlled navigation

1

2

3

5

1

2

34

4

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

client client

Recursiveserver-controlled

NS2

NS1

NS3

NS2

NS1

NS3

Non-recursiveserver-controlled

Page 16: Distributed Systems

Distributed Systems

16

Replication & Caching

Replicate some directories for performance & availability.

Updates write to single master, master propagates updates write to any replica: later merge updates (timestamps) weak consistency (some entries out of date)

Look-ups try any local server: go to root and then down the tree

Caching names & addresses of recently used objects

Page 17: Distributed Systems

Distributed Systems

17

Internet Domain Name Service (DNS)

Used mainly for host names and email addresses Extensible number of fields, separated by dot(.)

gromit.cs.bham.ac.uk

Host name resolution resolves host name into IP address

Mail host location to resolve [email protected], query DNS with domain name

cs.bham.ac.uk and type ‘mail’ returns list of mail hosts, marked with preference value

Reverse look-up (Maps IP address to domain name)

Page 18: Distributed Systems

Distributed Systems

18

DNS name servers

Resource record holds domain name for which record applies time to live: initial validity time for cached entries type (IP address, mail server, name server, alias) value fields

Replicated and partitioned information update master server Secondary servers

periodically download from master and save in cache hold addresses of one or more masters up the tree recursive look-up

Page 19: Distributed Systems

Distributed Systems

19

DNS name servers ctdNote: Name server names are in italics, and the corresponding domains are in parentheses.

Arrows denote name server entries

a.root-servers.net(root)

ns0.ja.net(ac.uk)

dns0.dcs.qmw.ac.uk(dcs.qmw.ac.uk)

alpha.qmw.ac.uk(qmw.ac.uk)

dns0-doc.ic.ac.uk(ic.ac.uk)

ns.purdue.edu(purdue.edu)

ukpurdue.edu

ic.ac.uk

qmw.ac.uk

dcs.qmw.ac.uk*.qmw.ac.uk

*.ic.ac.uk*.dcs.qmw.ac.uk

* .purdue.edu

ns1.nic.uk(uk)

ac.uk

co.uk

yahoo.com

Page 20: Distributed Systems

Distributed Systems

DNS in typical operationa.root-servers.net

(root)

ns0.ja.net(ac.uk)

dns0.dcs.qmw.ac.uk(dcs.qmw.ac.uk)

alpha.qmw.ac.uk(qmw.ac.uk)

dns0-doc.ic.ac.uk(ic.ac.uk)

ns.purdue.edu(purdue.edu)

ukpurdue.edu

ic.ac.uk

qmw.ac.uk...

dcs.qmw.ac.uk*.qmw.ac.uk

*.ic.ac.uk*.dcs.qmw.ac.uk

* .purdue.edu

ns1.nic.uk(uk)

ac.uk...

co.uk

yahoo.com ....

client.ic.ac.uk

IP: alpha.qmw.ac.uk

2

3IP:dns0.dcs.qmw.ac.uk

jeans-pc.dcs.qmw.ac.uk ?

IP:ns0.ja.net

1

IP:jeans-pc.dcs.qmw.ac.uk

4

Without caching

*20

Page 21: Distributed Systems

Distributed Systems

21

DNS summary

DNS relatively short average response time for look-ups limited variety of data infrequent changes in system inconsistency of data possible (stale data may continue to be used)

Problems (resolved in GNS) rigid structure of the name space lack of customization of name space to local needs

Page 22: Distributed Systems

Distributed Systems

22

Directory and discovery services

Directory service stores collections of bindings between names and attributes provides look-up according to attributes (match all) examples

Microsoft Active Directory Services, X.500

Discovery service directory service that registers the services in a spontaneous networking

environment clients & services change dynamically Example

Jini discovery

Page 23: Distributed Systems

Distributed Systems

23

Jini discovery service

Function to enable users to access services (printing etc.) from laptops while away,

without their involvement laptops look-up the services services tell system of their existence and attributes

Components lookup service (registers and stores information about services) Jini services (provide objects and attributes for the service) Jini clients (request services that match requirements)

Java/JVM based, uses RMI plus download code

Page 24: Distributed Systems

Distributed Systems

24

Service discovery in Jini

Printing service

serviceLookup

serviceLookup

Printing service

admin

admin

admin, finance

finance

Client

Client

Corporate infoservice

1. in ‘finance’ group lookup service?

2. Here I am: .....

3. Request

printing

4. Use printing service ( by RMI)

Network

Page 25: Distributed Systems

Distributed Systems

25

Jini – How to works

How it works services and clients join Jini dynamically services have leases, which they have to renew periodically every t time

units look-up registers services (e.g. printer(name), what type(attributes), etc) on entering, clients/services send request to multicast address look-up services listen to such requests, and reply with unicast address of

service (e.g. printer), and then, client contacts the service directly via RMI

Page 26: Distributed Systems

Distributed Systems

26

Global Name Service

GNS DEC system research center[1986] providing facilities(resource location, mail addressing, authentication)

The Global Name Service Use of caching essential renders it extremely difficult to maintain complete

consistency between all copies of a database entry The cache consistency strategy adopted A naming database that is composed of a tree of directories holding names

and values Names in GNS

directory name, value name(EC/UK/AC/QMW, Peter.Smith/password) the first part identifies a directory, second refers to a value tree, or some

portion of a value tree

Page 27: Distributed Systems

Distributed Systems

27

GNS Directory tree

UK FR

AC

QMWDI: 322

Peter.Smith

passwordmailboxes

DI: 599 (EC)

DI: 574DI: 543

DI: 437

Alpha GammaBeta

EC

UK FR

DI: 599

DI: 574DI: 543

NORTH AMERICA

US

DI:642

DI: 457DI: 732

#599 = #633/EC#642 = #633/NORTH AMERICA

Well-known directories:

CANADA

DI: 633 (WORLD)

GNS directory and value tree for Peter.Smith Merging trees under a new root(next page)

Page 28: Distributed Systems

Distributed Systems

28

GNS Directory Restructuring

Restructuring the directory

EC

UK FR

DI: 599

DI: 574DI: 543

NORTH AMERICA

US

DI: 642

DI: 457DI: 732

#599 = #633/EC#642 = #633/NORTH AMERICA

Well-known directories:

CANADA

DI: 633 (WORLD)

#633/EC/US

US

symbolic link

Page 29: Distributed Systems

Distributed Systems

29

GNS Discussion

Discussion of GNS descended form Grapevine & Clearinghouse[1982]

successful naming systems developed primarily for the purposes of mail delivery by the Xerox Corporation

scalability and re-configurability adopted for merging and moving directory trees results in a requirement

for a database that must be replicated at every node in a large-scale network, reconfigurations may occur at any level

Page 30: Distributed Systems

Distributed Systems

30

X.500 Directory Service

Directory service providing attributed-based name service using the existing name service together

CCITT & ISO standard organizations called the Directory Information Tree(DIT)

Directory Information Base(DIB)

X.500 Architecture Client : Directory User Agent Server: Directory Service Agent

DSA

DSA

DSA

DSA

DSADSADUA

DUA

DUA

Page 31: Distributed Systems

Distributed Systems

31

X.500 Directory Information Tree(DIT)

... France (country) Great Britain (country) Greece (country)...

BT Plc (organization) University of Gormenghast (organization)... ...

Department of Computer Science (organizationalUnit)

Computing Service (organizationalUnit)

Engineering Department (organizationalUnit)

...

...

X.500 Service (root)

Departmental Staff (organizationalUnit)

Research Students (organizationalUnit)

ely (applicationProcess)...

...

Alice Flintstone (person) Pat King (person) James Healey (person) ...... Janet Papworth (person)...

Page 32: Distributed Systems

Distributed Systems

32

X.500 Directory Information Base(DIB)

infoAlice Flintstone, Departmental Staff, Department of Computer Science,

University of Gormenghast, GB

commonName Alice.L.Flintstone Alice.Flintstone Alice Flintstone A. Flintstone

surname

Flintstone

telephoneNumber +44 986 33 4604

uid

alf

mail [email protected]

[email protected]

roomNumber

Z42

userClass

Research Fellow

Page 33: Distributed Systems

Distributed Systems

33

X.500 Directory Information Base(DIB)

Functions of Directory access request read : a request resembles the lookup access defined in DNS model search : attribute-based access request

Administration and updating of the DIB DSA(Directory Service Agent) interface includes the following operations

adding, deleting and modifying entries DIB

if DIB is partitioned, with the expectation that each organization will provide at least one server holding the details of the entities in that organization

Developed at University College, London(QUIPU) both caching and replication are performed at the level of individual DIB entries, and at the level of collections of entries descended from the same node values may become inconsistent after an update, and the time interval in which the

consistency is restored may be several minutes

Discussion of X.500 the implementation and application of X.500 is at a pilot stage(1994)

Page 34: Distributed Systems

Distributed Systems

34

Lightweight Directory Access Protocol(LDAP) One of Directory Access protocol(DAP) for X.500

DAP works on OSI stack and requiring lots of computing resources

LDAP works on TCP/IP stack and enable users access X.500 directory

OSI

x.500

Application

TCP IP

IP

LDAP

Physical media

Network

Page 35: Distributed Systems

Distributed Systems

35

Summary

Name services Store(= register) names and their attributes of objects, provide look-up

Requirements handle very large name spaces, long lifetime high availability, fault tolerance

Design issues structure of the name space (syntax, resolution rules, is it changing over time?) distribution across servers, navigation replication & caching

Case studies Domain Name Service (DNS) ( domain name IP) Jini discovery service( object attribute) Global Directory Service( global name attributes (resource location… )) X.500 directory service(person’s name to attributes (email address, phone number))