Plan 9 and the Mac
I wrote this in July 2006 on my old blog, clawbox.com. Reading it twenty years later is strange — not because I got it wrong, but because Apple shipped most of the surface-level vision without adopting any of the underlying architecture.
Apple TV arrived six months after this post. AirPlay turned every speaker and screen into a zone. The iPhone became the “Apple Remote” I imagined — a little networked computer that controls everything else in the house. Universal Control finally let you push your cursor between Macs. iCloud Keychain shares credentials. AirDrop discovers nearby devices and just works.
What didn’t happen is the interesting part. None of it runs on exportable filesystems. There’s no transparent remote execution, no “launch an app from another Mac’s drive and have it run where the data lives.” Apple solved the UX problems I described, but through cloud sync and purpose-built protocols rather than through a unified filesystem abstraction. The result is good enough for most people, but it’s also brittle in ways Plan 9 wouldn’t be — each feature is its own silo, its own protocol, its own failure mode. The vision below imagined one mechanism. Apple shipped twenty.
I’ve used Plan 9 occasionally over the past few years — experimenting, prodding. The basic underlying concept of exportable filesystems is brilliant. Combine that with “everything is a file” and you get something genuinely inspiring. Now I want my favourite UI on top of my favourite OS architecture. Apple — or another enterprising software company — would have something remarkable if they could infuse the Plan 9 concept with a strong dose of Apple-like attention to user experience.
So what’s the vision for this hybrid? Plan 9 is architecturally simple, which lends itself well to the Mac philosophy. More than that, it potentially extends that philosophy to the network. Right now, if you want to run a network of Macs, you either treat each as an island or you fight with exporting home directories, maintaining common sign-in, delivering patches and configuration changes.
These problems are all tractable, given OS X’s unix underpinnings. You can harmonize UIDs, export home directories with NFS, mount common Applications and Library directories on each machine, cache system updates. But must we settle for “tractable” — especially on the Mac? Hell no.
some alternate universe
Let’s imagine an alternate universe where Plan 9 formed the underpinnings for OS X. (If you like, pretend I’m describing OS X+n, n sufficiently large.) Afterwards I’ll talk about how Plan 9 could enable this.
John buys a new MacBook Pro (Mac1). He fires it up and plays with a few apps — iLife, Photo Booth, Front Row, Safari. Everything works perfectly, as a Mac should. It works so well he buys one for his wife Betty. John heard that when you activate two Macs in the same house, everything just works together — and the techie in him wants to try it.
When Betty activates the second Mac (Mac2), it goes through a discovery process and suggests she link with the other machine for more functionality. Betty answers “yes,” and a confirmation dialog appears on Mac1 as a security precaution. After John confirms, all configuration is complete — he thanks Bonjour for that bit of magic. Now each computer’s drive is visible on the other’s desktop. He wonders: “Is that it?”
Betty creates a user on Mac2 for herself. John reads in the manual that her new account will be instantly usable on any computer on the network. He mutters: “Neat trick — automatic credential sharing.” Browsing the Audio system preference on Mac1 the next day, he notices he can now route Mac1’s audio output to Mac2. More neat tricks. He can also send it to the AirPort Express he bought last week.
Even better — once John changes audio output from “Local” to “AirPort,” the setting follows him regardless of which computer he logs into. Exploring further, he finds the Audio pane lets him configure “zones” — customizing where audio goes depending on which machine he’s sitting at. There’s also a security tab for specifying which users can play sounds on which machines. (Do these settings update all computers on the network?) He sets his Mac to play audio on Mac2 to test it. He starts an MP3 file, and his wife’s computer starts playing it — much to her surprise. He explains the situation and turns off the song.
John starts browsing Mac2’s hard drive — remember, it appeared on his desktop. He launches an application from the remote Mac to see what happens. It appears to run normally, as if he’d launched it from /Applications. Curious, he fires up the remote copy of QuickTime and begins playing an MP3 stored on his wife’s computer. Sound plays on Betty’s computer again. The result seems intuitive. Being the techie he is, he checks iStat for network traffic while the song plays. Nothing. Shouldn’t the MP3 be streaming off the remote system, decoded locally, and transmitted back to Mac2? Something more is going on. John concludes that QuickTime must be running on Mac2, reading the MP3 file directly from that computer’s disk. Mac1 only gets a view of the application’s UI, similar to X11.
Curious how far this goes, he borrows Mac2 for a minute. On that machine he browses Mac1’s drive and launches Final Cut Pro. He opens a 5 GB HDTV project he’s been working on for months. Everything is fast and responsive — no sign that the file was copied over the network. Final Cut is running on Mac1 with direct access to all of Mac1’s files, even though the program appears to be running natively on Mac2, with fast video previews and plenty of snap.
Back on Mac1, John invokes “Get Info” on Final Cut Pro and discovers an intriguing drop-down. It says “Run on:” and displays a list of computers on the network. In a moment of zen enlightenment, he changes it to run on Mac2, closes Get Info, and double-clicks the icon. It fires up after a short delay, as if he’d launched it normally. As the situation crystallizes, John realizes that opening his 5 GB project wouldn’t be a good idea this time — the file would have to transfer over the network for the remote process to work with.
multimedia
John buys an Apple TV. When he turns it on, the TV discovers the network and joins it. At that same moment, QuickTime and iTunes update their video display windows. Now there’s a drop-down: “Play Video:” with options “Locally,” “Mac1,” “Mac2,” and “On TV.” John changes the drop-down to “On TV” and plays his HDTV project — it starts playing on the new TV. The project has embedded menus, and those menus just work.
The TV has a tuner, so on a lark John opens the TV’s desktop icon (yes, it gets one too) and finds an icon named “Watch TV.” He double-clicks it, and an interface with channel buttons, menu buttons, and a video display appears. He sees the local news. There’s a button to send the video display back to the TV. Next to “Watch TV” there’s an app for DVR functionality. John makes an alias to “Watch TV” and drops it on the Dock — clearly a very useful application.
Apple announces a new device — the Apple Remote. A little iPod-sized device that ostensibly lets you control an Apple TV and other devices. But it integrates with John and Betty’s network too. John understands what this means when he spends a few minutes with it. The remote is itself a little computer, so it simply runs the TV’s programs with local display of widgets. Remember the “Watch TV” program? It runs on the remote control just as it runs on Mac1. The difference is that video goes to the TV, so no video display happens on the remote — but John still gets all the controls.
The remote also has an option to play videos from the other Macs in the house, so John plays his 5 GB HDTV project. It starts playing on the TV, with controls for navigating menus and pausing playback on the remote (presumably the menu application came from the Mac). The remote also lets John play his MP3 collection. Pressing play on a playlist, the sound comes from the TV, with controls on the remote. A visualization and album art appear on the TV. John has given up trying to figure out which device is generating the visualization — it’s all just magic.
John can use the remote to control any Mac in the house. And he can run the remote’s software on any Mac. Now he controls all devices in the house with the same simple UI. He begins to realize that each new piece of hardware or software he buys extends the functionality of everything he already has.