1 / 104

Naming

Naming. Names play a very important role in all computer system. A name is a string of bits or characters that used to refer to an entity eg:- recourse such as hosts, printers, disks and files. Entities can be operated.

houle
Télécharger la présentation

Naming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Naming

  2. Names play a very important role in all computer system. A name is a string of bits or characters that used to refer to an entity eg:- recourse such as hosts, printers, disks and files. Entities can be operated. eg printer offers an interface containing operations for printing a document, requesting the status of a print job etc. Entity such as a n/w connection may provide operations for sending and receiving data, setting quality-of-service parameters, requesting the status etc..

  3. Names denote entities in a distributed system. To operate on an entity, we access it at an access point. Access points are entities named by an address. A location-independent name for an entity E, is independent from the addresses of the access points offered by E.

  4. Naming To operate an entity it is necessary to access it for which we need an access point. The name of the access point is called address. In a distributed system a typical example of an access point is a host in the n/w with its address, combination of IP address and port number. An entity may change its access point, eg when a laptop moves to another location, it is often assigned a different IP address An address is a special kind of name, it refers to an access point of an entity

  5. Naming An access point is tightly associated with an entity. An entity may easily change an access point or an access point may be reassigned to a different entity. If an entity offers more than one access point, it is not clear which address to use as a reference. Eg many organization distribute their web service across several servers, if we would use the addresses of these servers as a reference, it is not clear which address should be chosen as the best one.

  6. A better solution is to have a single name for the web service independent from the addresses of the different web servers Such independent name is called location independent.

  7. True Identifiers Pure name: One with no meaning; just a random string used for comparison. Identifier: A name with these properties: Each identifier refers to at most one entity Each entity referred to by at most one identifier An identifier always refers to the same entity (prohibits reusing an identifier) An identifier need not necessarily be a pure name, i. e., it may have content.

  8. Naming A true identifier is a name that has the following properties 1) each entity is referred to by at most one identifier 2) an identifier always refers to the same entity By using identifiers it become much easier to unambiguously refer to an entity

  9. If an address can be reassigned to a different entity, we cannot use an address as an identifier. • Eg the use of telephone no, which are reasonably stable in the sense that a telephone no for some time refers to the same person or organization

  10. Addresses and identifiers are two important types of names that are each used for very different purpose In many computer systems addresses and identifiers are represented in machine-readable form only, that is in the form of bit strings Eg memory address, Ethernet address Another important type of name that used by humans, also referred to as human-friendly names. It is generally represented as a character string.

  11. Decomposing a name into different parts A client needs to know the address of the FTP server named ftp.cs.vu.nl First resolve nl to find the server NS(nl) responsible for names that end with nl. After the rest of the name is passed to the server NS(nl)

  12. This server may then resolve the name vu to the server NS(vu.nl) responsible for names that end with vu.nl who can further handle the remaining name ftp.cs This leads to routing the name resolution request as NS(.)-> NS(nl)->NS(vu.nl)->address of ftp.cs.vu.nl Where NS(.) denotes the server that can return the address of NS(nl) also called the root server NS(vu.nl) will return the actual address of the FTP server.

  13. Flat Naming In many case identifiers are simply random bit strings, which we conveniently refer to as unstructured or flat names Broadcasting and Multicasting Consider a distributed system built on a n/w. In the LAN all computers are connected to a single cable. Locating an entity in such environment is simple- a message containing the identifier of the entity is broadcast to each machine and each machine is requested to check whether it has that entity. Only the machine that can offer an access point for the entity send a real message containing the address of that access point

  14. This principle is used in the internet Address Resolution Protocol (ARP) to find the data-link address of a machine when given only an IP address A machine broadcast a packet on the local n/w asking who is the owner of a given IP address When the message arrives at a machine, the receiver checks whether it should listen to the requested IP address If so it sends a reply packet

  15. Broadcasting become inefficient when the n/w grows. Ie too many hosts may be interrupted by request they cannot answer. One possible solution is to switch to multicasting, by which only a restricted group of hosts receives the request

  16. Multicasting can also be used to locate entities in n/w. Eg internet support network level multicasting by allowing hosts to join a specific multicast group. Such group are identified by a multicast address. When a host sends a message to a multicast address, the n/w layer provides a best-effort service to deliver that message to all group members A multicast address can be used as a general location service for multiple entities

  17. When computers are connects to the locally available n/w, it is dynamically assigned an IP address. In addition it joins a specific multicast group. When a process wants to locate computer A, it sends a “where is A ?” request to the multicast group. If A is connected it responds with its current IP address.

  18. Forwarding Pointers Locating mobile entities is make use of forwarding pointers. When an entity moves from A to B it leaves behind in A a reference to its new location at B. A client can look up the current address by following the chain of forwarding pointers. Drawbacks All intermediate locations in a chain will have to maintain their part of the chain of forward pointers.

  19. Each forwarding pointer is implemented as (client stub, server stub) pair A server stub contain either a local reference to the actual object or a local reference to a remote client stub for that object. When ever an object moves from address space A to B it leaves behind a client stub in its place in A and installs a server stub that refers to it in B

  20. Figure 5-1. The principle of forwarding pointers using (client stub, server stub) pairs.

  21. Figure 5-2. Redirecting a forwarding pointer by storing a shortcut in a client stub.

  22. Figure 5-2. Redirecting a forwarding pointer by storing a shortcut in a client stub.

  23. Home base Approaches Broadcasting and multicasting is difficult to implement efficiently in large scale n/ws. long forwarding chain pointers may broken. Another approach to supporting mobile entities in large-scale n/w is home location Which keeps track of the current location of an entity .

  24. The home location is often chosen to be the place where an entity was created. All mobile host has a fixed IP address. All communications to that IP address is initially directed to the mobile host’s home agent. This home agent is located in the local area network corresponding to the network address contained in the mobile host’s IP address

  25. Whenever the mobile host moves to another network, it requests a temporary address that it can use for communication. This care-of address is registered at the home agent. When the home agent receives a packet for the mobile host, it looks up the host’s current location. If the host is on the current local network the packet is simply forwarded. Otherwise it is tunneled to the host’s current location and sent to the care-of address.At the same time, the sender of the packet is informed of the host’s current location

  26. Drawback To communicate with a mobile entity, a client first has to contact the home, which may be completely different location. The result is an increase in communication latency. A drawback of the home-based approach is the use of a fixed home location. It must be ensure that the home location always exists. Otherwise contacting the entity will become impossible. So register the home at a traditional naming service and to let a client to be relatively stable, that location can be effectively cached after it has been looked up.

  27. Home-Based Approaches Figure 5-3. The principle of Mobile IP.

  28. Distributed Hash tables DHT a lookup service DHT system uses an m bit identifier space to assign randomly-chosen identifiers to nodes as well as keys to specific entities. The number m bits is usually 128 or 160 depending on the hash fun. An entity with key k falls under the jurisdiction of the node with the smallest identifier id>= k. This node is referred to as the successor of k and denoted as succ(k).

  29. The main issue in DHT based system is to efficiently resolve a key k to the address of succ(k) Each node p keep track of the successor succ(p+1) as well as its predecessor pred(p) In that case whenever a node p receives a request to resolve key k, it will simply forward the request to one of its two neighbors.

  30. FTp[i]=SUCC(p+2i-1) Q=FTp[j]<=k<FTp[j+1]

  31. Hierarchical Approaches

  32. In a hierarchical scheme, a network is divided into a collection of domains. • There is a single top-level domain that spans the entire network. • Each domain canbe subdivided into multiple, smaUer subdomains. • A lowest-level domain, called aleaf domain, typically corresponds to a local-area network in a computer network • or a cell in a mobile telephone network.

  33. To keep track of the whereabouts of an entity, each entity currently located ina domain D is represented by a location record in the directory node dir(D). • Alocation record for entity E in the directory node N for a leaf domain D containsthe entity's current address in that domain. • In contrast, the directory node N' forthe next higher-level domain D' that contains D, will have a location record for Econtaining only a pointer to N.

  34. An entity may have multiple addresses, for example if it is replicated. • If anentity has an address in leaf domain D 1 and D2 respectively, • then the directorynode of the smallest domain containing both D 1 and D 2, will have two pointers,one for each subdomain containing an address.

  35. lookup operation • a client wishing to locate an entity E,issues a lookup request to the directory node of the leaf domain D in which theclient resides. • If the directory node does not store a location record for the entity,then the entity is currently not located in D. • Consequently, the node forwards therequest to its parent. • Note that the parent node represents a larger domain than itschild. • If the parent also has no location record for E, the lookup request is forwardedto a next level higher, and so on.

  36. Update operations • Consider an entity E that has created a replica in leaf domain D for which it needsto insert its address. • The insertion is initiated at the leaf node dir(D) of D whichimmediately forwards the insert request to its parent. • The parent will forward theinsert request as well, until it reaches a directory node M that already stores a locationrecord for E. • Node M will then store a pointer in the location record for E, referring to thechild node from where the insert request was forwarded. • At that point, the childnode creates a location record for E, containing a pointer to the next lower-levelnode from where the request came. • This process continues until we reach the leafnode from which the insert was initiated. • The leaf node, finally, creates a recordwith the entity's address in the associated leaf domain.

  37. Structured Naming

  38. Flat names are good for machines, but are generally not very convenient for humans to use. Structured names are composed from simple human readable names

  39. Name Spaces • Names are commonly organized into what is called a name space. They represented as a labeled directed graph with two types of nodes. • Leaf node • Directory node • A leaf node represented a named entity and has the property that it has no outgoing edges • A leaf node generally stores information on the entity, such as in the case of file systems in which a leaf actually contains the complete file it is representing

  40. A directory node has a number of outgoing edges, each labeled with a name. Each directory node in a naming graph is considered as yet another entity in a distributed system. A directory node store a table in which an outgoing edge is represented as a pair (edge label, node identifier) such a table is called directory table.

  41. Structured Naming A general naming graph

  42. In the figure has one node namely n0 which has only outgoing and of no incoming edge, such node is called root node of the naming graph. Each path in the naming graph can be referred to by the sequence of labels corresponding to the edge in that path such as. N:<label-1, babel-2, .. Label-n> N refers to the first node in the path Such a sequence is called path name. If the first path name is the root of the naming graph it is called an absolute path name. Otherwise it is called relative path name.

  43. Naming graphs are implemented in file system. Instead of writing edges labels to represent a path name, path name in file system are generally represented as a single string in which the labels are separated by a special character (“/”) In the figure instead of using n0 <home,steen,mbox> we can use /home/steen/mbox When there are several paths that lead the same node, that node can be represented by different path name Eg node n5 can be referred to by /home/steen/keys as well as /keys. All resources such as processes, hosts, I/O devices and n/w interfaces are named in the same fashion

  44. Name space offer a convenient mechanism for storing and retrieving information about entities by means of names. i.e. path name should be possible to look up any information stored in the node The process of looking up a name is called name resolution Consider a path name N:<label1,label2,..labeln>. Resolution of this name starts at node N of the naming graph, where the name label1 is looked up in the directory table. Resolution then continued to looking up name label2 and so on. Assume that the named path actually exists, resolution stop at the last node referred by label n, by returning the content of the node.

  45. A global name is a name that denotes the same entity, no matter where the name is used in a system. A local name is a name whose interpretation depends on where that name is being used.

  46. Name Resolution Name resolution is the process by which resolvers and name servers cooperate to find data in the name space. Remember, not a “search” To find information anywhere in the name space, a name server only needs the names and IP addresses of the name servers for the root zone (the “root name servers”)

More Related