9P
Encyclopedia
9P is a network protocol developed for the Plan 9 from Bell Labs
Plan 9 from Bell Labs
Plan 9 from Bell Labs is a distributed operating system. It was developed primarily for research purposes as the successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002...

 distributed operating system
Distributed operating system
A distributed operating system is the logical aggregation of operating system software over a collection of independent, networked, communicating, and spatially disseminated computational nodes. Individual system nodes each hold a discrete software subset of the global aggregate operating system...

 as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows
Window (computing)
In computing, a window is a visual area containing some kind of user interface. It usually has a rectangular shape that can overlap with the area of other windows...

, network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

 connections, processes
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

, and almost anything else available in the operating system. Unlike NFS, 9P encourages caching
Cache
In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

 and also serving of synthetic files (e.g. /proc to represent processes).

9P was revised for the 4th edition of Plan 9 under the name 9P2000 that contained various fundamental improvements. The latest version of the Inferno operating system also uses 9P2000. The Inferno file protocol was originally called Styx, but technically it has always been a variant of 9P.

A server implementation of 9P for Unix, called u9fs, is included in the Plan 9 distribution. A kernel client driver for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 is part of the v9fs project. 9P and its derivatives have also found application in embedded environments, such as the Styx on a Brick project.

Server applications

Many of Plan 9's applications take the form of 9P servers. Noteworthy examples include:
  • acme
    Acme (text editor)
    Acme is a text editor and graphical shell from the Plan 9 from Bell Labs operating system, designed and implemented by Rob Pike. It can use the sam command language. The design of the interface was influenced by Oberon. It is different from other editing environments in that it acts as a 9P server...

    : a user interface for programmers
  • rio: the Plan 9 windowing system.
  • plumber: interprocess communication
  • wikifs
    Wikifs
    wikifs is a file system for the operating systems Plan 9 and Inferno that allows wiki pages to be served as web pages and to be viewed and edited with the text editor Acme.-External links:* man page*...

    : a wiki
    Wiki
    A wiki is a website that allows the creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. Wikis are typically powered by wiki software and are often used collaboratively by multiple users. Examples include...


Implementation

9P sends the following messages between clients and servers. These messages correspond to the entry points in the Plan 9 vfs
Virtual file system
A virtual file system or virtual filesystem switch is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way...

 layer that any 9P server must implement.

version: Negotiate protocol version
error: Return an error
flush : Abort a message
auth, attach : Messages to establish a connection
walk : Descend a directory hierarchy
create, open : Prepare a fid for I/O on an existing or new file
read, write : Transfer data from and to a file
clunk : Forget about a fid
remove: Remove a file from a server
stat, wstat : Inquire or change file attributes

See also

  • v9fs - u9fs: 9P implementation for Unix-like
    Unix-like
    A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

     operating systems
  • IL Protocol
    IL Protocol
    The Internet Link protocol or IL is a connection-based transport layer protocol designed at Bell Labs originally as part of the Plan 9 operating system and is used to carry 9P. It is assigned the Internet Protocol number of 40...

     - Transport protocol that was designed for 9P in local area networks.
  • distributed file system
    Distributed file system
    Network file system may refer to:* A distributed file system, which is accessed over a computer network* Network File System , a specific brand of distributed file system...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK