Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Distributed Systems Naming

Distributed Systems Naming

Ahmed Magdy

June 01, 2012
Tweet

More Decks by Ahmed Magdy

Other Decks in Science

Transcript

  1. 5.3 Structured Naming
    Distributed Systems
    Chapter 5
    Naming
    Prepared by: Ahmed Magdy Ezzeldin
    Reference: Distributed Systems Principles and Paradigms 2nd Edition

    View Slide

  2. 5.3.1 Name Spaces

    A Name space is a labeled, directed graph with two types of
    nodes.

    A leaf node represents a named entity and has the property that it
    has no outgoing edges.

    And a directory node that has a number of outgoing edges, each
    labeled with a name, and has an associated identifier.

    A directory table holds (edge label, node identifier) for the
    directory contents.

    n0 is the root node and name : N label_1 , label_2 , ..... label_n is
    called a path. If N is the root then the path is called an absolute
    path, otherwise it is called a relative path. We use "/" as a
    separator between labels and as a representation for n0.

    View Slide

  3. 5.3.1 Name Spaces [continued]
    A name space can be strictly hierarchical so that the naming graph
    is organized as a tree (one absolute path for each node). In other
    cases it can be organized in a directed acyclic graph (not permitted
    to have a cycle).

    View Slide

  4. 5.3.2 Name Resolution
    - Resolution starts by reading the directory table
    at the first node of the path and then proceeding
    to the next identified node and continue the look-
    up until reaching the last node where it returns the
    node identifier for the last node in the path.
    - Closure Mechanism
    Knowing how and where to start name resolution
    is generally referred to as a closure mechanism.
    Essentially, a closure mechanism deals with
    selecting the initial node in a name space from
    which name resolution is to start.

    View Slide

  5. 5.3.2 Name Resolution [continued]

    View Slide

  6. 5.3.2 Name Resolution [continued]
    - Linking and Mounting
    There are 2 ways of aliasing naming
    1- In a directed graph where there are 2 absolute paths to
    a certain node. (Like Hard Links in UNIX file system)
    2- In a tree structure, we can represent an entity by a leaf
    node that stores an absolute path name of another node. (like
    symbolic links in UNIX file system) [Figure 5-11]
    A mounted file system corresponds to letting a directory node
    store the identifier of a directory node from a different name
    space. To mount a foreign name space in a distributed
    system requires at least the following information:
    1. The name of an access protocol.
    2. The name of the server.
    3. The name of the mounting point in the foreign name
    space. [Figure 5-12]

    View Slide

  7. 5.3.2 Name Resolution [continued]

    View Slide

  8. 5.3.3 Implementation of a Name Space
    - Name Space Distribution
    Name spaces are organized hierarchically and also
    partitioned into logical layers:
    1- Global layer (Root and its direct children) which is
    stable (rarely changed). In this layer availability is more
    important than performance as caching can be used.
    2- The administrational layer (they represent groups of
    entities that belong to the same organization or
    administrational unit) stable but not like the global layer.
    3- The managerial layer consists of nodes that may
    typically change regularly. For example, nodes
    representing hosts in the local network belong to this
    layer. [Figure 5-13] & [Figure 5-14]

    View Slide

  9. 5.3.3 Implementation of a Name Space [continued]

    View Slide

  10. 5.3.3 Implementation of a Name Space [continued]

    View Slide


  11. Implementation of Name Resolution
    - Iterative name resolution:
    Where the client name resolver requests from the
    root name server to respond with the URL parts
    identifiers. The root server replies with what it can
    resolve then the response is sent back to the
    client that sends a new request to the next name
    server that has been resolved by the root server
    and so on until the whole URL has been resolved.
    [Figure 5-15]
    5.3.3 Implementation of a Name Space [continued]

    View Slide

  12. 5.3.3 Implementation of a Name Space [continued]

    View Slide

  13. - Recursive Name resolution:
    Where it is the responsibility of the name server
    not the client to resolve the name by requesting
    the rest of the name to be resolved from the other
    servers recursively which adds a performance
    demand on each server as it has to resolve the
    whole URL, but caching can be used more
    effectively than iterative name resolution.
    [Figure 5-16] & [Figure 5-17] & [Figure 5-18]
    5.3.3 Implementation of a Name Space [continued]

    View Slide

  14. 5.3.3 Implementation of a Name Space [continued]

    View Slide

  15. 5.3.3 Implementation of a Name Space [continued]

    View Slide

  16. 5.3.3 Implementation of a Name Space [continued]

    View Slide

  17. 5.3.4 The DNS Name Space [continued]

    The DNS name space is hierarchically organized as a
    rooted tree.

    A label is a case-insensitive string made up of
    alphanumeric characters.

    A label has a maximum length of 63 characters.
    The length of a complete path name is restricted to 255
    characters.

    The string of a path name consists of its labels, starting
    with the rightmost one, and separating the labels by a dot.

    The root is represented by a dot. e.g. the path name root:
    , is represented by the string
    "s1.web.google.com.", which includes the rightmost dot to
    indicate the root node (the dot is removed for readability).

    A subtree is called a domain; a path name to its root node
    is called a domain name. [Figure 5-19]

    View Slide

  18. 5.3.4 The DNS Name Space [continued]

    View Slide

  19. - DNS Implementation

    The DNS name space is divided into a global
    layer and an administrational layer.

    Each zone is implemented by a name server,
    which is virtually always replicated for availability.

    A DNS database is implemented as a (small)
    collection of files, a file for each zone.
    5.3.4 The DNS Name Space [continued]

    View Slide

  20. Thank you
    Questions
    ???

    View Slide