SPIN name server and file system extensions

SPIN tries to integrate generic name service and file systems. The Spincore name server module provides a generic graph-structured name space.

The SPIN NameServer.T type defines a basic directory object with which one can represent directory nodes for file systems. Using the NameServer.T as the super type of file system directories allows us to use common file system tools, such as ls and cat, to list objects in the global name space in addition to the file system name space.

The FileSystem module is the top-level manager for all file systems. The SPIN file system is a subsystem of spin space. Thus, in theory, it supports all the operations provided by the basic name server (though, some of the operations may raise exceptions if a particular file system is not powerful enough to support them). In addition, it provides the interface to register and deregister, mount and unmount file system. It also provides an interface to get the current root file system directory.

Standard name hierarchy

How do the SPIN global name space and the file system name space fit together? There are two different "root"s in the system; the global root and the file system root. It turns out that the file system root is a subdirectory of the global root directory.

The global root contains two directories, svc and fs. The svc directory is used to hold SPIN internal names such as domain names and nanny placeholder.

The fs directory is the root of the file system, and it is written as "/". Passing FileSystem.Lookup with "/" returns the file system root. To get the global root, use "/.." (for example, /../svc/domains).

There is a similar but slightly different lookup procedure called NameServer.Lookup. They differ only in the root directory from which traversal starts. NameServer.LookupName traverses the name from "/.." (aka global root), and FileSystem.LookupName traverses the name from "/" (aka file system root).

To avoid confusion resulting from having two different roots, it is strongly recommended that "/.." is used to represent the global root even in NameServer.LookupName(note: .. in the global root points to itself).

Below are some of the standard directories used in SPIN.

/../svc/domains
This directory contains the list of domains installed on the system.
/../svc/fs
This directory contains the list of file systems installed on the system.
/../svc/devices
This directory contains the list of devices installed on the system.
/../svc/nanny
Nanny aliases are installed here.
/../fs/
This is also known as "/". This is the file system root.
/../fs/proc
Contains information about SPIN status. I think this should be moved to /...

To do list