Your Next App: What Language? What Hosting Provider?

This is a guest post by Nick Gonzalez of SocialMedia Networks, an advertising network for social media platforms like Facebook and OpenSocial.

Last week I covered a strategy for dreaming up your next Facebook application. This week leads me into the second round of considerations when making an application. What language should you code in, and what provider should your host your app with?

Would an app programed in any other language be as trite?

The short answer is use the language you’re most comfortable with, and a hosting provider you already know. But chances are, if you’re reading this, you don’t have a strongly preferred language or provider.

When choosing a language, you’re looking for one that can generate programs quickly and scale effectively. Programming on Facebook’s platform brings in a third concern: platform support. Facebook has several libraries prepped for developers on 17 different languages (ASP.NET | ASP (VBScript) | Cocoa | ColdFusion | C++ | C# | D | Emacs Lisp | Java | JavaScript | Lisp | Perl | PHP | Python | Ruby on Rails | VB.NET | Windows Mobile).

From a support perspective, PHP makes the most sense for development. Facebook maintains an official PHP library, meaning that PHP gets all the new features first. But there are a growing number of developers drawn to Ruby on Rails (ROR). Some of the largest applications and development houses on Facebook run on ROR (iLike, Friends for Sale, CLZ Concepts). This means, even though it’s not officially supported by Facebook, there are a lot of developers with a vested interest in keeping the Ruby libraries up to date.

Here’s a little test the provides a bit more insight by looking at most recent library updates on the Developer Wiki:

ASP.NET – 7 January 2008
ASP (VBScript) – 19 December 2007
Cocoa – 25 January 2008
ColdFusion – 22 September 2007
C++ – 29 July 2007
C# – 14 February 2008
D – 17 November 2007
Emacs Lisp – 18 October 2007
Java – 10 April 2008
JavaScript – 3 April 2008
Lisp – 27 July 2007
Perl – 22 March 2008
PHP – 12 April 2008
Python – 26 April 2008
Ruby on Rails – 18 April 2008
VB.NET – 17 February 2008
Windows Mobile – 27 November 2007

PHP, Python, and ROR get the most love. Anecdotally these are also the languages I hear about the most on the platform.

My kingdom for a scalable hosting provider!

So, now where to put your application. With the traffic patterns for most Facebook applications looking something like the NASDAQ circa 1999, your application can get some serious attention – but you don’t want to be stuck with the bill when the party’s over should users abandon your application. There are essentially three types of hosts: elastic, dedicated, and a new category I call a web IDE.

Word of caution: how your app is architected has a large impact on your server costs. Use a lot of processor or make too many DB requests and it’s the programmer’s fault, not the hosting provider’s.

Facebook’s endorsed hosting solution has been pimping out two “elastic” hosting services: Amazon Web Services and Joyent. They’re called elastic because you can just buy incrementally more computing resources as you need them; perfect for a quickly growing Facebook app.

However, Joyent and AWS differ significantly. Joyent will give you free service for up to a year granted your application stays under their processing cap (1/32 processor, 512 MB RAM, 10 GB disk space, unlimited bandwidth; see this tech comparison). Beyond the basic account, they scale your application as you need more resources and move into a new pricing bracket (see Joyent’s price list). AWS charges you incrementally for the resources your use (bandwidth and processor). They charge $0.1 to $0.8 per hour for small to large instances (see AWS’s cost calculator). Joyent claims to be significantly more cost efficient than Amazon.