Monthly Archives: April 2011

W. Edwards Deming quote

“Experience alone, without theory, teaches management nothing about what to do to improve quality and competitive position, nor how to do it.”

Sharing workspaces between computers

Here’s my problem: I have a MacBook Pro that is nice and fast and portable and I have an iMac that is nice and fast and big with lots of screen real estate. When I’m at home, I want to work on the iMac and when I’m camping in someone’s conference room, the MacBook works great.

I would be happy to dock my MacBook Pro into the iMac if I could reuse the mouse and keyboard (and ideally the speakers, mic and camera), but apparently I am crazy to want this because it does not seem to be possible. I can plug in to the display, but if I’m on Skype or GotoMeeting or something and my laptop is closed, the mic is covered so that doesn’t work. (I don’t care as much about the video.) Also, when I plug in to the display, I have to disconnect my mouse and keyboard from the iMac and plug them in to my laptop. I haven’t figured out how to do this with the Magic Mouse and wireless keyboard that came with it, so I got a third party (Kensington) wireless mouse and keyboard that work with a USB dongle thingy that I can move from one place to another. So that almost works, except for online meetings, which I have every morning, so it’s still pretty inconvenient.

So, the next thing to do to solve my problem is just to use the iMac as an iMac, not a docking station, and somehow use the files from my MacBook. The only thing I need to keep in sync is my Eclipse (actually STS) workspace, so I looked into online sync. I tried just mapping a network drive, but that only works as long as the MacBook is plugged in and either open or connected to an external display, so that was a fail.

Next solution to sharing the workspace was to use an online cloud syncing. I looked at several things that were rejected because they didn’t really support syncing between multiple computers – they were more about backup (Carbonite, Mozy, etc.) I was already a DropBox user, but they have a pretty chintzy 2GB free and I would have to have my workspace under the DropBox special directory. SugarSync seemed to be a better fit.

I installed SugarSync pretty easily and shared my workspace, which, with all of my projects, worked out to about 800 MB (well below the free threshold). So far so good, but then the performance problems started.

For most users, this wouldn’t be a problem, but a development workspace (whether Eclipse or Netbeans or Visual Studio) has a very different usage profile than someones photos and work documents. If you are very busy, you might add a few hundred photos per day and make several dozen edits in, say PhotoShop. However, for a development environment, when you do a “mvn clean install” or equivalent, you are deleting and recreating thousands of mostly small files in the course of a few minutes or even less. Also, with your files under version control (they are, right?) and you switch to a different branch or just pull in a lot of changes from the repository, you are changing not just those files but lots of hidden files used by your version control client.

You might do these kinds of things several times an hour, but the frequency really isn’t the issue. The issue is how long do you have to wait after you’ve done a clean build for your files to be in sync (so you can close your clam shell and go home). In the case of SugarSync it was a very long time – hours even. Not acceptable.

So, I tried DropBox. Again, I don’t like putting my workspace under their special directory, but the performance was great. After a clean build, all the files were updated within a couple of minutes. Not instantaneous, but if a clean build isn’t the last thing you do before you close your laptop, you probably don’t have to wait at all. Furthermore, since the performance is good enough, you can be fairly confident that the changes you really care about (uncommited source files) are not queued up behind a long list of .class files so you can work pretty much the way you are used to.

I’ve just started it, so I’ll update this post if I run into a bunch of problems, but so far, so good.  I think it works fine for Mac to Mac and probably for Windows to Windows, but I don’t think it would work as well for switching between platforms because there are too many special files and changes to .settings files, etc. that wind up being specific to the platform.

If this is helpful to anyone (or a big goose chase) let me know.

UPDATE: This turned out to all be a wild goose chase.  DropBox didn’t really work for me either.  If you don’t share the whole disk, then you don’t share your particular Eclipse/STS installation and the installation/configuration of your local development Servers.  It’s too hard to keep everything in sync.  My ultimate solution: Keep things in sync as much as you can, use branches and patches to share changes between the two machines, and just put up with this inconvenience.

Maybe Java isn’t dead after all!

Maybe Java isn’t dead after all! Twitter Engineering: Twitter Search is Now 3x Faster