76
Fehér Gyula [email protected] TEMPUS S_JEP-12495-97 Distributed Systems and Distributed Operating Systems Naming in Distributed Systems Fehér Gyula 1999 TEMPUS S JEP-12495-97

Naming in Distributed Systems - University of Miskolcmazsola.iit.uni-miskolc.hu/DATA/research/tempus/disco… ·  · 1999-10-14Fehér Gyula [email protected] TEMPUS S_JEP-12495-97

Embed Size (px)

Citation preview

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Nam

ing

in D

istr

ibu

ted

Sys

tem

s

Feh

ér G

yula

1999

TE

MP

US

S J

EP

-124

95-9

7

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

NAMING IN

DISTRIBUTED SYSTEMS

• • Introduction

• • Desirable features of a good namingsystem

• • Fundamental terminologies and

concepts

• • System-oriented names

• • Object locating mechanisms

• • Human-oriented names

• • Name caches

• Summary

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

INTRODUCTION

• The naming faciliy of a distributed operating systemenables users and programs to assign character-stringnames to objects and subsequently use these namesto refer to those objects.

• The locating faciliy, which is an integral part of thenaming facility, maps an object's name to the object'slocation in a distributed system.

• The naming and locating facilities jointly form anaming system that provides the users with anabstraction of an object that hides the details of howand where an object is actually located in thenetwork.

• It provides a further level of abstraction whendealing with object replicas. Given an object name, itreturns a set of the locations of the object's replicas.

• The naming system plays a very important role inachieving the goal of

v location transparency,

v facilitating transparent migration and replicationof objects,

v object sharing.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

DESIRABLE FEATURESOF A GOOD NAMING SYSTEM

1. Location transparency. Location transparency meansthat the name of an object should not reveal any hint asto the physical location of the object. That is, anobject's name should be independent of the physicalconnectivity or topology of the system, or the currentlocation of the object.

2. Location independency. For performance, reliability,availability, and security reasons, distributed systemsprovide the facility of object migration that allows themovement and relocation of objects dynamicallyamong the various nodes of a system. Locationindependency means that the name of an object neednot be changed when the object's location changes.

Furthermore, a user should be able to access an objectby its same name irrespective of the node from wherehe or she accesses it (user migration).

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Therefore, the requirement of location independencycalls for a global naming facility with the following twofeatures:

v An object at any node can be accessed without theknowledge of its physical location (locationindependency of request-receiving objects).

v An object at any node can issue an access requestwithout the knowledge of its own physical location(location independency of request-issuing objects).This property is also known as user mobility.

3. Scalability. Distributed systems vary in size rangingfrom one with a few nodes to one with many nodes.Moreover, distributed systems are normally opensystems, and their size changes dynamically.

Therefore, it is impossible to have an a priori idea abouthow large the set of names to be dealt with is liable toget. Hence a naming system must be capable ofadapting to the dynamically changing scale of adistributed system that normally leads to a change inthe size of the name space. That is, a change in thesystem scale should not require any change in thenaming or locating mechanisms.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

4. Uniform naming convention. In many existingsystems, different ways of naming objects, callednaming conventions, are used for naming differenttypes of objects. For example, file names typicallydiffer from user names and process names. Instead ofusing such nonuniform naming conventions, a goodnaming system should use the same naming conventionfor all types of objets in the system.

5. Multiple user-defined names for the same object. Fora shared object, it is desirable that different users of theobject can use their own convenient names foraccessing it. Therefore, a naming system must providethe flexibility to assign multiple user-defined names tothe same object. In this case, it should be possible for auser to change or delete his or her name for the objectwithout affecting those of other users.

6. Group naming. A naming system should allow manydifferent objects to be identified by the same name.Such a facility is useful to support broadcast facility orto group objects for conferencing or other applications.

7. Meaningful names. A name can be simply anycharacter string identifying some object. However, forusers, meaningful names are preferred to lower levelidentifiers such as memory pointers, disk blocknumbers, or network addresses.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

This is because meaningful names typically indicatesomething about the contents or function of theirreferents, are easily transmitted between users, and areeasy to remember and use. Therefore, a good namingsystem should support at least two level of objectidentifiers, one convenient for human users and oneconvenient for machines.

8. Performance. The most important performancemeasurement of a naming system is the amount of timeneeded to map an object's name to its attributes, suchas its location. In a distributed environment, thisperformance is dominated by the number of messagesexchanged during the name-mapping operation.Therefore, a naming system should be efficient in thesense that the number of messages exchanged in aname-mapping operation should be as small as possible.

9. Fault tolerance. A naming system should be capableof tolerating, to some extent, faults that occur due tothe failure of a node or a communication link in adistributed svstem network. That is, the naming systemshould continue functioning, perhaps in a degradedform, in the event of these failures. The degradationcan be in performance. functionality, or both but shouldbe proportional, in some sense, to the failures causingit.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

10. Replication transparency. In a distributed system,replicas of an object are generally created to improveperformance and reliability. A naming system shouldsupport the use of multiple copies of the same object ina user-transparent manner. That is, if not necessary, auser should not be aware that multiple copies of anobject are in use.

Objectlocation

Clientnode

N1 N2 N3

The cost is high if the object locating mechanismmaps to node N3 instead of node N1.

11. Locating the nearest replica. When a namingsystem supports the use of multiple copies of the sameobject, it is important that the object-locatingmechanism of the naming system should always supplythe location of the nearest replica of the desired object.This is because the efficiency of the object accessingoperation will be affected if the object-locatingmechanism does not take this point into consideration.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

This is illustrated by the example given below, wherethe desired object is replicated at nodes N1, N2, and N3

and the object-locating mechanism is such that it mapsto the replica at node N3 instead of the nearest replicaat node N1. Obviously this is undesirable.

N1 N2 N3

N4

The importance of locating all the replicas.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

FUNDAMENTAL TERMINOLOGIESAND CONCEPTS

• • Name

• • Human-Oriented and

System-Oriented Names

• • Name space

• • Flat Name Space

• • Partitioned Name Space

• • Name Server

• • Name Agent

• • Context

• • Name Resolution

• • Abbreviation/Alias

• • Absolute and Relative Names

• • Generic and Multicast Names

• • Descriptive/Attribute-Based Name

• • Source-Routing Name

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

The naming system is one of the most importantcomponents of a distributed operating system because itenables other sewices and objects to be identified andaccessed in a uniform manner. In spite of the imponanceof names, no general unified treatment of them exists inthe literature. This section defines and explains thefundamental terminologies and concepts associated withobject naming in distributed systems.

Name

A name is a string composed of a set of symbols chosenfrom a finite alphabet. For example, TEMPUS,#173#4879#5965, node-1!node-2!node-3!sinha, /a/b/c,25A2368DM197, etc. are all valid names composed ofsymbols from the ASCII character set. A name is alsocalled an identifier because it is used to denote or identifyan object.

A name may also be thought of as a logical object thatidentifies a physical object to which it is bound fromamong a collection of physical objects. Therefore, thecorrespondence between names and objects is therelation of binding logical and physical objects for thepurpose of object identification.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

linguistic construct

universe of discourse

corresponds

rose

What is in a name?

"What is in a name? That which we call a rose By any other name would smell as sweet."

William |Shakespeare, Romeo and Juliet, II.ii.43.

"a linguistic construct which corresponds to an object in some universe of discourse."

The OSI reference model defines a name as:

The OSI definition of a name is a very general one. It covers:

♣ Data items which identify objects by their location. Such names are called addresses.♣ It also covers names which are assigned to objects. Such names are called titles.

In the context of the name service, names allow users and thename service to communicate about objects.

Definitions

Purpose

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Expectations

In the early days of naming standardisation, it was expectedthat the naming system would support "user-friendly naming"(IFIP WG 6.5).

By user-friendly naming we mean that it is easy for a user(specifically, a human user) to remember, guess or recognisea name for an object of interest.

The first IFIP document proposed a scheme wherein a namewould be virtually any unordered collection of attribute (type,value) pairs which, following performance of a "nameresolution algorithm" over the "global naming graph", turnedout to describe one and only one object.

Problems of realisation.

Unfortunatelly, the naming scheme, based on unordered attribute(type, value) pairs, proved not to be efficiently implementable.

The fact that the components of names were unordered meantthat, in the worst case, every naming system would have to beinvolved in performing the name resolution algorithm.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Solutions

It seems that there is trade-off between the user-friendliness ofa naming scheme and the efficiency of its implementation. Thenaming system development has settled on a middle ground:

♣ Names can be formed from information about an object which a person would regard as a memorable and recognisable.

♣ On the other hand, once assigned, a name must be presented exactly by a would-be accessor. The various components of a name must appear in order. (This makes possible an efficient algorithm for determining whether a purpored nemeis actually a name or not.)

Name forms

Two forms of name are supported by the naming service:

♣ Distinguished names,♣ Alias names (normally abbreviated to aliases.

(In principle other forms could be added in the future. However,there have been no significant extensions in this area during thelast years.)

Names of both forms are constructed from attributes of relevantname system (directory) entries. More specifically, each suchname is an ordered list of realtive distinguished names (RDNs).Every entry has exactly one RDN, a set of attribute (type, value)pairs from the entry chosen.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Human-Oriented and System-OrientedNames

Names are used to designate or refer to objects at alllevels of system architecture. They have variouspurposes, forms, and properties depending on the levelsat which they are defined. However, an informaldistinction can be made between two basic classes ofnames widely used in operating systems human-oriented names and system-oriented names.

A human-oriented name is generally a character-stringthat is meaningful to its users. For example,/user/sinha/project-file-1 is a human-oriented name.Human-oriented names are defined by their users. For ashared object, different users of the object must havethe flexibility to define their own hunan-oriented namesfor the object for accessing it. Flexibility must also beprovided so that a user can change or delete his or herown name for the object without affecting those ofother users. For transparency, human-oriented namesshould be independent of the physical location or thestructure of objects they designate. Human-orientednames are also known as high-level names becausethey can be easily remembered by their users.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Human-oriented names are not unique for an objectand are normally variable in length not only fordifferent objects but also for different names for thesame object. Hence, they cannot be easily manipulated,stored, and used by the machines for identificationpurpose. Moreover, it must be possible at some level touniquely identify every object in the entire system.

Therefore, in addition to human-oriented names, whichare useful for users, system-oriented names are neededto be used efiiciently by the system. These namesgenerally are bit patterns of fixed size that can be easilymanipulated and stored by machines. They areautomatically generated by the system. They should begenerated in a distributed manner to avoid the problemsof efficiency and reliability of a centralized uniqueidentifier generator. They are basically meant for useby the system but may also be used by the users. Theyare also known as unigue identifiers and low-levelnames.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Physical addressesof the named object

A simple naming model based on the use of human-oriented andsystem-oriented names in a distributed system.

Human-orientedname

System-orientedname

FIRST-LEVELMAPPING

SECOND-LEVELMAPPING

Figure above shows a simple naming model based onthese two types of names. In this naming model, ahuman-oriented name is first mapped (translated) to asystem-oriented name that is then rnapped to thephysical locations of the corresponding object'sreplicas.

Name space

A naming system employs one or more namingconventions for name assignment to objects.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

For example, a naming system may use one namingconvention for assigning human-oriented names toobjects and another naming convention for assigningsystem-oriented names to objects. The syntacticrepresentation of a name as well as its semanticinterpretation depends on the naming convention usedfor that name. The set of names complying with a givennaming convention is said to form a name space

Flat Name Space

The simplest name space is a flat name space wherenames are character strings exhibiting no structure.Names defined in a flat name space are called primitiveor flat names. Since flat names do not have anystructure, it is difficult to assign unambiguousmeaningful names to a large set of objects. Therefore,flat names are suitable for use either for small namespaces having names for only a few objects or forsystem-oriented names that need not be meaningful tothe users.

Partitioned Name Space

When there is a need to assign unambiguousmeaningful names to a large set of objects, a namingconvention that partitions the name space into disjointclasses is normally used.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

When partitioning is done syntactically, which isgenerally the case, the name structure reflects physicalor organizational associations. Each partition of apartitioned name space is called a domain of the namespace.

Each domain of a partitioned name space may beviewed as a flat name space by itself, and the namesdefined in a domain must be unique within that domain.However, two different domains may have a commonname defined within them.

A name defined in a domain is called a simple name. Ina partitioned name space, all objects cannot beuniquely identified by simple names, and hencecompound names are used for the purpose of uniqueidentification.

A compound name is composed of one or more simplenames that are separated by a special delimitercharacter such as /, $, @, 9~, and so on (following theUNIX file system convention, the delimiter character /will be used for the examples and discussion presentedhere). For example, /a/b/c is a compound nameconsisting of three simple names a, b, and c.

A commonly used type of partitioned name space is thehierarchical name space, in which the name space ispartitioned into multiple levels and is structured as aninverted tree.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Each node of the name space tree corresponds to adomain of the name space. In this type of name space,the number of levels may be either fixed or arbitrary.

For instance, the Grapevine system manages a namespace tree having two levels, while in the XeroxClearinghouse, a name space tree has three levels.

On the other hand, the DARPA Internet DomainNaming System and the Universal Directory Serviceallow a name space tree to have arbitrarily many levels.Names defined in a hierarchical name space are calledhierarchical names.

Hierarchical names have been used in file systems formany years and have recently been adopted for namingother objects as well in distributed systems. Severalexamples of hierarchical name spaces are also found inour day-to-day life.

For instance, telephone numbers fully expanded toinclude country and area codes form a four-levelhierarchical name space and network addresses incomputer networks form a three-level hierarchicalname spaee where the three levels are for networknumber, node number, and socket number.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Distinguished names

While every name is unambiguous, distinguished names (DNs)are also unique, each object having precisely one.

The distinguished name of an object, is a sequence of RDNs ofthe object's entry and all of its superiors, starting from the root.

Because the naming data base is arranged as a tree, there is aunique path from the root to the object's entry (which does notinvolve alias entries.)

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Distinguished name as an IT path.

��

��

��

��

root

a

b

d

c

= IT entry

While every name is unambiguous, distinguished names (DNs)are also unique. (There is a unique path from the root to theobject's entry.)

If, in the figure, the RDNs of entries�,�,� and� arerepresented by a,b,c and d respectivelly, then, for example,the distinguished name of entry� would be the sequence:[a,b,c].

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Like a distinguished name (DN), alias is a path through the ITfrom the root to the object's entry. However, unlike the DN, analias name involves one or more alias entries:

In the figure, two alias entries are depicted,� and�. As a result,there are alternative paths to several of the entries, including oneto entry� which involves both alias entries. This path is shown bythe red line. The alias corresponding to this path consists of thelist of the RDNs encountered along it, excluding those of the entriespointed directly by the alias entries. This name for� is [ x,y,z,d,f ].

Alias name as an IT path.

a

c��

��

��

��e��

x

= alias entry

f

z

root

d

y b

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Names, routes and routing.

Structure Time Number

PrimitivePartitionedDescriptive

StaticDynamic

IndividualGroup

Scheme Function Time

SourceHop-by-hopBroadcast

CentralizedDistributed

StaticDynamic

Attribute

Name

Route

Map

ping

(Rou

ting

)

List of names

Sin

gle

step

map

ping

(Rou

ting

by

nam

e)

Name

Route

Mapping

Mapping

(naming function)

(routing)

A name, an address and a route.

Address

Staticallybound to object

List of namesChanging

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Distribution of the naming information .

Conceptually, the naming/directory abstract service is provided bythe directory as a whole. In reality, the directory is a collection ofindividual computer systems, directory system agents (DSAs), whichcooperate to provide the service.

The services has been designed so that its users don't need to knowhow the directory is disributed in order to use it.

There are various ways that the directory could be distributed to meetthis requirement.

Two extreme possibilities, neither of which is remotely feasible forthe global solution, although practical in a single domain, are totalcentralisation (having a single DSA hold all of the information theDIB) and total replication (having it replicated on every DSA).

Any practical solution for the global naming system will requireeach DSA to hold only some of the DIB and to route requests whichinvolve other information to the DSAs which hold it.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Naming contexts.

Naming contexts are the primary units of naming informationdistribution. Each DSA holding one or more of them.

A naming context is a set of entries constituting a subtree of theDIT. It includes at least one entry, the root of the subtree.

A naming context is partially described by the distinguished nameof its root entry. This name is called the context prefix because itis a prefix to the distinguished names of each entry in the namingcontext.

Every entry is in one, and only one, naming contexts, so that thenaming contexts partition the DIT. Such partition is depicted:

root

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Service

The naming solution, introduced earlier, shows one object, thenaming system itself, providing service to other objects, theusers, via directory user agents (DUAs). This service is calledthe naming abstract service.

The abstract service is so called because it is capable of beingrealised in many ways. The realisation which the directory standardsupports directly is the directory access protocol (DAP), an appli-cation protocol which allows the DUA and the naming/directoryservice to be in different computer systems.

The abstract service is quite simple one, intended to provide thebuilding blocks which designers of particular applications andDUA software cab use to build the higher level services whichtheir customers need. The service is defined in terms of a numberof operations which the naming/directory can perform at theDUA request.

Client AgentUser Naming

service

(DUA)

SystemAgent

(DSA)

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Abstract service

The abstract service is so called because it is capable of beingrealised in many ways. The realisation which the directory standardsupports directly is the directory access protocol (DAP), an appli-cation protocol which allows the DUA and the naming/directoryservice to be in different computer systems.

The abstract service isquite simple one, intended to provide thebuilding blocks which designers of particular applications andDUA software cab use to build the higher level services whichtheir customers need. The service is defined in terms of a numberof operations which the naming/directory can perform at theDUA request.

Functional model of the distributed naming system

The naming information-base is distributed throughout the word-wide collection of directory system agents that form the wholedirectory.

Client

(DUA)

(DSA)

SystemAgent

SystemAgent

SystemAgent

AccessDirectory

Protocol(DAP)

Directory System Protocol(DSP)

UserAgent

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Name Server

Name spaces are managed by name servers. A nameserver is a process that maintains information aboutnamed objects and provides facilities that enable usersto access that information. It acts to bind an object'sname to some of its properties, including the object'slocation.

In practice, several name servers are normally used formanaging the name space of object names in adistributed system.

Each name server normally has information about onlya small subset af the set of objects in the distributedsystem. The name servers that store the informatlonabout an object are called the authoritative nameservers of that object.

To determine the authoritative name servers for everynamed object, the name service maintains authorityattributes that contain a list of the authoritative nameservers for each object.

Partitioned name spaces are easier to manageefficiently as compared to flat name spaces becausethey enable the amount of configuration data requiredin each name server to be reduced since it need only bemaintained for each domain and not for each individualobject.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

For example, in a hierarchical name space, it issufficient that each name server store only enoughinformation to locate the authoritative narne servers forthe root domain of the name tree.

The authoritative name servers of the root domain, inturn, should know the locations of the authoritativename servers of the domains that branch out from theroot domain. In general, the authoritative name serversof a domain should know the locations of theauthoritative name servers of only those domains thatbranch out from that domain.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Domains of a hierarchical name space

DomainD1

DomainD2

DomainD3

DomainD4

DomainD5

DomainD6

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

For example, in the name space tree of Figure above allname servers must know the locations of theauthoritative name servers of domain D1; theauthorative name servers of domain D1 need only knowthe locations of the authoritative name servers ofdomains D2, D3, and D4; and the authoritative nameservers of domain D2 need only know the locations ofthe authoritative name servers of domains D5 and D6.

The amount of configuration data that must bemaintained by name servers at the various levels of thehierarchy is proportional to the degree of branching ofthe name space tree. For this reason, hierarehicalnaming conventions with several levels are often bettersuited for naming large number of objects.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Context

Names are always associated with some context. Acontext can be thought of as the environment in whicha name is valid.

Because all names are interpreted relative to somecontext, a context/name pair is said to form a gualifiedname that can be used for uniquely identifying anobject.

The notion of context has proved to be very useful forpartitianing a name space into smaller components.Often, contexts represent a division of the name spacealong natural geographical, organizational, orfunctional boundaries.

In a partitioned name space, each domain correspondsto a context of the name space. Names in a contextcan be generated independently of what names exist inany other context.

Therefore, a name may occur in more than onecontext. Contexts rnay also be nested, as in the case ofhierarchical name spaces. For example. in the namespace tree of figure below,

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Nested context

ContextC1

ContextC1

ContextC1

�� �� �� ��

�� �� �� ��

�� �� �� ��

context C3 is nested within context C2, which in turn isnested within context C1. In nested contexts, aqualified name consists of a series of namesidentifying, respectively, a context, a subcontext, asub-subcontext followed by a name inside the last sub-sub- . . . context.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

For the purpose of name management, contextsprovide a means of partitioning the naminginformation database so that it may be distributedamong multiple name servers.

Contexts represent indivisible units for storage andreplication of information regarding named objects.

Name Resolution

Name resolution is the process of mapping an object'sname to the object's properties ,such as its location.

Since an object's properties are stored and maintainedby the authoritative name servers of that object, nameresolution is basically the process of mapping anobject's name to the authoritative name servers of thatobject.

Once an authoritative name server of the object hasbeen located, operations can be invoked to read orupdate the object's properties.

Each name agent in a distributed system knows aboutat least one name server apriori.

To get a name resolved, a client first contacts its nameagent, which in turn contacts a known name server,which may in turn contact other name servers.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Absolute and Relative Names

Another method to avoid the necessity to specify thefull qualified name of an object in tree-structured namespaces is the use of the concept of current workingcontext.

A current working context is also known by the shorternames current context or working context. Accordingto this concept, a user is always associated with acontext that is his or her current context. A user canchange his or her current context whenever he orshedesires.

An absolute name begins at the root context of thename space tree and follows a path down to thespecified object, giving the context names on the path.

On the other hand, a relative name defines a path fromthe current context to the specified object. It is called arelative name because it is "relative to” (start from) theuser's current context.

For example, in the tree-structured name space offigure below,

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

A tree-structured name spaceto illustrate absolute and relative names.

context-1

Root-

�� �� ��

�� �� ��

�� �� ��

context

context-3

context-5

�� �� ��object-1 object-n

context-1

context-2

�� �� ��

�� �� ��object-1 object-m

User's currentcontext

if the user's current eontext is

root-context/context-l/context-3,

the relative namecontext-5/object-1

refers to the same object as does the absolute name

root-context/context-1/context-3/context-/object-1.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Means are also provided in this method to refer to theparent context of a context. For example, in the UNIXfile-naming convention.

In this method, a user may specify an object in any ofthe following ways:

1. Using the full (absolute) name2. Using a relative name '3. Changing the current context first and then

using a relative name

Generic and Multicast Names

The use of generic and multicast names requires thenaming system'to support one-to-many bindings. Thatis, the naming system must allow a simple name to bebound to a set of qualified names.

In a generic naming facility, a name is mapped to anyone of the set of objects to which it is bound. This typeof facility is useful in situations such as when a userwants a request to be serviced by any of the serverscapable of servicing that request and the user is notconcerned with which server services his or herrequest.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

SYSTEM-ORIENTED NAMES

• • Centralized Approach for Generating

• • System-Oriented Names

• • Distributad Approach for Generating

• • System-Oriented Names

• Generating Unique Identifiers in the

Event of Crashes

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

OBJECT LOCATING MECHANISMS

• • Broadcasting

• • Expanding Ring Broodcast

• • Encoding location of Object within

Its UID

• • Searching Creator Node First and

Than Broadcasting

• • Using Forward Location Pointers

• Using Hint Cache and Broadcasting

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Object locating is the process of mapping an object'ssystem-oriented unique identifier (UID for short) to thereplica locations of the object.

In a distributed system, object locating is only theprocess of knowing the object's location, that is, thenode on which it is located.

On the other hand, object accessing involves theprocess of carrying out the desired operation (e.g., read,write) on the object. Therefore, the object-accessingoperation starts only after the object-locating operationhas been carried out successfully.

Several object-locating mechanisms have beenproposed and are being used by various distributedoperating systems.

Broadcasting

In this method, an object is located by broadcasting arequest for the object from a client node. The request isprocessed by all nodes and then the nodes currentlyhaving the object reply back to the client node.Amoeba uses this method for locating a remote port.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Broadcasting object-locating mechanism

�� Broadcast request message.�� Reply from the node on which the object is located.

Objectlocation

Clientnode

��

��

��

��

The method is simple and enjoys a high degree ofreliability because it supplies all replica locations of thetarget object.

However, it suffers from the drawbacks of poorefficiency and scalability because the amount ofnetwork traffic generated for each request is directlyproportional to the number of nodes in the system andis prohibitive for large networks.

Therefore, this method is suitable only when thenumber of nodes is small, communication speed is high,and object-locating requests are not so frequent.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Expanding Ring Broodcast

Pure broadcasting is expensive for large networks.Moreover, direct broadcasting to all nodes may not besupported by wide-area networks. Therefore, amodified form of broadcasting, called expanding ringbroadcast is normally employed in an internetwork thatconsists of local area networks (LANs) connected bygateways.

In this method, increasingly distant LANs aresystematically searched until the object is found or untilevery LAN has been searched unsuccessfully.

The distance metric used is a hop. A hop correspondsto a gateway between processors.

For example, if a message from processor A toprocessor B must pass through at least two gateways, Aand B are two hops distant. Processors on the sameLAN are zero hop distant. A ring is the set of LANs acertain distance away from a processor. Thus, Ring0[A]is A's local network, Ring1[A] is the set of LANs onehop away, and so on.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Broadcasting object-locating mechanism

NAME SERVICE

Objectlocation

Clientnode

1

1

1

1

2

2

2

23

3

3

3

�� Searching nodes at 0 hope distance.�� Searching nodes at 1 hope distance if the search of 0 hop fails.�� Searching nodes at i hope distance if the searches up to i -1 hopes fail.

An ERB search works as follows. Suppose thatprocessor A needs to locate object X. Beginning with i= 0, a request message is broadcast to all LANs inRing0[A]. If a response is received, the search endssuccessfully. Otherwise, after a timeout period haselapsed, i is incremented by 1 and the requestbroadcast is repeated. The ring size i is bounded fromabove by the diameter of the internetwork.

This method does not necessarily supply all the replicalocations of an object simultaneously, although it doessupply the nearest replica location.

The efficiency of an object-loeating operation isdirectly proportional to the distance of the object fromthe client node at the time of locating it.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Encoding location of Object within Its UID

��

�� Extracting object's location from its UID. No message exchange with any other node is required for locating the object.

Object-locating mechanism encods the location of an object within its UID.

This scheme uses structured object identifiers. Onefield of the structured UID is the location of the object.Given a UID, the system simply extracts thecorresponding object's location from its UID byexamining the appropriate field of the structured UID.The extracted location is the node on which the objectresides.

This is a straightforward and efficient scheme. Onerestriction of the scheme.however, is that an object isnot permitted to move once it is assigned to a node,since this would require its identifier to change.Consequently, an object is fixed to one nodethroughout iks lifetime.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Another limitation of the scheme is that it is not clearhow to support multiple replicas of an object.Therefore, the use of this object-locating scheme islimited to those distributed systems that do not supportobject anigration and object replication. ,

Searching Creator Node First and ThanBroadcasting

This scheme is a simple extension of the previousscheme. The included extension is basically meant forsupporting object migration facility. The method isbased on the assumption that it is very likely for anobject to remain at the node where it was created(although it may not be always true). This is becauseobject migration is an expensive operation and objectsdo not migrate frequently.

In this scheme. the location field of the structured UIDcontains the identifier of the node on which the objectwas created. Given a UID, the creator node informationis extracted from the UID and a request is sent to thatnode. If the object no longer resides on its creator node,a failure reply is returned back to the client node. Incase of failure, the object is located by broadcasting therequest from the client node. This method of objectlocating is used in.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

�� Searching the creator node.�� Negativ reply.�� Broadcast request message.�� Reply from the node on which the object is located.

Creator node

����

��

��

Creator node

ques t

����

��

����

��

��

��

��

��

�� , �� , �� Path of message forwarding.�� Reply from the node on

which the object is located.

�� Searching of local cache.�� Broadcast request message.�� Reply from the node on which the object is located.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

As compared to the broadcasting scheme, this methodhelps in reducing the network traffic to a great extent.

The scheme is more flexible than the method ofencoding the location of an object within its UIDbecause it allows the system to support objectmigration. However, the use of broadcast protocol tolocate those objects that are not found on their creatornodes limits the scalability of this mechanism.

Using Forward Location Pointers

This scheme is an extension of the previous scheme.The goal of this extension is to avoid the use ofbroadcast protocol. A forward location pointer is areference used at a node to indicate the new location ofan object.

Whenever an object is migrated from one node toanother, a forward location pointer is left at its previousnode. Therefore, to locate an object, the system firstcontacts the creator node of the object and then simplyfollows the forward pointer or chain of pointers to thenode on which the object currently resides.

The method has the advantages of totally avoiding theuse of broadcast protocol and allowing the support ofobject migration facility.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

However, the method practically has the followingmajor drawbacks:

1. The object-locating cost is directly proportionalto the length of the chain of pointers to betraversed and grows considerably as the chainbecomes longer.

2. It is difficult, or even impossible, to locate anobject if an intermediate pointer has been lost oris unavailable due to node failures. Therefore,the reliability of the mechanism is poor.

3. The method introduces additional systemoverhead for upkeep.

Using Hint Cache and Broadcasting

Another commonly used approach is the cache-broadcast scheme. In this method, a cache ismaintained on each node that contains the (UID, lastknown location) pairs of a number of recentlyreferenced remote objects.

Given a UID, the local cache is examined to determineif it has an entry for the UID. If an entry is found, thecorresponding location information is extracted fromthe cache. The object access request is then sent to thenode specified in the extracted location information.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

If the object no longer resides at that node, however,the request is returned with a negative reply, indicatingthat the location information extracted from the cachewas outdated.

If the specified UID is not found in the local cache or ifthe localion information of the object in the local cacheis found to be outdated, a message is broadcastthroughout the network requesting the current locationof the object.

Each node that receives the broadcast request performsan internal search for the specified object. A replymessage is returned to the client node from the node onwhich the object is found. This location of the object isthen recorded in the client node's cache. Notice that acache entry only serves as a hint because it is notalways correct.

This scheme can be very efficient if a high degree oflocality is exhibited in locating objects from a node. Itis also flexible since it can support object migrationfacility.

The method of on-use update of cached informationavoids the expense and delay of having to notify othernodes when an object migrates.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

The broadcast requests will clutter up the network,disturbing all the nodes even though only a single nodeis directly involved with each object-locating operation.

This is the most eommonly used object-locatingmechanism in modern distributed operating systems. Itis used in .Amoeba, V System, DOMAIN, NEXUS,Mach, and Chorus.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

HUMAN-ORIENTED NAMES

• • Human-Oriented Hierarchical NamingSchemes

♦ Combining an Object's Local Name with

Its Host Name

♦ Interlinking Isolated Name Spaces into a

Single Name Space

♦ Sharing Remote Name Spaces on ExplicitRequest

• • Context Binding

♦ Table-Based Strategy

♦ Procedure-Based Strategy

• • Distribution of Contexts and NameResolution Mechanisms

♦ Centralized Approach

♦ Fully Replicated Approach

♦ Distribution Based on Physical Structure

of Name Space

♦ Structure-Free Distribution of Contexts

♦ Interacting with Name Servers During Name Resolution.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

System-oriented names such as 31A5 285F AD19B1C8, though useful for machine handling, are notsuitable for use by users. Users will have a tough time ifthey are required to remember these names or typethem in.

Furthermore, each object has only a single system-oriented name, and therefore all the users sharing anobject must remember and use its only name.

To overcome these limitations, almost all namingsystems provide the facility to the users to define anduse their own suitable names for the various objects inthe system.

These user-defined object names, which form a namespace on top of the name space for system-orientednames, are called human-oriented names.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Human-oriented names normally have the followingeharacteristics:

1. They are character strings that are meaningfulto their users.

2. They are defined and used by the users.3. Different users can define and use their own

suitable names for a shared object. That is, thefacility of aliasing is provided to the users.

4. Human-oriented names are variable in lengthnot only in names for different objects but evenin different names for the same object.

5. Due to the facility of aliasing, the same namemay be used by two different users at the sametime to refer to two different objects.Furthermore, a user may use the same name atdifferent instances of time to refer to differentobjects. Therefore, human-oriented names arenot unique in either space or time.

Because of the advantages of easy and efficientmanagement of name space, hierarchically partitionedname spaces are commonly used for human-orientedobject names.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

The names of a hierarchical narning system are of theform cl/c2/. . . /cj, should i be constant or arbitrary?

The main advantage of the constant-level scheme isthat it is simpler and easier to implement as comparedto the arbitrary-level scheme. This is because allsoftware in the arbitrary-level scheme must be able tohandle an arbitrary number of levels, so software formanipulating names tend to be more complicated thanthose for constant-level scheme. The disadvantage ofthe constant-level scheme is that it is diffcult to decidethe number of levels, and if new levels are to be addedlater, considerably more work has to be done becauseall the algorithms for name manipulation must beproperly changed to take care of the new levels.

On the other hand, arbitrary-level schemes have theadvantage of easy expansion by combiningindependently existing name spaces into a single namespace. For example, as shown in figure below, twoindependent name spaces may be combined into onename space by adding a new root, making the existingroots its children. The major advantage is that if a namewas unambiguous within its old name space, it is stillunambiguous within its new name space, even if thename also appeared in some other name space that wascombined. There is no need to change any of thealgorithms for manipulating names.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Combining two name spacesto form a single name space by adding a new root

root-1

user-1 user-2

project-1

file-1

root-1

user-1 user-2

project-1

file-1

new-root

Componentname space A

Componentname space B

The new name space

Arbitrary-level schemes, being more flexible thanconstant-level schemes, are used by most recentdistributed systems. Hence, subsequent sections of thischapter deal with arbitrary-level hierarchical namespaces.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

The major issues associated with human-orientednames are as follows:

1. Selecting a proper scheme for global objectnaming

2. Selecting a proper scheme for partitioning a namespace into contexts

3. Selecting a proper scheme for implementingcontext bindings

4. Selecting a proper scheme for name resolutionThese isue are described in the next section.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Interacting with Name ServersDuring Name Resolution.

Various contexts of a given pathname may be stored atdifferent name servers. Therefore, the resolution of apathname in such a situation will involve interactingwith all the name servers that store one or morecontexts of the pathname. During name resolution, aname agent may interact with the name servers in oneof the following manners:

1. Recursive. In this method, the name agent forwards thename resolution request to the name server that storesthe first context needed to start the resolution of thegiven name.

After this, the name servers that store the contexts of

the given pathname are recursively activated one afteranother until the authority attribute of the named objectis extracted from the context corresponding to the lastcomponent name of the pathname.

The last name server returns the authority attribute to

its previous name server, which then returns it to itsown previous name server, and so on.

Finally, the fast name server that received the request

from the name agent returns the authority attribute tothe name agent.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2

3

Recursive resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 10

uu

uu = required data

NAME SERVICE

4

56

7

8

9

As an example, if the name /a/b/c/d is to be resolved,the name agent sends it to the name server (say SA) ofthe root context (/) and waits for a reply.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Then SA searches for the component name a in the rootcontext, extracts the corresponding bindinginformation, sends the remaining pathname b/c/d to thename server (say SB) of the next context (/a), and waitsfor a reply. Then SB extracts from context /a thebinding information corresponding to the componentname b, sends the remaining pathname c to the nameserver (say SC) of the next context (/a/b), and waits fora reply. Then SC extracts from context /a/b theauthority attribute corresponding to the componentname c and returns it to SB,. which in turn returns it toSA, and finally S, retums it to the name agent. The name agent has little work to do but the nameservers may be involved in processing several requestsat the same time. Therefore, the name servers may getoverloaded in situations where the number of nameagents is too large as compared to the number of nameservers. Hence, this mechanism is not suitable for use in thosesystems in which the ratio of name agents to nameservers is very high. Furthermore, to allow a nameserver to start another job when waiting for a response,the name servers have to be multiprogrammed.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2. Iterative. In this method, name servers do not call each other

directly. Rather, the name agent retains control overthe resolution process and ane by one calls each of theservers involved in the resolution process.

2

3

Sequential multicasting resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 10

uu

uu = required data

NAME SERVICE

5

7

8

64

9

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

As in the recursive process, the name agent first sends

the name to be resolved to the name server that storesthe first contest needed to start the resolution of thegiven name.

2

3c

Parallel iterative resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 4

uu

uu = required data

NAME SERVICE

3b

3a222

3d

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2

7

Sequential iterative resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 10

uu

uu = required data

NAME SERVICE

5

3 8

64

9

The server resolves as many components of the name

as possible. If the name is completely resolved, theauthority attribute of the named object is returned bythe server to the name agent.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Otherwise. the server returns to the name agent the

unresolved portion of the name along with the locationinformation of another name server that the name agentshould contact next.

To continue the name resolution. The name agent sends

a name resolution request along with the unresolvedportion of the name to the next name server. Theprocess continues until the name agent receives theauthority attribute of the named object.

3. Transitive.

The name agent first sends the resolution request to thename server that stores the first context needed to startthe resolution process.

The server resolves as many components of the nameas possible. It then passes on the unresolved portion ofthe name to the name server that stores the nextcontext needed to proceed with the resolution process.

This name server resolves as many components of thename as possible and then passes on the unresolvedportion of the name to the next name server. Theprocess continues and the name server that encountersthe authority attribute of the named object returns itdirectly to the name agent.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2

3

Transitive resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 7

uu

uu = required data

NAME SERVICE

4

5

6

Notice that, as in the recursive method, in this methodalso the name agent has little work to do.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Also notice from that the transitive approach requiresthe fewest number of messages. However, a senderdoes not receive any acknowledgment message once itpasses on the resolution operation to another server.

Therefore, this approach should be used in systemswith reliable communication. On the other hand,recursivie and iterative approaches can be efficientlysupported by RPC-based communication systemsbecause they use a "call-response" model.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2 7

Agent based referral resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 8

uu

uu = required data

NAME SERVICE

5

3 6

4

Nothingknown

ReferralServer D

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

2

7

Server based referral resolution protocol

ServerD

ServerC

ServerB

ServerA

Client

agentUser

1 10

uu

uu = required data

NAME SERVICE

5

3 64 Referral

Server DNothingknown

89

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

NAME CACHES

• • Types of Name Caches

• • Approaches for Name Cache

Implamentation

• • Multicache Consistency

• • Immediate Invalidate

• • On-Use Update

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Client based cache

Client ClientServer

Caching at the client is an effective way of pushing the proces-sing workload from the server out to client devices,if a clienthas the capacity.

Caching is an important technique for building responsive,scalable distributed systems. A cache can be maintaned eitherby the client or the server or by both.

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Server based cache

If results data likely to be reused by multiple clients or if the clientdevices do not have the capacity then caching at the server is moreeffective.

Client ClientServer

Multi-level caching

Caches can be miantaned at multiple levels. For example, cachescan be maintaned at all clients and all servers. Use of a cache at onelevel reduces the number of requests handled at the levels below.

Client ClientServer

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems

SUMMARY

Fehér Gyula [email protected]

TEMPUS S_JEP-12495-97 Distributed Systems andDistributed Operating Systems