4.0 Context space

4.1 Legion object names

As previously mentioned, all Legion objects are automatically assigned a unique system-level identifying name called a Legion Object Identifier (LOID). The LOID enables Legion to find, control, and move Legion objects scattered over several different machines. But since LOIDs consist of several lines of numbers, you can map one or more simple string names -- context names -- to a LOID and use that name instead.

You and other Legion users are free to name objects as you please, since your context space is independent of other users' context spaces. This is discussed further in section 4.3. The next section provides a brief look at the anatomy of the system-level object name, the LOID.

4.2 About the LOID

A LOID is a variable length binary structure (typically more than 128 bytes), which contains a type field followed by several variable size fields. A LOID may be appended with any number of other fields, each of whose size and meaning are dependent on the LOID type. LOIDs are represented as strings, using standard "dotted hex" notation. A typical LOID would look something like this:

Here the type field, 1, indicates the LOID's type; the first variable field, 01, indicates the domain in which the object was created; the second variable field, 07, indicates the class that the object belongs to; the third variable field, 01, indicates the object's instance number; and the fourth variable field, 000001fc0d24ab..., is the object's RSA public key. This notation is obviously cumbersome, so we expect most users to rely on the context space naming service to manipulate objects: this distinction between system-level names and user-level names, however, allows Legion LOIDs to contain system-level information, such as an object's public key, without polluting the user-level name-space.

4.3 Organizing context space

All contexts in Legion are organized into a Unix-like hierarchy, with a root context that contains a set of other contexts. This structure provides each object with an absolute path name (i.e., /mycontext/myobject). Just as a Unix user organizes files in a series of directories, a Legion user organizes objects in a series of contexts: you have a personal "root" context, which you can treat like a home directory.1 You use commands to move between contexts, just as Unix users use commands to move between directories. A sample context space is shown in Figure 2.2 Notice that the different users have autonomous context spaces. This allows the same name to be used by more than one user and in more than one context. E.g., User1 and User2 can create new subcontexts and call both of them ContextA. Depending on individual security arrangements, one user can work in another user's context space just as Unix users can work in one another's directories.

Figure 2: Context space.

Similarly, a context name can refer to different Legion objects, just as Unix users can use the same name in different directories to refer to different files: the Foo in /User1/ContextA and the Foo /User3/ContextC/ContextC1 in Figure 2 refer to different objects.

On the other hand, a single Legion object can have multiple context names in multiple contexts. Figure 3's Foo and Bar refer to a single object, ObjectX, but these names are in two different context spaces.

Figure 3: Single object with multiple context names.

A central feature of context space is that a it does not reflect or influence object space. In Figure 3, ObjectX's physical location is unrelated to its context paths. User1 may be in the same building as ObjectX or on the other side of the country. Objects named in a single context may actually be hundreds of miles apart.

Beyond the user-level grouping of individual context spaces, linking object groups in graph- or directory-based structures can be useful: just as a Unix directory tree or a collection of hypertext documents provide a logical means to organize information, context space provides a structure for finding and organizing Legion objects. For example, to find a host object running on an IBM SP2, you might enter a context called hosts, then a context called ibm, then a context called sp2, where a list of host objects running on SP2s could be found. This is like moving through a series of directories -- /hosts/ibm/sp2 -- to get to the contents of the /sp2 directory).

Legion provides a library interface and utility commands such as legion_ls and legion_rm for working in context space. The Legion library interface provides a Unix-like path interface for expressing navigation through multiple contexts, and Legion command-line tools support path-like naming of objects within context space. Paths are delimited by the "/" character. For example, the path /usr/adam would map to the object named adam within the context named usr.

Objects contain in their state a root context (implicitly named /) that provides each object with a base for absolute path names. The root context's LOID is stored in a variable that can altered by the object at runtime. Objects also contain in their state the current context's LOID, which provides the basis for relative context paths.

1.There is a actually a /home context in new Legion systems. Your system administrator may assign you a "home" context in /home or you can create one yourself (see "Create a new context"). back

2.There is a context that represents the user's shell, but it does not appear in object path names nor does it affect your movements in context space. back

Directory of Legion 1.7 Manuals
[Home] [General] [Documentation] [Software]
[Testbeds] [Et Cetera] [Map/Search]

Free JavaScripts provided by The JavaScript Source