Definitions: Naming and Binding
Definitions: Naming and Binding
Definitions: Naming and Binding
Shakespeare,
Romeo and Juliet 2.2.43-44
Definitions
address
An address identifies where it is.
route
A route identifies a way to get there.
A few useful additional definitions put forth by J.H. Saltzer in his 1978 paper include:
binding
Binding is the process of mapping a name to an address. J. H. Saltzer defines it as
choosing a lower-level implementation for a particular higher-level semantic
construct. We can avoid the semantic problems of differentiating names from
addresses by thinking of binding as the process of mapping a name into some
lower-level name.
context
A context is a particular set of bindings. A name only has meaning relative to some
context.
directory or naming network
A set of catalogs (nameobject binding tables) that may include other
directories
naming hierarchy
A naming network organized in a tree-structured form.
pathname
A multi-component name traversing a path in a naming hierarchy.
root
Rutgers University CS 417: Distributed Systems
2000-2002 Paul Krzyzanowski
Binding
Let us consider the basic mechanism of sending a data packet to a service and the
bindings that are involved:
1. Find a node on which the required service resides. This requires service name
resolution. The binding is service name node name.
2. Find a network attachment point to which the node is connected. This
requires locating the node name. The binding is node name attachment point
(or address).
3. Find a path from this location to that point. This is the routing service. The
binding is addressroute.
As an example of naming and binding, we can consider the machine names on the
Internet. A name of cs.rutgers.edu may bind to the IP address of 128.6.4.2. In turn, the IP
address 128.6.4.2 may bind to the Ethernet address 08:00:20:1f:13:83. Note that the term
address becomes context-dependent. We tend to think of addresses as the lower-level
representation of a name. In essence, addresses are just names. A human is comfortable
dealing with cs.rutgers.edu. An IP driver finds it easier to work with the 32-bit name
128.6.4.2, and an Ethernet driver prefers the 48-bit name 08:00:20:1f:13:83.
If we consider naming and binding in file systems, we have the user- and programmerfriendly textual names that are bound to internal names that are a function of the file
system implementation. For example, a pathname of /usr/bin/ls binds to {device 32,149,
inode 32623}.
An important issue in binding is that of when the binding takes place. Dissociation
between the bound entities is highly desirable. A machines address may change while its
name remains the same, yet the services on that machine should be accessible. A service
may run on a different port, yet a client should be able to locate it. The inode allocated to
a file may change, yet that should not cause problems in accessing the file by name.
The least flexible binding is static binding. This is essentially a hard-coded binding.
For example, a program may assume that SMTP mail service is always available on port 25
and simply access port 25 instead of attempting to resolve the binding through other
means. Fortunately, well-followed conventions will often save that program. A more
dangerous example is that of a program attempting to contact a machine by using a hardcoded IP or Ethernet address.
An alternative to static binding is dynamic binding. With dynamic binding, we no
longer rely on a hard-coded name address binding but have some mechanism for
resolving the name on demand. One form of dynamic binding is early binding. In this
case a binding operation is actually performed, but it is performed some time before the
binding is needed. For example, if a program needs to contact a server multiple times
during a long period of execution, it might perform a name to IP address binding once at
the start for efficiency. The danger here is that the servers address may change during
the execution of this program and the program will be unable to contact the server at
some point in time (or will contact the wrong server). At times, early binding is a crucial
optimization. IP address to Ethernet address binding is an example of a case where it
would be prohibitively expensive to resolve an IP address for every packet sent from a
machine. It makes sense to maintain a cache (the ARP cache) of previously used bindings.
Problems arise if the bindings change. With ethernet addresses, the problem is usually
that of not being able to reach the destination machine and the system attempts to
perform another binding. Early bindings hurt in a dynamically changing environment.
Most flexible is late binding, where the binding is performed on demand, just before
use. Previous bindings are not cached. An example where this is useful is accessing a file
system. Consider a user editing a file and frequently saving changes. Assume that the
editor is implemented in such a way that it writes into a temporary file during the edit and
renames the file to the permanent name upon save. In this case, a different inode (or FAT
index) is allocated each time the file is saved, yet the name remains the same. The only
way of assuring that the correct file is opened (say, by another process) is by performing
the exernal to internal name binding at the time of open. The caveat with dynamic
binding is that the name resolution process often takes quite a bit of time. If the same
name has to be resolved over and over again, early binding may yield considerable
performance gains.
References
Inter-Network Naming, Addressing, Routing, RFC 1498, John F. Shoch, 1978 [easy and
quick reading]
On Naming and Binding, J. H. Saltzer, 1978, MIT. [dated terminology and overlyphilosophical, yet this is a must-read-first paper]
Distributed Systems, Sape Mullender, Ed., chapter 12: Names by Roger M. Needham,
1993 Addison-Wesley [good coverage, but make sure you read Saltzers paper first]