3.0 An introduction to context space

Legion is an object-based system organized by classes and metaclasses (classes of classes). All Legion classes are objects and can be assigned context names. Legion objects are organized by their classes and the classes are in turn organized into a hierarchical structures of metaclasses. The top metaclass is the LegionClass, which is responsible for every other object in the system.

Every part of Legion, such as file objects and metaclasses, is represented by a Legion object. You manipulate these parts by controlling their representative objects, which means that you must know the name of the object that you wish to use. Objects are automatically assigned system-level names called Legion Object Identifiers (LOIDs). LOIDs are impractical at best to use (see About the LOID), however, so you can assign string names to any Legion object, whether a BasicFileObject (a Legion file object) or a metaclass object, and organize the names according to your own needs.

These string names are called context names and you organize them in a hierarchy of contexts in Legion's context space. Context names are organized in sets of contexts and subcontexts, just as Unix files are organized in sets of directories and subdirectories. New Legion systems have a default context space for convenience, but you can rename and rearrange all or part of your context space as appropriate. You can run programs, use far-flung resources, and take advantage of Legion's other features via your context names.

You will probably do most of your Legion work in context space, so it is important to be familiar with the geography of your system's particular context space and to feel comfortable negotiating that space. A typical newly installed system includes a default context hierarchy and context names for commonly used objects. Figure 1, below, shows part of a newly installed Legion system's context space. (Your context space may not look like this.)

A new system contains default names for the basic objects, such as the bootstrap host and vault. These objects are in the /hosts, /vaults, /impl, and /class contexts (shown in Figure 1). The /hosts context contains names of the host objects currently in your system. A new system will have two context names, BootstrapHost and the DNS name of the bootstrap host (i.e., your.bootstrap.host.name).1 Both of these names point to the bootstrap host object, which represents the bootstrap host. The /vaults context contains names of the vault objects currently in your system. A new system contains only one context name, BootstrapVault, which points to the bootstrap vault object. (See section 7.0 for more information on hosts and vaults.) The /impl context contains the names of implementation objects. A new /class context contains context names for all of the initial Legion object classes, such as AuthenticationObjectClass and BasicFileClass.

Note, however, that the context space illustrated in Figure 1 does not reflect this hierarchy. This is a key feature of context space: Legion objects' physical location and organization is not related to context space organization. The objects named in a /host context do not have be able to communicate with each other or even know of each other's existence. They do not even have to be host objects. Each of the contexts in Figure 1 can hold sets of more subcontexts, just as Unix directories hold sets of subdirectories.

Figure 1: Contents of a typical new Legion system context space.

* The /users/admin context is used only in secure systems. If your system administrator has not enabled Legion security this context will not appear in your system.

Context path names use Unix-style slash ("/") as a default, and the examples here follow that style (e.g., the full context path name for BootstrapHost in the system shown in Figure 1 is /hosts/BootstrapHost). It is possible to change Unix-style slash to the DOS-style backslash ("\") via the primitive context manipulation routines provided by the Legion library.

Legion offers a graphical user interface (GUI) as well as context-related command-line tools (see section 6.0) to run programs and manipulate Legion objects in context space. We anticipate that many users will eventually work almost entirely in the GUI, but you can work equally well in either interface. We suggest that new users open the GUI (described in section 4.0, below) before going any further, since it provides a good overview of context space. If you prefer not to use the GUI, you may want to skip ahead to section 5.0.


1.A host is a machine in a Legion system. A vault is a file storage system used to store inactive Legion objects. A host object represents and manages a given host in a Legion system. A vault object represents and manages a given vault in a Legion system.

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

Free JavaScripts provided by The JavaScript Source

legion@Virginia.edu
http://legion.virginia.edu/