
Inferno, Part 3: Let's Make a Filesystem - kryptiskt
http://debu.gs/entries/inferno-part-3-let-s-make-a-filesystem
======
vezzy-fnord
The 9P protocol truly is a beautiful work of engineering. There's actually
another informal extension called 9P2000.e which is used by Erlang on Xen that
adds session keys and a few new macro-operations (read whole file; overwrite
contents) composed from lower level T/Rmsgs, but with ability to gracefully
fall back to 9P2000. Linux v9fs has its own 9P2000.L in addition to the
standard:
[https://github.com/chaos/diod/blob/master/protocol.md](https://github.com/chaos/diod/blob/master/protocol.md)

Either way, it's much more elegant and portable than something like FUSE.

~~~
0xdeadbeefbabe
What's the typical way to handle transport security on 9p2000 or 9p?

~~~
vezzy-fnord
See for instance: [http://plan9.bell-
labs.com/wiki/plan9/9p_services_using_srv,...](http://plan9.bell-
labs.com/wiki/plan9/9p_services_using_srv,_listen,_exportfs,_import/)

TLS tunneling is common. v9fs and diod give SSH port forwarding as an option.
It's very generic, so the options are plentiful. 9P is formally transport-
agnostic, from what I recall. Plan 9 natively preferred IL over TCP for a
while before officially deprecating it around 2003.

------
zubirus
I've been reading about Plan9 for a while. While I love the elegance of
everything being a file addressable through the 9P protocol, I wonder about
the feasibility of piping a "framebuffer" or other heavy process. Does someone
know how the Plan9 holds, in this area, agains Unix in performance?

~~~
theoh
Back when I was excited about Plan9, I saw Tom Duff at Siggraph and I asked
him if there was anyone present who would be interested in talking about the
new Plan 9 window system, rio (which provides a compositing algebra-based
raster graphics layer). He just said "no", basically, which led me to conclude
that graphics on Plan 9 was not flourishing, even though the rio model is
interesting. Performance over the network can't really be much worse than X11
for raster-heavy applications. I suggest you experiment with Plan 9/rio in a
VM if you are really curious.

~~~
theoh
I should add that the model of an application that is split across the network
(e.g. Rob Pike's Sam editor) offers ways to improve that. I can't speak to the
efficiency losses of locally using pipes rather than some kind of shared
memory, DMA, or direct graphics access, but maybe inferno has some multimedia-
oriented fixes for that, I don't remember.

------
vowelless
This looks great. Can someone recommend more books / papers / blogs /
tutorials on writing file systems? I want to deep dive into it during
Thanksgiving and want to create toy filesystems to play around with.

~~~
twohey
Dominic Giampaolo wrote "Practical File System Design with the Be File System"
which he has made freely available at: [http://www.nobius.org/~dbg/practical-
file-system-design.pdf](http://www.nobius.org/~dbg/practical-file-system-
design.pdf)

I found it to be well written and interesting when I was a university student
first going deep on the subject.

The Design and Implementation of the FreeBSD Operating System (2nd Edition) by
McKusick is also well written and covers some of the same ground.

~~~
jff
He was probably thinking more of 9P fileservers, rather than disk filesystems.

