Sunday, August 2, 2009

Doppelganger Desktop

Been playing with Amazon EC2 lately. Basically, it lets you rent time on virtual machines on an hourly basis, for astonishingly reasonable prices. I haven't tried this out yet, but I think I've come up with a solution to the problem of wanting to always have a desktop running somewhere.

Essentially, I want to have my desktop running all the time, so that I can keep various programs active - instant messaging, IRC, email, RSS aggregation, and others. Unfortunately, when I move or go on vacation or lose internet access for some reason, I can't keep my desktop on. One solution is to shift all of these to online services, but this isn't really possible today - for instance, there's no good way to run AIM remotely. (Bitlbee is neat, but I really wouldn't want to use it on a day-to-day basis. :p)

Another solution is to keep a synchronized home directory somewhere in the cloud, but this isn't especially useful except as a last-ditch backup. A home directory by itself isn't sufficient; what I really need is all that data plus the programs that use it. For instance, I have access to my email somewhere in Thunderbird's files, but not in a form that I can really use - at best, I could export it to a different program and use that.

So how about this: what if I keep a second desktop in the cloud, with all the same software that I have at home, and synchronize my files to that? This "doppelganger" system could be accessible over VNC, so I could use it almost as easily as a regular desktop. This would only be needed when my main desktop is offline, so I'd waste a lot of money if I paid for a dedicated server. Luckily, EC2 only charges you for time that your virtual instances are actually running, making it easy to keep a system on standby for when you actually do need it.

This system would have to be augmented to work in practice, since I keep a lot of large media files. I already have those on an external hard drive right now, so I could use that in conjunction with the doppelganger to fill in the gaps. (Why not just use the external for all my files? Because the real value in having a doppelganger isn't accessing the files, it's having a system with a persistent internet connection.)

To do a clean transition, I'd have to do the following:
* Log out of the main desktop, and bring up the doppelganger
* Sync home directory to the doppelganger, and sync my media drive to my external
* Log in on the doppelganger, and shut down the main desktop
All of which shouldn't take more than ten or fifteen minutes.

If I sync regularly, I'll also have a remote backup at a fraction of the cost of Exavault, which is what I'm currently using. As a bonus, I'll also have a system capable of using the backup ready to go at any time. rsync is the obvious choice for syncing, since it's fast, incremental, can use compression, and basically is the perfect tool for what it does. unison is also an interesting option, mainly because it provides two-way sync on top of all the things that make rsync awesome. Distributed filesystems such as AFS would be neat, but I don't think it's the best choice for something like this, where disconnected operation is the common case.

So yeah, that's my idea. I'm going to be trying it out while I'm on vacation next week; if you never hear about it again, that means it worked perfectly. :3

No comments: