p9.rs
A system of protocols and interfaces for distributed computation. Where conventional architectures impose hierarchy, this framework cultivates dialogue between processes — each node a scholar in a republic of machines, contributing arguments through channels rather than commands. The design philosophy borrows from Plan 9: everything is a file, every interaction a conversation.
I. The Protocol
Protocols are the grammar of machine discourse. They define not what is said, but the terms under which saying becomes possible. The 9P protocol strips communication to its essential gestures: attach, walk, open, read, write, clunk. Six verbs to describe every interaction a process might have with the world beyond its own memory. This austerity is not limitation — it is liberation from the accumulated cruft of interfaces designed by committee and revised by panic.
The marginalia of old protocols are filled with the daggers of broken promises: features announced and never delivered, extensions that became prisons, backward compatibility that became forward impossibility. 9P refuses this trajectory. Its specification fits on a single page. Its implementation fits in the mind.
†II. File Semantics
In Plan 9, everything is a file. This is not metaphor — it is architecture. The network is a file. The process table is a file. The screen is a file. This radical flattening of abstraction layers means that any tool designed to operate on files can operate on anything. A shell script can query a database, paint a window, or negotiate a TLS handshake, all through the same read/write interface.
The Rust implementation inherits this philosophy but enforces it at compile time. Type systems become the ruling lines on the notebook page: invisible constraints that make the writing legible. Where C trusts the programmer, Rust trusts the proof. Both approaches are scholarly; they differ only in their faith in human discipline.
†III. Namespaces
Every process has its own view of the world. In Plan 9, namespaces are per-process: each running program assembles its own file tree from available resources. What appears as /net to one process might be a local loopback; to another, a tunnel to a machine across an ocean. The same path, different realities. This is not confusion — it is precision.
The implications for distributed systems are profound. A program need not know whether its resources are local or remote. The namespace abstracts location entirely. Migration becomes trivial: move the bindings, and the process follows its files like a scholar follows a library.
IV. Against Complexity
Modern systems are archaeological sites: layers of abstraction deposited over decades, each solving the problems created by the layer below. Plan 9 was an attempt to start again — not from ignorance, but from experience. Its creators had built Unix. They knew its flaws not as users but as authors. Their revision was not timid; it was the annotated manuscript of programmers who had spent twenty years in the margins of their own creation.
p9.rs continues this tradition. Rust is itself a revision — a language built by people who had written too much C++ and decided the notebook needed new ruling lines. The combination of Plan 9 philosophy and Rust implementation creates a system that is austere but not spartan, simple but not simplistic.
‡V. The Channel
Communication in this system flows through channels — typed conduits that connect processes the way corridors connect rooms in an old university. You do not shout across the building; you walk to the appropriate door and speak at a reasonable volume. The channel imposes this civility on processes that might otherwise devolve into the shared-memory equivalent of a food fight.
Each channel carries messages of a defined type. The type system ensures that a channel expecting file operations will never receive window events. This is not bureaucracy; it is the card catalog of a well-organized library. You can find anything, provided you look in the right drawer.
VI. Conclusion
Systems reflect the values of their creators. Plan 9 valued clarity over convenience. Rust values safety over speed of compilation. p9.rs inherits both dispositions and adds its own: that distributed systems need not be distributed complexity. A protocol can be a poem — compressed, precise, and open to interpretation only within the bounds of its form.
The work continues in the margins, as all good scholarship does. Each commit is a footnote. Each pull request is a peer review. The repository is the library, and it is always open.