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: User3's ObjectFoo is not necessarily the same object as User1's ObjectFoo, since the two objects are in different contexts, and they have different path names (/User1/ContextA/ObjectFoo and /User3/ContextC/ContextC1/ObjectFoo).
On the other hand, a single object can be named in multiple contexts, as in Figure 2. ObjectX has been assigned two different string names, Foo and Bar, by two different users, and those two names reside in two different context spaces.
Figure 1: Context space
It is important to remember that context space does not necessarily reflect object space: ObjectX remains in its native location, regardless of what path names users choose to give it. Context space is made up of string names, and is organized by user preference, not according to object type or location. Objects named in a single context may actually reside in geographically-distinct locations
Beyond this user-level grouping, the linking of 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 spaces provide a structure for finding and organizing Legion objects. For example, to find the LOID of a host object running on an IBM SP2, one might enter a context named hosts, go to the context named ibm, and continue from there to the context named sp2 (in Unix, this would be the equivalent of moving through a series of directories--/hosts/ibm/sp2--to arrive at a directory called sp2). In this final context, a list of host objects running on SP2s could be found.
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 spaces. 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 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 LOID of the current context, 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.