Last month, Mark O’Connor blogged about swapping his MacBook for an iPad and doing his development work in the cloud. Mark is a Linux guy and I’m a PC – I recreated the experiment for developers who spend their days in Visual Studio. Here’s how I got on …
Mark’s experiment and mine differed in that I wasn’t tremendously interested on whether I could use an iPad for day-to-day working. The screen is simply too small, and there’s no mouse – it would surely drive me mad within hours. My objective therefore was to see whether it was possible to stop running Visual Studio and related bits and bobs locally and use a hosted server in the cloud instead.
About six months ago I jumped over to using a MacBook Pro full-time. When I bought it, I assumed that an Intel i7 chip and 8GB RAM would easily allow me to host a large Windows virtual machine (VM). This assumption turned out to be utter tosh. OS X is a horrible virtualisation host. After suffering through the worst three-months in my computing life where I swore I was going to launch the thing out of the window at least four times a day, I eventually upgraded the disk to a Crucial m4 SSD. It was only then that the machine started to perform in a way where it could actually be used. My Mac and I are now quite happy together. (For reference, I was using VMware Fusion throughout and tried Parallels a couple of times. The conclusion I came to was that you cannot virtualise on a Mac without a SATA3 SSD.)
That whole palaver though made me think about whether I needed my development kit on my local machine, which is where Mark’s experiment resonated. The only place where I don’t have broadband internet access is when I’m in the car. The lack of offline capability for development didn’t seem a problem.
For the host I chose Rackspace Cloud. The reason why I chose them for this was primarily because it was my money I was spending, I wanted a provider that didn’t have any contract tie in. Rackspace and Amazon Web Service’s Elastic Compute Cloud (EC2) are two providers that don’t have tie-ins. You can spin up a server, use it for an hour and delete it and you’ll only get billed for that hour. Most of the other virtual private server (VPS) providers – staggeringly – have minimum contract lengths, e.g. spin up a server, and commit to it for a year. (This contract length seems to run against the spirit of cloud hosting to me, but then I’m not having to worry about the economics of providing such a service.)
Mark’s work only required a 512MB server, which Linode charge out at $19.95 a month. However, Visual Studio is impractical with less than 4GB, and that seriously drives up the cost. Rackspace’s charge for a 4GB server is £117+VAT per month plus bandwidth. For comparison, Fasthosts charges £64+VAT per month for a similar server to Rackspace, but with a 12-month contract.
The server I used had Windows Server 2008 R2 installed. Although most developers working on the Microsoft stack would use a desktop-class OS for day-to-day work, Windows Server works perfectly well. It’s perhaps slightly odd that we don’t all develop on Windows Server as a matter of course – after all, that’s where the software we build typically runs.
There was nothing else special about the setup – just Visual Studio, SQL Server and the other bits and pieces that I needed.
This proposition is all about the experience. If it’s more painful to use than a local OS, no one is going to do this.
(Some of you reading this won’t be using a Mac so you can skip this bit. The only RDP client option you have is the one built into Windows. Spoiler: performance from Windows 7 to remote server was perfect – it’s like logging in locally. Now, back to the Mac …)
I usually use the CoRD RDP client for OS X. The experience of this was good, but not stellar. Typing at speed often led to laggy screen updates. One issue was that the only way I could not get CoRD to stop scaling the screen. When scaling, the text gets too fuzzy to work with properly. In full-screen mode the dock and menu bar was obscured. I could get around this by re-arranging by monitors and moving the dock back to the laptop’s own monitor rather than on the external display. The real problem was, as I say, the lagging behind of the UI when working at speed.
The Microsoft Remote Desktop Connection Client for Mac (another short and snappy name from Microsoft’s naming team there) fared worse. Less lag, but I couldn’t get this to fill a widescreen display, so I was working in a 4:3 window with a huge amount of real estate wasted.
Performance was better on TSclientX. This wasn’t laggy, but the full-screen mode was odd in that it rendered the remote machine under the dock. (The OS X menu bar appeared in the correct location, however.)
Counterintuitively, the best experience was had by running up a Windows 7 VM locally via VMware Fusion and using the built-in RDP client. This had no lag and was as far as I could perceive – and I’m pretty picky – just the same as running Visual Studio in a local VM. The full-screen mode worked fine. The scaling was correct and the location of the OS X UI widgets was respected. The only thing you don’t get is the smoothing on the fonts as this doesn’t come down over RDP so the text is not beautifully smoothed.
(Indeed, performance is good enough now, but over time Microsoft is looking to make more of its RemoteFX technology. This is designed to stream Aero-class effects over the wire, even over broadband, making remote machines behave more like local machines.)
So at this point, I was able to run Visual Studio in a remote machine and get the same experience as if I were running it locally. Looking good.
Obviously with an experiment like this you have to do real-world work. I chose a project that I knew was pretty big. I took a one-year-old Windows 7 desktop with 16GB of RAM, an 2.8GHz i5 processor, 2x 500GB SATA drives in a RAID 0 array. Compilation time (“Rebuild All”) on the project averaged at 14.3 seconds.
On the remote server, with only 4GB of RAM, “Rebuild All” took 14.8 seconds.
So we’re not gaining compilation speed by moving, but we’re not losing either. Although I didn’t try this, I wouldn’t expect to see much increase in compilation speed with more memory. Compilation is all about the disk I/O, and VPS provision tends to run on the best disk hardware money can buy. (Though really, if you’re not using one of these in your compilation cycle, you’re not really trying. 600,000 IOPS, anyone?)
I said to myself I was going to try and use an iPad for a day. Yeah, I didn’t make the full day. Or indeed a full hour …
What I learnt from trying to use an iPad for development in this mode was that I didn’t need a laptop. An iPad and a Bluetooth keyboard is probably enough to keep me, or anyone, happy when on the road.
I thought it would be the mouse and the screen-size that stopped an iPad being practical. It was actually the RDP. I tried a number of different applications (at a total cost approaching that of running the server for a week) and found them all to be too slow. More to the point, I could not get the keyboard mappings working. Developing without a mouse is one thing, developing without a mouse, function keys, navigation keys or Alt is quite another.
So would I do it? I almost would …
The fact that on OS X using Windows 7’s RDP client yields near perfect performance is as surprising as it is enabling. It boils down to cost being the problem.
Windows stuff is much more memory hungry than Linux stuff. We need lots of RAM, and RAM is expensive in the economics of virtualisation; hence we end up paying £70+VAT at a minimum for this sort of solution.
What I was looking to do originally was see whether I could remove the overhead of having to cart around a virtualisation host on my laptop. The answer to this is “yes” – I could buy a MacBook Air with less RAM and less horses and work as I do now. I’m also then not dependent on ruining my dev environment if I run over the thing in my car. It’s a sensible thing to do in isolation; if it weren’t for the price, I’d do it in a heartbeat.
But this is the problem with the cloud. Some of it is inherently sensible (hence the staggering growth), but for some of it, like this, the benefits are nebulous.
Running a local development environment is not difficult. Developer machines, as mentioned, should be disposable as all code should be regularly migrated to source control and oddities on developer machine config lead to misunderstood production transfers and therefore should be whacked into shape with best speed. Spending £800-odd a year on a server is easy. Spending the same on a developer workstation, plus the cost of the local hardware is hard to justify.
But when the price comes down and it’s only £20 a month – I’m totally there, dude.
Thanks to Matt Fitchett for the loan of his Bluetooth keyboard for “iPad Day”.
Matthew Baxter-Reynolds is an independent software development consultant, trainer and author based in the UK. His favourite way to communicate with like-minded technical people is Twitter: @mbrit.