Inferno is a distributed system based on the application of three basic principles
Resources as Files
- Resources as files: all resources are represented as files within a hierarchical file system
- Namespaces: the application view of the network is a single, coherent namespace that appears as a hierarchical file system but may represent physically separated (locally or remotely) resources
- Standard communication protocol: a standard protocol is used to access all resources, both local and remote
All Inferno resources, both local and remote, are represented as a set of dynamic files within the hierarchical file system. These files are used to represent, among other things, storage devices, processes, services, networks and network connections. An application may access each resource by manipulating the relevant files as required using standard file operations. The advantages if using files as a central concept in the system are:
File names and contents of these dynamic files can be generated on a per-demand and per-client basis. For instance a data file for a sensor resource might return different output depending on the time of the read, or for each read a new line of data might be returned.
- File systems have simple and well understood interfaces across a wide variety of operating systems. Interfaces to the files generally consist of a small set of well-defined operations such as open, read and write
- Reliance on file systems reduces the amount of interface code and keeps the Inferno system small, reliable and highly portable
- Naming conventions for files are well known, uniform and easily understood
- Access rights and permissions to files are simple, yet can be used to ensure multiple levels of security
The second key principle of Inferno is the computable namespace, by which an application builds a unique private view of the resources and services it needs to access. Each set of resources is represented as a hierarchy of files and is accessible via the standard file access operations. The various resources and services being used by a process are combined into a single rooted hierarchy of file names, called a namespace. The resources accessible within an individual namespace can be located on a single client or on multiple servers throughout the network.
One of the main advantages of this namespace system is that an application may use resources completely transparently. Once the dynamic files present by the resource are mounted within the namespace visible to application, it may access them without knowing if the resource is local or remote.
For example, the graphical debugger reads the dynamic files in the /prog directory to access information about the current system processes. If however, the user wished to debug a process on a remote machine, all that would be required is to import the /prog directory from that machine. As far as the debugger is concerned, it is just reading the files in /prog as normal and has no idea where they come from.
Standard protocol to access resources
Inferno uses a single protocol, implemented by the Inferno kernel and by applications, to represent and access resources.
Because all resources, including networks and network connections, are represented as files, only one protocol is required to communicate with and provide access to resources, both local and remote.
That protocol is a file service protocol, named 9P (an earlier variant was called Styx).
This approach provides a natural way to build distributed systems by using well known technology for attaching remote file systems. Having one standard communication protocol also provides a single point on which to focus security. Inferno provides several mechanisms for secure communication:
As this is part of the underlying system, all applications gain these benefits automatically. 9P runs over various transport protocols including TCP/IP.
- Certificate based user authentication
- Message encryption
9P was originally developed for use with Plan 9 from Bell Labs. A simplified subset called Styx was used in Inferno for a few years,
but now Inferno's protocol is exactly the same as 9P.
Some manual pages and older papers still refer to Styx.