[Rails] Re: Storing Rails controller callback data in session
Hi, and yes,
I agree this is not a valid solution for production environments at all.
On Tuesday, May 28, 2013 3:21:42 PM UTC+2, Ruby-Forum.com User wrote:
-- However, when without many resources, e.g. experimenting, there is no "free" option to support such architecture.
E.g. on Heroku you need some funds to have 1 web server and 1 background worker.
Also, I really don't like the idea of setting up such environments in development.
Hence, I wanted to see if there way a "cheap and dirty" way of doing this.
And, to my surprise, session is not being updated as expected.
I also get the feeling there is some important bit of knowledge to be gained with deep understanding of this behavior or Rails.
So, I'd still like to know why Rails behaves this way...
Thanks for the input!
On Tuesday, May 28, 2013 3:21:42 PM UTC+2, Ruby-Forum.com User wrote:
"Vanja Radovanović" <elV...@gmail.com> wrote in post #1110347:
>
http://stackoverflow.com/questions/16770090/storing- rails-controller-callback- data-in-session
>
> The idea is:
>
> - Perform some time consuming action in background.
> - Have the results from that action be propagated back to the
> controller
> using a callback.
> - Store the result in an in memory session store.
> - Have the result in session be used and available from that point
> onward.
This sounds like a bad idea right out of the gate. My suggestion is to
put the whole thing out of your mind.
If you have a "time consuming action" then use one of the established
backgrounding solutions that are available:
https://github.com/resque/resque
https://github.com/collectiveidea/delayed_job
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0cc1a791-ed35-4219-a6bd-31e8d31c2929%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home