bundling REST POSTs?

I will be sending about 3000 REST POSTs every 15 seconds. What is the best way to bundle them? Would I have to create a custom action and/or controller unbundle them? Is there an easier way through a plugin or library?

thanks chirag

I will be sending about 3000 REST POSTs every 15 seconds. What is the best way to bundle them? Would I have to create a custom action and/or controller unbundle them? Is there an easier way through a plugin or library?

I just committed a patch that handles xml arrays. Try this in your console to see what the xml should look like:

posts = Post.find(:all) xml = posts.to_xml(:root => 'posts') puts xml

It works both ways:

Hash.from_xml(xml)

If you're POSTing to an xml-formatted rails action, the parsing to the params hash should be all handled for you of course.

I just committed a patch that handles xml arrays. Try this in your console to see what the xml should look like:

Rick, thanks! What do you mean "by committed a patch"? A patch to what?

If you're POSTing to an xml-formatted rails action, the parsing to the params hash should be all handled for you of course.

What do you mean by "handled for you"? I created the controllers and actions using the scaffold_resource generator. Are you saying that the existing POST action will recognize that the POSTs are bundled in an array and process each individual one all automatically?

> > I just committed a patch that handles xml arrays. Try this in your > console to see what the xml should look like: >

Rick, thanks! What do you mean "by committed a patch"? A patch to what?

to Rails.

> If you're POSTing to an xml-formatted rails action, the parsing to the > params hash should be all handled for you of course.

What do you mean by "handled for you"? I created the controllers and actions using the scaffold_resource generator. Are you saying that the existing POST action will recognize that the POSTs are bundled in an array and process each individual one all automatically?

It'll parse the xml into params for you.