
Version Control Operating System - andrewfong
http://andrewfong.wordpress.com/2009/12/22/version-control-the-operating-system/
======
swies
OpenSolaris does a lot of nifty things in this area. Closest to this is their
Image Packaging System:
<http://hub.opensolaris.org/bin/view/Project+pkg/WebHome>

Check out the links to Zones (sandboxes) and ZFS (filesystem with
cloning/snapshots) at the top if you aren't familiar with them too.

While most of the heavy lifting for something like this would happen at the
operating system level, you also want to rewrite/fix up many apps to be aware
of what's going on. One of the big lessons from BaseShield was that these
abstractions are very leaky. Things get confusing to users fast when all apps
don't necessarily see the same view of the filesystem. If you want to see this
sandboxing/contained apps thing done right, look at the iPhone.

------
cabalamat
Are you familiar with GoboLinux? <http://www.gobolinux.org/>

It does the self-contained packaging you prefer. So if you install version
1.2.3 of a program Foo, it'll go in /Programs/Foo/1.2.3/ . Yopu can also have
multiple versions of the same program, e.g. /Programs/Foo/2.1.0/ as well, if
different packages depend on different versions of other packages.

~~~
krakensden
GoboLinux is really quite nifty, but are they still doing that thing where
they try and selectively hide the normal linux filesystem structure?

I approve of their goals, the method just seemed cracktastic.

~~~
kqr2
Gobohide is an _optional_ kernel extension which is purely for aesthetic
reasons.

<http://www.gobolinux.org/index.php?page=at_a_glance>

 _You may have noticed that the Unix paths did not show up in the system root
listing in the very first example. They are actually there, but they are
concealed from view using the GoboHide kernel extension. This is for aesthetic
purposes only and purely optional, though: GoboLinux does not require
modifications in the kernel or any other system components._

------
philwelch
A versioning file system
(<http://en.wikipedia.org/wiki/Versioning_file_system>) is not a new idea--
some old OS's, like ITS and VMS, had them. One of the biggest repeated bones
of contention in the old Unix-Haters' Handbook was in fact Unix's lack of
versioning.

------
JamieEi
"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."

No, synchronization lets you do that. Version control lets you maintain
history about the changes to a file or set of files. They are very different
things. Live Mesh, for instance, gives a great sync experience that is pretty
much exactly what the poster says he wants, but doesn't have history.

~~~
andrewfong
True, but I feel version control is a much needed component when you have
syncing. When you multiple versions flying around, you inevitably have a
merging accident / older file overriding the newer one somehow. Being able to
rewind is then your friend.

------
blasdel
Mac OS X has implemented a lot of clever things in this area for a long time.

There's the obvious case of user applications being self-contained bundles,
which works because nobody ever links against anything not provided with the
system by Apple.

The really interesting part is the operating system ships with multiple
independent versions of the SDK libraries, and the developer tools ship with
several independent sets of headers for them. An application that was built
against the 10.4u or 10.5 SDK will run against those libraries even on 10.6.

~~~
andrewfong
Another interesting question would be which of the OS design aspects of the
iPhone are going to be ported back to desktop OS X.

------
joe_the_user
Things I'd like rolled into an OS:

\- version control + mini database in file system. \- forward and backward
debugging. \- HTML rendering windowing system ( _not_ a browser but the guts
needed for a browser among other things of stuff, something like XUL). \-
Safe, fast Javascript interpreter. \- The usual unix-y networking and such but
cleaned up a la perl. \- Fast, safe sandbox for low-level stuff

------
rmaccloy
Sounds like a combination of FS-level VC (implemented several times) and
GoboLinux or Zero-Install (probably more Zero-Install.)

~~~
sandGorgon
Talking of Gobo and 0install - I am surprised nobody has mentioned Nix
(<http://nixos.org/>).

The aspect of Nix which is relevant to "versioned OS" is the package
configuration database which can be snapshotted
(<http://lwn.net/Articles/337677/> ).

 _In this approach, the static parts of a configuration —software packages,
configuration files, control scripts— are built from pure functions, i.e., the
results depend solely on the specified inputs of the function and are
immutable. As a result, realising a system configuration becomes deterministic
and reproducible. Upgrading to a new configuration is mostly atomic and
doesn't overwrite anything of the old configuration, thus enabling rollbacks._

I recently wanted to install the same configuration as my Ubuntu laptop, on a
desktop. The thread to list manually-installed packages in Ubuntu is huge and
has no deterministic answer. Perhaps, a manager like Nix could have accorded
me this flexibility.

~~~
gnosis
There are some great comments in that LWN article, and I encourage everyone
here to read them.

For reference, here are a couple of relevant links to some similar package and
configuration managers:

vesta: <http://www.vestasys.org>

store: <http://www.pvv.ntnu.no/~arnej/store/storedoc.html>

------
dlsspy
Sounds like you're describing plan9?

~~~
jf
I'm totally taken with Fossil:
<http://en.wikipedia.org/wiki/Fossil_(file_system)> \- which versions the
filesystem.

Does Plan 9 cover any of the other things he discusses?

------
andrewfong
I'm aware of the peril of submitting my own stuff to HN, but I figured this
was the fastest way to get some feedback.

------
shykes
cloudlets [1] experiments with versioning an entire filesystem, but it's
server-centric (disclosure: I'm the author).

[1] <http://bitbucket.org/dotcloud/cloudlets>

