Plumber (program)

Last updated

The plumber, in the Plan 9 from Bell Labs and Inferno operating systems, is a mechanism for reliable uni- or multicast inter-process communication of formatted textual messages. It uses the Plan 9 network file protocol, 9P, rather than a special-purpose IPC mechanism. [1]

Any number of clients may listen on a named port (a file) for messages. Ports and port routing are defined by plumbing rules. These rules are dynamic. Each listening program receives a copy of matching messages. For example, if the data /sys/lib/plumb/basic is plumbed with the standard rules, it is sent to the edit port. The port will write a copy of the message to each listener. In this case, all running editors will interpret this message as a file name, and open the file.

The plumber is the 9P file server that provides this service. Clients may use libplumb to format messages. Since the messages are 9P, they are network transparent.

Example

The following is an example of plumbing rules:

# these are generally in order from most specific to least, # since first rule that fires wins. addr=':(#?[0−9]+)' protocol='(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais)' domain='[a−zA−Z0−9_@]+([.:][a−zA−Z0−9_@]+)*/?[a−zA−Z0−9_?,%#~&/\−]+' file='([:.][a−zA−Z0−9_?,%#~&/\−]+)*' # image files go to page type is text data matches '[a−zA−Z0−9_\−./]+' data matches '([a−zA−Z0−9_\−./]+).(jpe?g|gif|bit)' arg isfile $0 plumb to image plumb start page −w $file # URLs go to web browser type is text data matches $protocol://$domain$file plumb to web plumb start window webbrowser $0 # existing files, possibly tagged by line number, go to edit/sam type is text data matches '([.a−zA−Z0−9_/–]+[a−zA−Z0−9_/\−])('$addr')?' arg isfile $1 data set $file attr add addr=$3 plumb to edit plumb start window sam $file # .h files are looked up in /sys/include and passed to edit/sam type is text data matches '([a−zA−Z0−9]+\.h)('$addr')?' arg isfile /sys/include/$1 data set $file attr add addr=$3 plumb to edit plumb start window sam $file 

See also

Related Research Articles

<span class="mw-page-title-main">Plan 9 from Bell Labs</span> Research distributed operating system developed at Bell Labs

Plan 9 from Bell Labs is a distributed operating system which originated from the Computing Science Research Center (CSRC) at Bell Labs in the mid-1980s and built on UNIX concepts first developed there in the late 1960s. Since 2000, Plan 9 has been free and open-source. The final official release was in early 2015.

Short Message Peer-to-Peer (SMPP) in the telecommunications industry is an open, industry standard protocol designed to provide a flexible data communication interface for the transfer of short message data between External Short Messaging Entities (ESMEs), Routing Entities (REs) and SMSC.

Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call system. NFS is an open IETF standard defined in a Request for Comments (RFC), allowing anyone to implement the protocol.

A Berkeley (BSD) socket is an application programming interface (API) for Internet domain sockets and Unix domain sockets, used for inter-process communication (IPC). It is commonly implemented as a library of linkable modules. It originated with the 4.2BSD Unix operating system, which was released in 1983.

<span class="mw-page-title-main">Acme (text editor)</span> Text editor designed by Rob Pike

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 distinctive element of the user interface is mouse chording.

In computer programming, standard streams are preconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin), standard output (stdout) and standard error (stderr). Originally I/O happened via a physically connected system console, but standard streams abstract this. When a command is executed via an interactive shell, the streams are typically connected to the text terminal on which the shell is running, but can be changed with redirection or a pipeline. More generally, a child process inherits the standard streams of its parent process.

<span class="mw-page-title-main">Sam (text editor)</span> Multi-file text editor

Sam is a multi-file text editor based on structural regular expressions. It was originally designed in the early 1980s at Bell Labs by Rob Pike with the help of Ken Thompson and other Unix developers for the Blit windowing terminal running on v9 Unix; it was later ported to other systems. Sam follows a classical modular Unix aesthetic. It is internally simple, its power leveraged by the composability of a small command language and extensibility through shell integration.

<span class="mw-page-title-main">RSTS/E</span> Computer operating system

RSTS is a multi-user time-sharing operating system developed by Digital Equipment Corporation for the PDP-11 series of 16-bit minicomputers. The first version of RSTS was implemented in 1970 by DEC software engineers that developed the TSS-8 time-sharing operating system for the PDP-8. The last version of RSTS was released in September 1992. RSTS-11 and RSTS/E are usually referred to just as "RSTS" and this article will generally use the shorter form. RSTS-11 supports the BASIC programming language, an extended version called BASIC-PLUS, developed under contract by Evans Griffiths & Hart of Boston. Starting with RSTS/E version 5B, DEC added support for additional programming languages by emulating the execution environment of the RT-11 and RSX-11 operating systems.

KERNAL is Commodore's name for the ROM-resident operating system core in its 8-bit home computers; from the original PET of 1977, followed by the extended but related versions used in its successors: the VIC-20, Commodore 64, Plus/4, Commodore 16, and Commodore 128.

9P is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system.

<span class="mw-page-title-main">Elvis (text editor)</span> Enhanced clone of the vi text editor

Elvis is an enhanced clone of the vi text editor, first released in January 1990. It introduced several new features, including syntax highlighting and built-in support for viewing nroff and HTML documents. Elvis is written by Steve Kirkendall and is distributed under the Clarified Artistic License (ClArtistic) which is used by Perl and is a GPL-compatible free software license.

The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory. Typically, it is mapped to a mount point named /proc at boot time. The proc file system acts as an interface to internal data structures about running processes in the kernel. In Linux, it can also be used to obtain information about the kernel and to change certain kernel parameters at runtime (sysctl).

Plan 9 from User Space is a port of many Plan 9 from Bell Labs libraries and applications to Unix-like operating systems. Currently it has been tested on a variety of operating systems including: Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris and SunOS. The project's name is a reference to the 1950s Ed Wood film Plan 9 from Outer Space.

<span class="mw-page-title-main">DOS XL</span>

DOS XL is a discontinued Disk Operating System (DOS) written by Paul Laughton, Mark Rose, Bill Wilkinson, and Mike Peters and published by Optimized Systems Software (OSS) for the Atari 8-bit computers. It was designed to be compatible with Atari DOS which shipped with Atari, Inc.'s disk drives, which had also been written by the same team.

In computer networking, STREAMS is the native framework in Unix System V for implementing character device drivers, network protocols, and inter-process communication. In this framework, a stream is a chain of coroutines that pass messages between a program and a device driver. STREAMS originated in Version 8 Research Unix, as Streams.

In client-server computing, a Unix domain socket is a Berkeley socket that allows data to be exchanged between two processes executing on the same Unix or Unix-like host computer. This is similar to an Internet domain socket that allows data to be exchanged between two processes executing on different host computers.

In computer science, a synthetic file system or a pseudo file system is a hierarchical interface to non-file objects that appear as if they were regular files in the tree of a disk-based or long-term-storage file system. These non-file objects may be accessed with the same system calls or utility programs as regular files and directories. The common term for both regular files and the non-file objects is node.

<span class="mw-page-title-main">Rob Pike</span> Computer programmer and co-creator of Go

Robert Pike is a Canadian programmer and author. He is best known for his work on the Go programming language while working at Google and the Plan 9 operating system while working at Bell Labs, where he was a member of the Unix team.

References

  1. Pike, Rob (2000). "2000 USENIX Annual Technical Conference". www.usenix.org. Retrieved 2024-04-15.