You know a web 2.0 application is hitting an upward inflection point when your inbox starts filling up with the likes of “Joe Doe wants to add you as a friend on VagueSter.”
Over the last few months, it’s been Facebook’s turn. The site’s rise in traffic is in no small part due to developers being enabled to deliver their apps using the Facebook API. Some of these apps are getting serious traffic; see the Alexa results for the ex-PayPal guys over at Slide.com, for example. But some words of warning about social applications.
By Surj Patel
As Friendster found out the hard way, exponential network growth is compelling but the hangover can be deadly. In simple terms, your audience can grow linearly but your computational requirements often grow exponentially (social network computation has a lot of what’s known as NP-complete problems). If your app on the Facebook platform succeeds, you don’t then want it to die on the vine for lack of server resources. You need to make it scale and you need to make that happen quickly. And of course, cheaply.
While the guys in Palo Alto are happy that you use Facebook as your platform, they are not going to be happy if, as you succeed, you take them down with you. The techies at Facebook have been careful to ensure that they offload as much processing to you as they can — which means that in order for your app to scale you need to look at buying plenty of machines which, in turn, means lots of money.
The problem with traditional hosting resources is that you need you to pay up front, then they either hammer you with overages for being successful or charge you up the wazoo for unused capacity that just generates heat. What you need is what the world of suits would call “just-in-time resources,” which can be roughly translated into: “I get what I need, when I want it, and I pay only for what I use and no more.”
But of course you’re broke, sleeping under your desk and eating ramen noodles. So what can a poor entrepreneur do?
Welcome to Amazon and S3 and EC2 — processing power (EC2) and storage (S3) on demand. These services let you access computational power and storage only when you need it and, better yet, pay only for what you use. The last time I checked, it was 10 cents an hour for the server, 10 cents for every gigabyte of data written and 18 cents per gigabyte read out – all for a virtual box with 1.7Ghz x86 processor/1.75Gbytes of RAM/250Mbs of bandwidth. Nor are you limited to one usage; use as many as you need or want and can afford. But get ‘em while you can, as a waiting list has appeared in the last few months.
So where could you use such “meta services” when developing an app for Facebook? I talked to Jeff Jolma, the expert Facebook programmer at Snapvine, which has been adding voice services to Facebook and MySpace for the past couple of years. He said they’re great for getting the job done and making sure the job keeps getting done. “You have to be aware of some of the limitations with meta services, but if your app can work within their parameters then it’s a cheap way to scale up and down as needed,” he said. They’re also “definitely worth looking at” for Facebook apps, he said. Other uses for EC2 and S3 include:
* Images – if you have to store or process images beyond Facebooks provision
* Video storage and processing
* Heavy storage – DB replication, video, backups, transfers
* Backup – safe and secure
* Batch processing – large amounts of cycle-intensive processing all at once
* Data mining
* Spike demand handling (the Slashdot antacid)
And many, many more.
Now you may read this and think, “While it’s a great idea, the cost to develop the software to handle this would negate any benefit, right?”
Wrong.
Someone has probably already probably done most of work for you; use Google to find them. There are various meta services out there that can help you as well. Some, such as with WeCeo and RightScale, are selling computation services through a web site/API and will manage everything for you.
If you prefer to roll your own, go directly to the source with EC2 or S3 (for related ideas and support go here for EC2 and S3, respectively).
So go on, give it a try — you really have nothing to lose. Make yourself and the young Mr. Zuckerberg richer. While you’re at it, try to have some fun and please do share what you discover about meta services, be it good or bad. We’d also love to hear about services other than Amazon’s, so please post your findings below.
Thanks to Jeff Jolma at Snapvine for help in researching this article.
{"source":"https:\/\/gigaom.com\/2007\/09\/11\/making-facebook-platform-apps-scale-on-the-cheap\/wijax\/49e8740702c6da9341d50357217fb629","varname":"wijax_9e5352831407cd85fc9c22205a069b78","title_element":"header","title_class":"widget-title","title_before":"%3Cheader%20class%3D%22widget-title%22%3E","title_after":"%3C%2Fheader%3E"}