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.

Post a comment or leave a trackback: Trackback URL.


  • Kevin Schraith  On May 5, 2011 at 07:31

    One tip for the keyboard and mouse sharing – use Synergy. I use that with my MBP – at work with a Linux box, and at home with an iMac. No problems for me (outside of some wonkiness with key mapping when I switched versions of Synergy)

    • Jason  On May 5, 2011 at 14:18

      I had not heard of it, but Synergy does look pretty cool. Unfortunately, it doesn’t really address my problem (or at least not exactly) because I don’t have multiple screens open at once. My issue is that I only have room on my rather modest desk for one (big) screen.

  • Richard Kemp  On April 16, 2012 at 23:50

    Hate to offer such a low-tech solution, but why not just keep eclipse and the workspace on a usb storage device? Keeping only one copy of the files avoids any issues with storage at all, and even allows you to work on someone elses PC if for some reason you don’t have yours.

    • Jason  On April 17, 2012 at 00:41

      So, eclipse binary and the workspace all on the USB? That seems like it would work, but it wouldn’t perform very well, would it?

      • Richard Kemp  On April 17, 2012 at 00:48

        Well that depends on your device… obviously a regular old crappy flash drive will be sub-par, but I’m sure something could be found that would do the job. Maybe the portable eclipse could be set to use the host computer’s hard drive for cache and save everything back to usb when done?

        Anyway I think the discussion is moot since I noticed portable eclipse ( ) is Windows only.. still I guess you could try installing regular eclipse onto a usb device and just see how well it works. Are you still currently using branches/patches as mentioned in your update?

      • Jason Erickson  On April 17, 2012 at 07:54

        Yes, still using branches and patches. It’s working pretty well, but it has it’s quirks. Switching to a new branch in Eclipse can be time consuming (a matter of minutes, but still). I wonder if switching to a distributed SCM like Git would make it more straightforward.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: