What we need is Ruby AMF

Filed under: Flash — Wrote by Campbell on Wednesday, June 7th, 2006 @ 11:12 pm

Ok so I have been making a new site that is based on Ruby on rails and has some major flash components. You would be thinking cool xml structures passed between the two would be easy. And you would be right. it is. But the site is targeted at a New Zealand market, which with current Broadband providers we should be getting dinner before we get bent over like this. So needless to say alot of the users will be dial-up. Ruby on rails handels a many of something site. In this case a many of images. So the datasets can be huge. Enter AMF. So quick, complete, and already an object collection before you get it. And its small. So with all these considerations AMF was definately the answer.

So now I have to contend with another piece to the pie. AMFPHP is the greatest! but I really wish is that there was a ruby alternative. Now Im no expert at ruby but I would like to see some of the specs for AMF.

So a public call for help…If anyone has any information on AMF, specs etc could you please comment. I have a few sources but any help would be greatly apreciated. Im not promising anything here but am very interested to see whats involved.

P.S. Anyone want to help? 

9 Comments   -
  • Comment by chuck | June 8, 2006 @ 12:23 am

    Not too long ago I heard about a project on SourceForge called AMF4R. Apparently it has moved to RubyForge: http://rubyforge.org/projects/amf4r/

  • Comment by Campbell | June 8, 2006 @ 1:31 am

    For those interested found Yannick has made a pure ruby AMF server here:
    http://osflash.org/rtmp_os#yannick_s_ruby_build

  • Comment by Daniel Wanja | June 8, 2006 @ 2:20 am

    Over a year ago I played integrating a flash/flex front-end with a ruby on rails application using AMF. We decided not to move forward using this approach and create a ‘plain’ old Rails app instead. However we published some of the work on http://flexonrails.com, we basically created a wrapper on top of AMF4R http://rubyforge.org/projects/amf4r/. Note that our code certainly would not work with the current version of Rails and didn’t work at that time on OSX due to some big endian issues in AMF4R. Altought AMF is a very efficient was of exchanging data between client and server, I would for now use a RESTfull approach (xml), on another project I use JSON which is very basic but work pretty well.

  • Comment by Kevin Hoyt | June 8, 2006 @ 7:07 am

    Interesting solution to a specific problem. An approach that I’ve seen in the Flex world is to “pre-fetch” common data. The idea is that once the application has rendered and has enough data to get started, you can make additional calls for related data in the background. This requires a certain knowledge of what the common “moves” are by end-users. It also disregards client memory usage, but can be pretty darn elegant when bandwidth is at a minimum.

  • Comment by Campbell | June 8, 2006 @ 9:13 am

    Hey Kevin, Cheers for the comment, The main problem is the application loads the data for a page of images and then the thumbs of those images. Thats a big hit up front when the swf loads. So while I really like the idea of loading the data gracefully like that it doesnt fit the bill for this instance. I have read through Tinks blog and found that the documentation process for adobe is pretty much when the developer has time so I suspect the AMF spec isnt to well fleshed out, and not open to public. But I do love xml as a data source….its just so easy now.Jono who made the SWFZ engine has a zip unloader which will be nice and I think I will endevour to get gzip compression turned on on the server.

  • Comment by Max Lapshin | June 30, 2006 @ 7:24 pm

    Hi, I’ve implemented encoder/decoder of amf packets. It seems, that the same work is done by amf4r. I’ll try to merge with them, however, I can read and write amf now.

  • Comment by Mark Piller | August 3, 2006 @ 4:59 am

    We’re working on an open-source implementation of our Flash Remoting gateway (WebORB) for Ruby on Rails. As of now (08/02/06), we have a working version of the product that handles invocations of Ruby objects and can pass primitives, strings, arrays and complex types as method arguments or return types. We’re hoping to have a GA release in Q3 of this year. The ultimate goal is to provide an implementation of Flex Data Services-like functionality for Rails. Some of the core FDS features would probably be available for a fee, but the remoting support for AMF0 and AMF3 will be free and open source.

  • Comment by Aaron Smith | May 19, 2007 @ 2:29 am

    This is a way late comment post but check out rubyamf.org

Leave your comment

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -