1.01.07.01.000001fc0d24ab3512f63533f3f96b2bba0572aed8d47efec 7c24618fca3a3d49326fa84eaa320724c10264f225c97820aced74586 194974256ee86c2ae0565d55c8e623
Figure 1: Context space
Just as Unix files in different directories can have the same name but different contents, different contexts can assign the same name to different Legion objects: in Figure 1 the path names /User1/ContextA/ObjectFoo and /User3/ContextC/ContextC1/ObjectFoo describe different context paths that can refer to different objects. The two users' context spaces are independent of each other, allowing the users to assign names without fear of conflict.
On the other hand, a single Legion object can have multiple context names in multiple contexts, as in Figure 2. Foo and Bar refer to a single object, ObjectX, but these names reside in two different context spaces.
Figure 2: Context space
It is important to remember that context space does not reflect object space: ObjectX remains in its native location, regardless of any path names users choose to give it. User1 might be in the same building as ObjectX or on the other side of the country. Context space is made up of string names organized by user preference. Objects named in a single context may actually be hundreds of miles apart.
Beyond this user-level grouping, 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 for users to organize information, context space provide a structure for finding and organizing Legion objects. For example, to find a host object running on an IBM SP2, one might enter a context named hosts, then to a sub-context named ibm, and then to a sub-context called sp2 where a list of host objects running on SP2s could be found. (in Unix, this would be the equivalent of moving through a series of directories--/hosts/ibm/sp2--to arrive at a directory called sp2).
Legion provides a library interface and utility commands such as legion_context_create, legion_context_list, and legion_context_lookup for manipulating and negotiating context space. The Legion library interface provides a Unix-like path interface for navigating 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 thus map to the object named adam within the context object named usr in the current context.
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. It is important to note that this default path service provided by the Legion library is completely replaceable. For example, if a user wished to manipulate context spaces via DOS-style "\" delimited path names, the service could easily be implemented using the primitive context manipulation routines provided by the Legion library.