I am just getting into web servers/web applications and rails as well
so bear with me. I am trying to write a web app that, based on a
users input from the browser, will perform some task, and update the
browser (ala ajax style) as needed and/or provide a way for the user to
control the background task.
Now, I have more experience with java servlets, which makes this easy
enough for a beginner. The user inputs some info and the server spawns
a new thread to perform the task in the background while the user can
continue using the app, until it is updated with the results. (in my
case the background task is putting or getting messages on/from an MQ
Series queue) I keep a reference to the background task in the
session object for access as needed.
What I am wondering is if the same concepts can be applied to a rails
application. I started researching rails off and on recently and it
looks like this is mostly possible, but the vague area I am wondering
about is spawning a background thread and then maintaining a reference
to it so the user can get the data back and/or manipulate it in various
ways(start/stop/put to a different queue etc)
I saw RailsCron mentioned in another thread, but am not sure that is
exactly what I am looking for (maybe I’m wrong). Anyone with some
experience with this sort of scenario that can provide some guidance
would be greatly appreciated. I’ve asked the question a few times in
various forums with little to no response.
Thanks in advance,