rubyonrailsin

A Ruby and Rails talk

Friday, March 19, 2010


[Rails] Preparing an Asynchronous Response with ActionController

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hello,

I was wondering if there's an easy way to make ActionController render a
response in an asynchronous background process.

I have a large object graph which takes over a minute to serialize in
amf:

render :amf => myData

I'd like to render() the amf serialization in a workling process and
store the results in memcache key'd by original msg-id so the client can
get the serialized result in a subsequent request.

Is there a simple way to perform the render() operation outside the
context of the controller? Something like:

MyController.new.render({:amf=>myData})

(of course, render() is a protected method, so I can't do that. And I'm
also not sure where to obtain the serialized result since render() is
void).


Thanks,

Tom
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive