I need some good introductory pointers to AJAX in the context of a Ruby On Rails app.
Here's the scoop: My app spins off several tasks using Delayed::Job. While the tasks are busy sprunging data from external sites, I want to keep the user appraised of their progress. I don't want to refresh the entire page -- just a rectangle on the page where each task can display status messages.
I don't believe I need a full push technology -- it is sufficient to use javascript-initiated polling to update the screen as long as bg tasks are running.
That's an appropriate scenario for AJAX (right?), and I think Rails3 has specific constructs to support AJAX-y interactions with browsers (right?). Ryan Bates's Railscast on Polling For Changes is a good template for this specific case, but I'd like a better understanding of what's really going on under the hood. Okay, then where do I get started?
For what it's worth, I'm already using jQuery in my Rails3 app.
Just like numbersblah said you need a memory queue. Take a look at apache activemq. It might just do what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With