Web Services Part 2: Using Joyent
I recently started trying out different cloud providers to find one that meets my Perl needs. I see many uses for cloud computing in the form of on demand, ubiquitus computing nodes that I can launch with a range of "hardware" specifications. This translates directly into saving money, the prices are different for each hardware plan and you pick what you think you need and erase it when you are done. This article is focused on using Joyent to run Perl applications, not using Perl to interact with the Joyent API, that is a future article already in the works.
Six months ago I went to create my first instance and was disappointed. The selection of Linux distributions was just Debian 6.x and CentOS 6.x, both of which have old versions of Perl. Now the Perl programs I plan to use and the future ones I write are for new versions of Perl. I didn't even think about this until I had a running Debian instance and had a program error out on me. I had used the s///r option that was added in Perl 5.14 and Debian has 5.10, what a bother. I install perlbrew and Perl 5.16.3, then all the cpan modules I need. By the time this is all over I have a newer Perl but dependency problems from Debian's packages being older reared its head again.
Now the Debian users will tell me to switch to testing or unstable or add these other reposities. That is all fine and dandy but when the dependency is gtk3 and installing that breaks existing applications because gtk2 and gtk3 are not designed to be installed side by side, this poses a whole new kind of problem. I wanted to test some scripts I wrote using Gtk3::WebKit for headless automation. Setting that aside I spent a month trying out different applications and testing the network. There were no power outages, and no network issues at all.
Recently Joyent has added two versions of Ubuntu and two of Fedora. The newest of all the options available now is Fedora 18 and I recommend going with that. I used Fedora 17 (Beefy Miracle) extensively to test another cloud hosting provider and having Perl 5.14.4 as the system perl was nice. I did not have to install perlbrew and build another perl to get all the new things. Fedora 18 ships with 5.16.2.
The billing system is just missing all kinds of features. You cannot view your bill based on current usage, which is a feature they plan to add. You cannot load a prebuilt image onto Joyent because they have no import capabilities. The closet you can get is to build up an instance and then save it for later, for a continual usage fee. Some of the download links on their site point to documentation that does not exist.
Would I recommend it?
If you are planning on setting up a server and leaving it running for long periods of time Joyent is a good pick. When trying to spin up instances quickly and frequently the lack of import features for operating system images makes Joyent a bad fit for that use case, hence longer jobs. A longer job only has to be setup once and that time is a small fraction of the whole. As for the missing features I mentioned above they would be really nice to have but do not stop me from using Joyent effectively. Using the API with Fedora 18 would make spinning up instances faster and easier but the problem of out of date packages still persists. Being able to load a custom external image is the way around that problem.
Joyent use it, but understand it still needs some polish.