The Squirrels Are Watching

Proposal: Version Control – The Operating System

Posted in Code and Tech by andrewfong on December 22, 2009

There are two classes I wish I took back in college: Dinosaurs & Their Relatives and Operating Systems. The latter especially bugs me, because every time I see something about a browser-based operating system, I want to scream, “No, no, I don’t want that!” and then curl up in a corner for three months making something I do want.

I don’t have the know-how to do the latter, but I do have a blog, so I can do some virtual screaming.

My beef with a browser-based OS is simple: I LIKE DOWNLOADING THINGS. My WiFi connection throws a hissy fit every 10 minutes (can’t tell whether I should blame Netgear, Comcast, or tiny gremlins). Or sometimes I’m on the road or on a plane or in some place where I want to do something on a netbook and I don’t have net access. I bet I’m not alone. I’ve heard this plenty of times: “I want a netbook. All I do is browse the net anyway. Oh, and I want Microsoft Word. And I need to be able to sync my MP3 player with it. And I want to watch some movies I’ve ripped. And I want to play World of Warcraft. And if it’d scratch my back, that’d be nice too.”

As in, people basically want a tiny full-featured laptop for $300. Sure, you can do all the above stuff with your fancy Gears / HTML5 / Extensions / etc., but you’re spending so much time reinventing the wheel. Hey look everyone, I can drag and drop in my browser! Whee! I’ve only been able to do that in my operating system since at least Windows 3.1!

This isn’t exactly a new experience for the industry either. When the iPhone launched, Apple was all, “You don’t need apps! You have web apps!” Then they launched the App Store and pretended they never said that.

So what’s the best way to merge the “cloud” with a netbook’s operating system? IMHO, the solution has been around for a while. And no, it’s not the iPhone, it’s version control.

I like to download things, but I also like the idea of being able to use multiple machines and have everything — my settings, files, and apps all sync up intelligently. Download an MP3 on one computer and listen to it on another. Version control lets you do that.

Version control has traditionally been a very difficult-to-understand programmer-oriented concept, yet it’s not hard to automate much of it and slap a decent UI on it. I mean, Dropbox has managed to pull it off.

I like Dropbox, but I want Dropbox’s mechanics to extend to the entire operating system, and then some. Some ideas on what that might look like:

(1) Package package package.

Let’s keep everything in their self-contained packages — no need for a single app to insert stuff into a registry, modify environment variables, or scatter files across /usr/bin, /usr/lib, and six other folders. One single package, just like good lord intended. Why? Well, it’s a good idea generally, and it also makes syncing less of a headache — imagine syncing an app from one computer to another only to realize you forgot a DLL.

(2) Infinite Undos

It’s kind of the reason version control was invented.

(3) Share the sandbox

People love sandboxes. It sounds fun and magical, and it also happens to good for security. We like holding dangerous animals in captivity for our amusement — so long as said dangerous animals can’t jump out of their pen and devour Little Timmy. The problem with the sandboxes is that sometimes apps need to share stuff. Some apps are designed to enhance others. Other apps are meant to edit external files. Proper sandboxing lets the user decide what apps can access what, but users are fallible.

One way of building a flexible sandbox is to borrow concepts from version control — e.g. branch, clone, and merge. If App A wants to change a setting that App B depends on, rather than letting A directly edit the setting, the OS simply provides A with its own private copy. If A and B are both aware of each other and need to see the changes the other is making, the OS lets A and B merge their two copies. If A or B is at any point unhappy with the merge, either is free to revert back to their original copy. Granted, user interaction may still be required at some point here, and explaining version control to the average user is hard, but Dropbox has done a decent enough job of it so far with simple files.

And yes, multiple copies of things will eat up memory quick but (1) deltas are small and (2) disk space is getting cheaper.

(4) Standards

A lot of this could be built using existing VCS standards — SVN, GIT, Mercurial, and so forth all do what they do well enough. If the cloud that your OS depended on disappeared or became evil, then anyone capable of setting up a version control repository could build their own replacement cloud. It maximizes user-control and decreases dependencies.

—–

Now I could be talking out of my ass here — I have yet to compile my own kernel, and while I love GIT, I’ve also never poked around in its source code and done any performance testing. Still, if this feasible, someone, please make it.

UPDATE: Lots of useful comments at news.yc

Advertisements

11 Responses

Subscribe to comments with RSS.

  1. Rusky said, on December 22, 2009 at 5:37 pm

    On number 3, it might be simpler to use capability-based security. Basically, apps have no permissions at all, everything they do is either internal or through some object that it’s given. That way arbitrary code can’t mess with the filesystem, use your network connection, etc.

    For example, when you install your browser it gets a network connection and an interface to the GUI. Instead of messing with your filesystem when you download a file, it would let you drag and drop it out where you want, or maybe you could give it a directory interface so it would put everything there.

    Capability-based security is actually a solution for everything you’ve listed- it requires that programs be self-contained, makes sandboxing automatic, and requires that everything be done through standard interfaces. It also makes infinite undo a lot simpler to implement.

    Evlan (http://evlan.org/) is a language/VM that works this way. It’s not very far along and it’s pretty much abandoned, but it’s an interesting proof-of-concept. Some of the ideas on the site are for an OS that works this way. One idea that you haven’t brought up is a completely filesystem-less system. All your files would be internal to programs like iTunes, Word, etc. and shared between each other through drag-and-drop or capabilities/interfaces.

    Web apps and normal apps could actually be merged. The browser would become your shell just like in Chrome OS, but apps would be normal programs with capabilities given them at install (i.e. download). You could even switch between local/cloud storage seamlessly just by switching out capabilities.

  2. Jamie Kirkpatrick said, on December 23, 2009 at 12:43 am

    FYI: The Git source code is a really easy read. IMHO one of those bits of C that does make you question why we ever needed a mess like C++?

  3. Bob said, on December 23, 2009 at 2:12 am

    Have you tried OSX? Time Machine fulfils some of the requirements for a version controlled OS (not to the same granuality of version control, though), whilst most applications ship as a single package that you download and copy to your “Applications” folder to install.

    • andrewfong said, on December 23, 2009 at 10:42 am

      My understanding is Time Machine is strictly periodic backup. It doesn’t sync multiple machines to the cloud. Try installing Dropbox on your Mac, and you’ll get a better sens eof what I’m talking about.

  4. Bob said, on December 23, 2009 at 2:13 am

    Oh, and it works pretty well on my $300 Samsung netbook, too.

  5. maht said, on December 23, 2009 at 6:48 am

    It’s such a great idea we’ve had that feature for over 15 years.

    http://man.cat-v.org/plan_9/1/yesterday

    • andrewfong said, on December 23, 2009 at 10:45 am

      Periodic dumps aren’t really version control. There’s no sense of merging multiple dumps for instance. That said, CVS and the like have been around for a while. It just isn’t an operating-system level concept.

    • andrewfong said, on December 23, 2009 at 10:51 am

      Unless you’re referring to just Plan 9, and not the yesterday command — in which case, cool!

  6. […] Version Control Operating System […]

  7. Top Posts — WordPress.com said, on December 24, 2009 at 5:16 pm

    […] Proposal: Version Control – The Operating System There are two classes I wish I took back in college: Dinosaurs & Their Relatives and Operating Systems. The latter […] […]

  8. […] Pen Holder (Black …Related Blogs on systemYamaha YHT-S400 Home Theater System | Gear PatrolProposal: Version Control – The Operating System « The Squirrels …Top IBM System z events in 2009 « DancingDinosaurPresentation of an alternative economic system […]


Comments are closed.

%d bloggers like this: