Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [55]

By Root 666 0
of rich-media files, which are huge and are going to gobble up my entire monthly bandwidth allocation in one bite.

Solution


Store your media files (or any files, for that matter) on Amazon Simple Storage Solution (S3), part of Amazon’s growing family of web services. Don’t just take it from me—Nat Brown, CTO of iLike, is a big fan of S3:

S3 is a no-brainer if you need to scale out delivery of simple content or provide secure limitless storage. We chose S3 for expediency (we were up and running within a few hours) and usage-based pricing (instead of minimum commits and long-term contracts).

Also, the active open source community, growing commercial ecosystem of products & services around AWS, and the high-quality tools for working with AWS are not only great resources for us but they also indicate that the community will be around for the long-term and so we feel comfortable basing more of our architecture on AWS.

You can read a full interview with Nat about how iLike uses AWS at http://tinyurl.com/3j7hmw (the actual Amazon URL is so long and embarrassingly full of weird parameters that it’s actually unprintable).

Discussion


Back in the bad old days of the first bubble, it used to be that startups had to raise bucket loads of money, which they then handed straight to the network hardware and server makers in exchange for rooms full of gear, which they could then sell at fire sale prices when the bubble popped. The Web 2.0 revolution has turned that entire equation upside down, giving startups the ability to get going with almost no upfront cost by building entirely on services like S3. So many web apps are now built on Amazon S3 that a very irregular outage in early February 2008 nearly brought the Web to a crashing halt. Other than that single blip, S3 (and all of the AWSs) have been rock solid and completely reliable as they continue their inexorable march toward complete web backend dominance.

S3 is a godsend for developers on a tight budget because it brings the cost of storing and transferring data down to the point where they basically disappear. I store my personal library of photographs—about 30 GB—on S3, and I pay about $5/month for the storage and bandwidth to access them. For a server located in the U.S. (European servers are slightly more expensive), storage is currently $0.15/GB/month, $0.10/GB transferred into S3, and between $0.10 and $0.17 for data out, depending how much you pull. To get a better idea of pricing, you can play with the AWS Simple Monthly Calculator at http://calculator.s3.amazonaws.com/calc5.html.

Setting up your AWS account


The first step is to sign up for an AWS account at http://www.amazonaws.com. You will need to activate the S3 service on your account by visiting the S3 page (http://s3.amazonaws.com) and clicking on the big “Sign Up For This Web Service” button on the right side, shown in Figure 5-2.

Figure 5-2. The eponymously named “Sign Up For This Web Service” button

S3 provides developers with API and secret keys (which will feel familiar to a Facebook expert like yourself), which you can collect by logging into your account and then selecting “AWS Access Identifiers” from the yellow “Your Web Services Account” drop-down menu in the upper-righthand corner of most pages (Amazon’s URLs are unfortunately completely useless for sharing between users, so you’ll just have to follow along; see Figure 5-3).

Figure 5-3. AWS menu

You can view your Secret Access Key by clicking on the Show link, as in Figure 5-4.

Figure 5-4. Amazon Web Services access identifiers

Getting foxy with S3Fox


Once you have those puppies, it’s time to find an S3 client that you’re comfortable with. You have quite a few options to choose from, including S3Fox if you’re a Firefox user (https://addons.mozilla.org/en-US/firefox/addon/3247), or Panic’s Transmit if you are on a Mac (the best FTP/SFTP client in the world; http://www.panic.com/transmit/). If you’d like to use S3 for personal storage (as I do with photos), I highly recommend JungleDisk on both Macs and PCs (http://www.jungledisk.com/),

Return Main Page Previous Page Next Page

®Online Book Reader