Friday, June 5, 2009

Why Amazon EC2 is a great thing for the Indie developer. At least, that's what I'm finding.

I've been working with Amazon EC2 a lot lately. I'll tell ya, this is a great thing for independent developers.

For those of you that don't know, EC2 is Amazon's computing cloud, in which you can run instances of virtually any kind of computing environment for pennies an hour. It's all managed right through a web interface. Go to the Amazon Elastic Compute Cloud website and check it out.

As an independent, I work with different clients all the time. Some use Linux, some Unix, some Windows. That doesn't matter to me per se, because I generally work with technologies that have runtimes for most commercially viable platforms. But, in order to look more professional, I've taken it upon myself to provide clients with a staging server, as well as SVN and FTP repositories. You would be amazed at how many times a client has said to me, "you can do all the staging, AND will set us up with SVN accounts?". Yep, I'm serious about this business, and want to make it as easy as possible to integrate me into your workflow without the hassle of setting me up internal accounts and access for the piece I'm building.

The staging server is a Windows box. The reason for this choice: I can run .Net on it. People frequently ask me, "why do you bother with that," to which I offer canned response, "I'm not going to lose work because I have a religious belief about a given technology". If the client wants .Net web services to power the Flex UI, that's fine with me. If they want Java, or PHP, or Ruby, same thing. All of these technologies are fully available on Windows. The same is not the case with Unix or Linux. People guffaw at this, pointing to .Net implementations on the Unix base, but that's not what clients use. So, to run as many technologies as I can, Windows was the logical choice. I can drop a MAMP server on it for PHP/MySql, run Tomcat and Oracle Comm. Edition for Java, and power IIS with .Net and SQL Server, or any combination of the above, all at the same time.

It costs me money though, even when I'm not using it. About $150 a month to be precise. I host with Liquid Web, which I must say does a GREAT job. GREAT. Their support is on point, and I've never had an outage in more than two years. But fact is, I do most of my development locally, and just do a daily dump it on staging so the client can eyeball it, but otherwise, I store my SVN repos on their, do some experimentation with server products and whatnot, and that's about it. If I want to test on anything other than Windows though, I do it on local virtual machines, like a Parallels Centos VM or some such. Its been a great model for working with all kinds of clients, managing the environments is great experience of course, but...

...enter Elastic Compute Cloud. The concept is this: it's a big ball of clay. When I want a piece, I pull it off; this is my "instance". I can shape it any way I want, and only get billed for when it's active. When I'm done with it, I "bundle" it (essentially a saved configuration) and put the raw material back onto the big ball, which stops billing.

Billing, btw, for a "small instance", which is roughly equivalent to my $150/month hosted box, is 0.125 dollars/hour...that's twelve and a half cents and hour.

Amazon provides you with all kinds of pre-configured instances: Fedora running Ruby on Rails, LAMP, 64 bit versions, Windows Server 2003 and 2008, etc. Additionally, the "community", which is made up of all kinds of platform developers like Citrix and what not, provides Windows, Debian, Fedora, SUSE, Ubuntu, Solaris, Gentoo, etc. images of all kinds, running their databases, VM servers, and what have you. They also put out a lot of demo instances so you can check out new technologies and services...for FREE, all pre-config'd. No downloading, installation issues, and all that. True, it's important to know how something installs, but first, let me see if I'm interested in the technology before I fight with a download and install.





So, here's the scenario. I have a client that works entirely in Linux using MySQL, and they want to see the deployment of my product in that environment. Currently, I can't do it, because my box is Windows; I can certainly demo the product working and use MySQL, but it's not Linux. So, I send it to them and have them deploy it, but that detaches me from the process, which causes iterations. I need to see it running--or breaking--to fix it fast.

With EC2, I can just develop locally, test on a Linux VM, and when I'm ready, fire up a Linux instance in EC2 and deploy it. I make any necessary changes and fixes, and when I'm done, can show it to the client running in an environment similar to theirs, and be reasonably certain that if they deploy it correctly--and there's nothing exotic going on, and of course there's nothing I can do about their internal security boundaries--it'll work.

I start the instance when I need it, stop it when I don't. Even if I leave it running 24/7, it's ~90 a month, still sixty bucks cheaper than my current environment. I write it all off true, but it's not just about the money, it's about being able to come as close as possible to the deployment environment. It looks really pro and builds client confidence. "Wow...you have this running as an instance in a cloud? How did you set that up?" is a question I've already been asked.

And because it's cheap and timed, it's very easy to bill back to a client. I usually don't do this, preferring to just build it into my rate, but in this day and age of economizing, being able to draw out line items on an invoice is important. If a client declines, that's fine, but I make the point that for essentially pennies they are compromising my ability to ensure they are getting a working product in as few iterations as possible. I expect that my clients will say, "spend the fifty bucks".

Lastly...I'm an independent developer, and am getting a firm, hands-on grasp with cloud computing and how to use it effectively. That's the sort of experience that sets you apart from the typical "I do flash sites" kind of hacker.

There you have it. If you have the chops, being an indie dev isn't as hard as you'd think. I find it far more rewarding than a straight corporate job, and if you read my blog, you know I've had 'em. But to stay on top of it, when new tools or services come along that let you economize and work smarter, you gotta get involved. For me, EC2 is definitely in my toolbox.

As always, thanks for visiting.

No comments:

Post a Comment