h1

Amazon’s S3 meets Ajax

April 7th, 2006

Julien Couvreur is building an RSS reader that uses Flash to call Bloglines without running up against cross-site scripting restrictions.

The last restriction not to forget is that Flash will only allow requests to domains that explicitly allow it, by publishing a policy file (crossdomain.xml), for security reasons. A number of sites already have one, such as Yahoo/Flickr, Amazon or Bloglines.

Using Amazon’s S3 storage from a browser app represents a huge development in Ajax apps. Les Orchard is working on it and I think that Flash/crossdomain.xml may be the key to making it work in current browsers.

Exciting stuff.

2 comments to “Amazon’s S3 meets Ajax”

  1. I agree.
    I haven’t gotten to try S3 through my Flash4AJAX object yet, but I’ve been thinking about it and will probably try it soon.
    There are a couple of issues:

    First, Flash4AJAX is still missing the support for user-added request headers (which is needed for S3 authentication). I’ll probably add it soon.

    Second, I don’t think it would work great with large amounts of data (over the megabyte range). Same domain calls using XMLHttpRequest probably have the same problem though 😉

    Third, for the crossdomain.xml problem, it seems possible for each bucket owner to post his own crossdomain.xml to allow Flash access to it.
    In addition, the feature request of a global crossdomain.xml file was transmitted to the S3 team by Werner Vogels (http://www.allthingsdistributed.com/2006/03/s3.html).

    Last, Flash4AJAX only works with Flash 8 player (with 50% market penetration), and it looks like Flash 6/7 support is possible but quite tough. Actually, I’m rather looking forward to Flash 8.5 player being mor widespread as it comes with a new Flash-AJAX bridge and also a better API for cross-domain HTTP requests.

    Cheers,
    Julien


  2. It’s early days yet, so the API will evolve and toolkits will sprout up around it that will likely handle packetizing of larger payloads etc. By that time, Flash 8.5 should have made its way onto many more machines.

    Flash 8.5 has some nice things in it. I’ve been playing with the flex.net.socket object via AFLAX (http://www.aflax.org) and that looks really promising for much more complete TCP control.