Name Services - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

Name Services

Description:

... of directory entries called directory information tree (DIT) ... Tree (DIT) ... Similar to DNS, the DIT is usually partitioned and distributed ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 59
Provided by: CIT788
Category:
Tags: dit | name | services

less

Transcript and Presenter's Notes

Title: Name Services


1
Name Services
  • Name, Identifier and Addresses
  • Name Space and Name Resolution
  • Domain Name System and Organization
  • Domain Queries and Servers
  • Directory and Discovery Services
  • Directory Service X.500
  • Discovery Services
  • Locating Mobile Entities

2
Name, Address and Identifier
  • The Problem
  • A process requests to make a connection (access)
    to a named entity in a distributed system. How???
  • Large number of entities and widely distributed
  • Performance minimize the searching cost and
    delay
  • Entity can be anything in the system, i.e.,
    processes, resources, data, hardware, etc..
  • Three problems needed to be considered
  • Naming, location and the route to the entity
  • Routing networking issue (find the shortest path
    for connection)
  • Name gt address gt location (naming convention)
  • If we know the address, then we know the location
  • Name a string of bits or characters that is used
    to refer to an entity
  • Human-readable name /etc/passwd and www.cdk4.net
  • System dependent codes IP address, LAN address
    (mapping name to its address)
  • Similar to a path name. Once you have identified
    the starting node, then you know the location of
    the referring entity

3
Name, Address and Identifier
  • Address
  • Access to an entity through an access point
  • The name of an access point is called an address
  • An entity may have multiple access points
  • An address may be a name for referring to an
    entity if mobility or reallocation is infrequent
  • Mobility may change the access point
    (location-dependent), i.e., enter into another
    network
  • Identifier a unique ID to identify an entity (a
    name maps to an identifier)
  • Name gt identifier (entity) gt address gt
    location
  • Requirements of a true identifier
  • An identifier refers to at most one entity
  • Each entity is referred to by at most one
    identifier
  • An identifier always refers to the same entity

4
Names and Resources
  • Large number of entities gt needs a
    convention/method to organize them
  • Currently, different name systems are used for
    different types of resources
  • resource name identifies
  • file pathname file within a given file system
  • process process id process on a given computer
  • port port number IP port on a given computer
  • I.e., Uniform Resource Identifiers (URI) offer a
    general solution for any type of resources in the
    Internet. There two main classes
  • URL (Uniform Resource Locator)
  • Typed by the protocol field (http, ftp, nfs,
    etc.)
  • Part of the name is service-specific
  • Resources cannot be moved between domains
    (identifier ? address)
  • URN (Uniform Resource Name)
  • Requires a universal resource name lookup service
    - a DNS-like system for all resources

5
Composed Naming Domains
Fr. Dollimore
Name server
System address Vs. network address
6
Name Services
  • Naming services
  • Name (identifier) gt address gt location
  • Name resolution
  • Receiving a name and then identify the referring
    entity and then its address to access to (simply
    based on the name, we may not be able to identify
    the location of the entity)
  • A name point to an entry which contains the
    address of the named entity
  • Problems
  • How to locate the entry for the named entity? How
    to organize them?
  • Unification
  • Different systems use the same naming scheme
  • Integration
  • Integration of different naming systems
  • Naming system requirements
  • Handle arbitrary (large) number of names, long
    lifetime, fault tolerance, high availability,
    tolerance mistrust (what is mistrust?)
  • How to achieve the above requirements?
  • Good naming system and structured organization to
    facilitate management and searching (i.e., using
    a graph or a tree)

7
Name Spaces
  • Naming convention and examples
  • surname and first name
  • In Unix, hierarchical name, /etc/passwd
  • Relative name ../images/figure1.jpg the
    servers host name and the server directory to
    which this pathname is referred are taken by a
    browser
  • Domain names www.cdk4.net (a group of named
    entities)
  • Aliases a symbolic name allowing a convenient
    name to be substituted for a more complicated
    name (may not be unique globally)
  • Name space the collection of all valid names
    recognized by the system
  • Naming domain is a name space for which there
    exists a single overall administrative authority
    for assigning names within it
  • Some of the names in the name space may be
    unbounded (valid but currently no entity is
    referring to)

8
Name Spaces
  • Structured organization A name space can be
    represented as a labelled, directed graph (naming
    graph) with two types of nodes, leaf nodes and
    directory node
  • Leaf node is an entity that can be referred to
    or it contains the address of an entity
  • Directory node has a number of outgoing edges
    each label with a name. It stores a directory
    table in which an outgoing edge is represented
    as a pair (edge label, node identifier) for
    searching an entity
  • The directory node with no incoming edge is
    called root
  • The graph needs to be acyclic, why???
  • Path absolute path Vs. relative path
  • Name global name Vs local name
  • A naming graph may be managed by one or more name
    servers

9
Naming Graph
  • A general naming graph with a single root node

Note two paths to n5
Fr. Tanenbaum
10
Name Resolution (Logical)
  • Names are managed by name servers which maintains
    the directory table (organized as a tree/graph)
  • Given a path name N ltlabel-1, label-2, ,
    label-ngt
  • Iterative searching resolution starts at node N
    of the naming graph (normally the root)
  • Search the directory table for label-1 to return
    the identifier node that label-1 is referring to
  • Then go to the returned identifier and repeat the
    process until label-n is reached
  • The search may cover multiple name spaces linked
    (mounted) together
  • A directory node has an edge pointing to a node
    in another name space (handled by another server)
  • The searching delay depends on how to organize
    the tree/graph and the partition of the graph
  • Additional overhead is the reorganization of the
    graph
  • Under which situations, we need to reorganization
    graph?

11
Linking and Mounting
Fr. Tanenbaum
  • The concept of a symbolic link explained in a
    naming graph
  • A node contains a path name

12
Linking and Mounting
  • Mounting remote name spaces through a specific
    access protocol

Fr. Tanenbaum
13
Name Space Distribution (i.e., DNS)
  • Divide the whole space into layers to facilitate
    the searching
  • Some assumptions (i.e., reallocation and renaming
    are infrequent for some of the entities)
  • Global layer
  • Root and its children
  • Relative stable (seldom change in locations and
    number)
  • Administrational layer
  • Directory nodes managed within an organization
  • Managerial layer
  • The nodes may change regularly (delete,
    reallocate and insert)
  • What can be done after making such
    classification?
  • Due to high degree of stability, the performance
    and availability can be improved by replication
    and caching (i.e., the higher layers)
  • Difference between replication and caching???
  • What will be the problem if all of them are
    changing frequently?

14
Name Space Distribution (i.e., DNS)
  • An example partitioning of the DNS name space,
    including Internet-accessible files, into three
    layers.

Fr. Tanenbaum
A zone managed by a name server
15
Name Space Distribution (i.e., DNS)
Fr. Tanenbaum
  • A comparison between name servers for
    implementing nodes from a large-scale name space
    partitioned into a global layer, an
    administrational layer, and a managerial layer

16
Name Resolution Implementation
  • Name spaces are distributed across multiple name
    servers
  • A client passes a name for resolution
  • Where to start? Normally indicated in the request
    (starting node)
  • How to process the request in the distributed
    name servers?
  • Methods
  • Iterative
  • Recursive
  • Non-recursive

17
Iterative Navigation
Fr. Dollimore
  • DNS Client presents entire name to servers,
    starting at a local server, NS1.
  • If NS1 has the requested name, it is resolved
    (has an entry indicating the location of the
    referring entity), else NS1 suggests contacting
    NS2 (a server for a domain that includes the
    requested name)

18
Iterative Navigation
  • The principle of iterative name resolution

Fr. Tanenbaum
19
Recursive Name Resolution
  • The principle of recursive name resolution

Fr. Tanenbaum
20
Non-recursive Recursive Server-controlled
Navigation
Fr. Dollimore
A name server NS1 communicates with other name
servers on behalf of a client
  • 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

21
Caching in Name Resolution
Fr. Tanenbaum
  • Recursive name resolution of ltnl, vu, cs, ftpgt.
    Name servers cache intermediate results for
    subsequent lookups

22
Navigation Cost
Fr. Tanenbaum
  • The comparison between recursive and iterative
    name resolution with respect to communication
    costs
  • Time delay and cost in communication

23
DNS - Domain Name System
  • A distributed naming database for Internet
  • Name structure reflects administrative structure
    of the Internet
  • Organized as a hierarchical tree
  • Rapidly resolves domain names to IP addresses
  • Exploits caching heavily
  • Typical query time 100 milliseconds
  • Scales to millions of computers
  • Partitioned and replicated database
  • Caching
  • Resilient to failure of a server
  • Replication
  • Basic DNS algorithm for name resolution (domain
    name -gt IP number)
  • Look for the name in the local cache
  • Try a superior DNS server, which responds with
  • Another recommended DNS server
  • The IP address (which may not be entirely up to
    date)

24
DNS Server Functions
  • The Internet DNS is primarily for
  • Host name resolution, i.e., host name -gt IP
    address
  • Mail host location
  • Reverse resolution, i.e., IP address -gt host name
  • Host Information, i.e., operating systems,
    machine architecture
  • Well-know services, i.e., telnet, FTP, etc.
  • Caches the results of previous searches until
    they pass their time to live (TTL)
  • How to determine the value for TTL?
  • What need to be done if the IP address
    information changes before the TTL expired?
  • The add/delete of a name is done by an
    authoritative administrator manually editing the
    name database (replicated)

25
DNS (Domain Name System)
  • Naming domain is a name space for which there is
    a single administrative authority for assigning
    names within it
  • Name of a domain is the common suffix of domain
    names within it
  • Name server of a domain is a server which does
    the mapping between domain names and IP addresses
  • Domain name space is partitioned both
    organizationally and geographically
  • Domains never overlap
  • The top-level domains are
  • com, edu, gov, mil, net, org, us, uk, hk, cn,
    ..
  • The DNS name space is divided into domains
    (zones)
  • Each domain has a name server which manages the
    name database of the local domain
  • Each name server contains pointers to higher
    level domain servers and caches the addresses of
    other servers
  • Each name server contains the names and addresses
    of at least two name servers that provide
    authoritative data for the zone

26
DNS Name Servers
  • DNS name resolution model

Root NS
NS
NS
Domain boundary
Local domain NS
Client
destination NS
27
Primary Secondary Servers
  • For fault tolerance, there are two servers
    providing authoritative data in a domain
  • Primary server the server reads the domain data
    directly from a local master file (edited by
    system administrator)
  • Secondary server it down loads the domain data
    from the primary server and communicates with the
    primary periodically to keep its data up-to-date

28
Data Files for Name Servers
  • A name server (primary or secondary) uses 3 data
    files for name resolutions
  • Name resolution file names to IP addresses
  • i.e. db.cs.cityu.edu.hk
  • Reverse translation file IP addresses to names
  • i.e. db.120.214.144
  • Cached database file data learnt from previous
    queries
  • i.e. db.cache
  • Note db.cs.cityu.edu.hk, db.120.214.144, and
    db.cache are file names

29
Resource Record
  • Zone data are stored by name servers in resource
    records
  • The data for a zone starts with an SOA (start of
    authority) record containing the zone parameters
  • An A (address) represents a particular host in
    the Internet
  • MX (mail exchange) is a symbolic link to a node
    representing a mail server
  • NS (name server) contains the name of a name
    server that implements the zone represented by
    the node
  • CNAME contains the canonical name of a host
  • DNS maintains an inverse mapping of IP addresses
    to host names by means of PTR (pointer)
  • HINFO contains additional information on a host
  • TXT are used for any kind of data that a user
    finds useful to store about the entity
    represented by the node

30
DNS Resource Records
Record type
Meaning
Main contents
A
A computer address
IP number
NS
An authoritative name server
Domain name for server
CNAME
The canonical name for an alias
Domain name for alias
SOA
Marks the start of data for a zone


Parameters governing the zone
WKS
A well-known service description
List of service names and protocols
PTR
Domain name pointer (reverse
Domain name
lookups)
HINFO
Host information
Machine architecture and operating
system
preference, host
MX
Mail exchange
List of lt
gt pairs
TXT
Text string
Arbitrary text
Fr. Dollimore
31
DNS Resource Records
Fr. Tanenbaum
32
DNS Resource Records
Fr. Tanenbaum
An excerpt from the DNS database for the zone
cs.vu.nl
33
DNS Issues
  • 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

34
Directory and Discovery Services
  • DNS given a name gt an IP address (a node
    containing a set of attributes)
  • Directory services
  • Yellow pages' for the resources in a network
  • A node contains an address, a name and a set of
    attributes
  • Retrieve the set of entities whose attributes
    satisfy a set of conditions (List out the names
    of all lecturers in CS dept)
  • e.g. X.500, LDAP, MS Active Directory Services
  • 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 and the 'service location protocol'

35
Directory Services X.500
  • A directory entry (record) in X.500 is made up of
    a collection of (attribute, value)
  • The collection of all directory entries in an
    X.500 directory service is called a directory
    information base (DIB)
  • Each entry is unique by a set of naming
    attributes called relative distinguished name
    (RDN)
  • The use of unique names by listing RDNs in
    sequence leads to a hierarchy of the collection
    of directory entries called directory information
    tree (DIT)
  • A node can be a directory and a record
  • Node N is a directory entry
  • Also, it has two children
  • X.500 provides two main types of access request
    read and search
  • read given a name and a list of attributes (path
    name), it searches the DIT and returns a set of
    attribute values of the named entry
  • I.e., /CNL/OVrije Universiteit/OUMath. Comp.
    Sc/CN Main Server
  • search given a base name and a filter
    expression, it returns a list of names whose
    entries are below the base node and satisfy the
    filter conditions

36
Directory Services X.500
Fr. Tanenbaum
An example of a X.500 directory entry using X.500
naming conventions
37
Directory Information Tree (DIT)
Fr. Tanenbaum
Node N corresponding to the directory entry shown
in the previous example
38
Directory Information Tree (DIT)
Fr. Tanenbaum
39
X.500 Implementation
  • Similar to DNS, the DIT is usually partitioned
    and distributed across several servers called
    DSAs (directory server agents)
  • DUA (directory user agent) on each client
    computer
  • Light-weight directory access protocol (LDAP) an
    application level protocol implemented on top of
    TCP
  • The DSA interface includes operations of add,
    delete and modify of entries.
  • Access control is required for both queries and
    updating operations.
  • X.500 does not address implementation issues. It
    only defines the interface and specifies
    functions.
  • The implementation and application of X.500 is
    still at a pilot stage

40
X.500 Service Architecture
Fr. Dollimore
41
Discovery Services
  • When a client enters a new service area,
  • The system needs to update its location (and
    system status)
  • The object needs to determine how to join it
    (registration) and what are the services provided
    in the space
  • I.e., A client enters a hotel carrying a notebook
    and wants to print a document
  • A discovery service is a directory service in
    which services in a service are registered and
    looked up by their attributes
  • Types of services device directory and service
    directory
  • Device directory records the names and addresses
    of co-present devices
  • Select one of the devices for connection and to
    require for services
  • Service directory records what are the services
    provided in the smart space
  • Submit a request (query) for a particular type of
    service
  • The system will select one of the devices to
    provide the service to the requesting client

42
Discovery Services
  • Directory query operations
  • Registration and de-registration of services
  • Look-up for services
  • Directory discovery problems
  • Directory data required by a client are dynamic
    and generated at run-time (as a function of the
    context of the client)
  • May be no infrastructure (distributed Vs.
    centralized) to hold the directory server
  • The services registered in a directory are
    dynamic too
  • The new object may be a service provider
  • The protocols used for accessing the directory
    need to be energy sensitive
  • Note that a service may disappear spontaneously.
    Why?
  • Using leasing a lease is temporary allocation of
    a service by a server to a client. It can be
    renewed by a further request (refresh) from the
    client before the deadline expires

43
The interface to a discovery service
Fr. Dollimore
44
Directory Server Vs. Serverless
  • For systems with a fixed infrastructure and the
    directory server is a powerful robust machine
  • Directory server maintains a set of description
    of services
  • The client issues a multicast request to locate
    the directory server
  • The directory server responds with its unicast
    address
  • They communicate point-to-point with each other
  • If no pre-defined powerful directory server, the
    directory server may be elected from the group of
    devices within the space
  • Problems disappear of the elected server
    (re-election). The cost for re-election depends
    on the degree of volatility of the system

45
Directory Server Vs. Serverless
  • No fixed infrastructure and no powerful machine
    to be acted as a server
  • The participating devices collaborate with each
    other to implement the service directory. How?
  • Event synchronization problem all changes have
    to be propagate to all the member before any
    change can be updated (S1-gtS2-gtS3)
  • Push model services multicast their description
    regularly. Clients listen for the multicasts and
    run their queries against them
  • Pull model clients multicast their queries.
    Devices providing services run the queries
    against their descriptions, and only response
    with any description that match. Clients repeat
    their queries periodically if there is no
    response

46
Push Vs. Pull
  • Consideration energy and bandwidth consumption
  • Every time a device issues a multicast message,
    bandwidth is consumed and all listening clients
    expend energy receiving the message
  • In a pure push model, devices need to multicast
    their services even there is no client
  • In a pure pull model, a client can discover
    services as soon as it appears. But, the client
    may receive multiple responses from different
    devices

47
Locating Mobile Entities
  • DNS assumption the changes in addressing
    information is infrequent
  • What will be the impact of changing addressing
    information (i.e., reallocation)?
  • I.e., moving ftp.cs.vn.nl to a new machine named
    ftp.cs.unisa.edu.au
  • Replicated servers and caches
  • Need reorganization of the hierarchical tree
  • Solutions
  • (1) record the address of the new machine in the
    DNS database for cs.vu.nl
  • (2) record the name of the new machine in
    ftp.cs.vu.nl (a symbolic link)
  • Problems
  • (1) Frequent reorganization if reallocation is
    frequent
  • (2) The search time is longer
  • Entity gt address
  • Entity gt entity ID gt address
  • Separate naming from location entities by
    introducing identifiers which is a globally
    system recognizable ID that will not be changed
  • Locating an entity is handled by a location
    service which accepts an identifier and then
    returns an address of the referring entity

48
Home-Based Approach
  • Home location maintains the current location of
    an entity
  • Each mobile host has a fixed IP address. All
    communications to that IP address is initially
    directed to the mobile hosts home agent located
    using the fixed IP address
  • Whenever the mobile host moves to another
    network, it requests a temporary address from the
    new network, the care-of-address
  • The care-of-address is registered at the home
    agent
  • If the home agent receives a packet for the
    mobile host, it looks up the hosts current
    location. If it is on the current network, the
    packet is forwarded as usual.
  • Otherwise, it is tunneled to the hosts current
    location to the care-of-address. At the same
    time, the sender of the packet us informed of the
    hosts current location
  • Problems
  • Always need to contact the home agent
  • A fixed home agent

49
Home-Based Approach
Fr. Tanenbaum
  • The principle of Mobile IP

50
Hierarchical Approach
  • A network is divided into a collection of domains
  • There is a single top-level (root)
  • A lowest-level domain, called a leaf domain,
    contain mobile entities
  • Each domain D has an associated directory node
    dir(D) that keeps tracks of the entities in that
    domain
  • Each entity currently located in a domain D is
    represented by a location record in the directory
    node dir(D)
  • A location record for entity E in the directory
    node N for a leaf domain D contains the entitys
    current address in that domain
  • The directory node N for the next higher-level
    domain D that contains D have a location record
    for E containing only a pointer to N
  • The directory node of the root has the location
    records for all the entities either as pointers
    or addresses

51
Hierarchical Approach (Lookup)
  • A client wishing to locate an entity E issues a
    lookup request to the directory node of the leaf
    domain D in which it resides
  • If the directory node of the leaf domain D does
    not contain a location record for the entity E,
    the node forwards the requests to its parent
  • Once the request reaches a directory node
    containing a location record for E, the request
    will be forwarded down following the its location
    pointer until the leaf node containing its
    address is reached
  • The lookup operation explores the concept of
    locality. What???

52
Hierarchical Approach (Insert delete)
  • Insert
  • An entity E has created a replica in leaf domain
    D
  • The insertion request is initiated by the leaf
    node D to its parent until it reaches a directory
    node M that already contains a location record
    for E
  • Node M then stores a pointer in the location
    record for E referring to the child node from
    where the insert request was forwarded
  • The process is repeated until leaf node D is
    reached. Then, leaf node D insert the address of
    E into its location record
  • Delete
  • When address for an entity E in leaf domain D
    needs to be removed, directory node dir(D) is
    requested to remove that address from its
    location record for E
  • If the record becomes empty, the record can be
    removed
  • If the location record for E at the parent now
    also becomes empty, the record should be removed
    as well and the next higher-level directory node
    should be informed

53
Hierarchical Approach
  • Hierarchical organization of a location service
    into domains, each having an associated directory
    node

Fr. Tanenbaum
54
Hierarchical Approach
Fr. Tanenbaum
55
Hierarchical Approach
  • Looking up a location in a hierarchically
    organized location service.

Fr. Tanenbaum
56
Hierarchical Approach (insert)
  • An insert request is forwarded to the first node
    that knows about entity E.

Fr. Tanenbaum
57
Hierarchical Approach
  • A chain of forwarding pointers to the leaf node
    is created

Instead of changing the pointers of the directory
node, a pointer may be created at the leaf node
pointer to the new leaf node of an entity
Fr. Tanenbaum
58
References
  • Dollimore Ch. 9
  • Tanenbaum Ch. 5
Write a Comment
User Comments (0)
About PowerShow.com