News for hackers. Stuff that matters.
Re:Non-Posix File Systems by floren on Tuesday September 08, 2020 @06:00PM (#24414035)
If you implement, for example, the network stack as a filesystem, and you have generic facilities which let you bind "files" from one system to another, you can forward your traffic through another host as easily as:

    import remote-host /net
Now your new network connections will go through remote-host, because a network connection is just reads and writes to files in /net.

Lots of neat applications when you take a few simple ideas and expand them as far as you can: represent everything as files in a namespace, provide advanced tools to manipulate that namespace, and do it all via a networked protocol.

Re:Non-Posix File Systems by Sebb767 on Tuesday September 08, 2020 @10:11PM (#24416081)
> Now your new network connections will go through remote-host, because a network connection is just reads and writes to files in /net.

Wouldn't this then also affect the connection to this remote host used for importing, effectively looping itself?

Re:Non-Posix File Systems by floren on Tuesday September 08, 2020 @10:38PM (#24416309)
Nope, because the connection to that remote host was established when we were using the local host's /net. This is one of the other key features of Plan 9: per-process namespaces (inherited by children). Only programs inheriting the current process's namespace will use the imported network stack: you open a shell, you run "import remote /net" to bring in the remote network stack, then you run your network applications within that shell. Applications in any other shell will use the regular local network stack. After importing /net from the remote host, you could also run `rio` in that shell, which will start a new instance of the GUI nested within that window, in which all applications will use the imported stack.
Re:Non-Posix File Systems by Sebb767 on Tuesday September 08, 2020 @10:49PM (#24416416)
Very interesting. Thanks for the explanation!
Re:Non-Posix File Systems by bear8642 on Tuesday September 08, 2020 @06:28PM (#24414322)
Indeed and that's what Plan9 enables you to do
Re:Non-Posix File Systems by floren on Tuesday September 08, 2020 @06:32PM (#24414368)
That's why I posted the exact command you would run on Plan 9 in order to do it ;)