BackgrounDRB alternative for Windows?

Is there an alternative to BackgrounDRB since it isn’t supported on
Windows?

Depending on what you want to do, you could use activemessaging (
Google Code Archive - Long-term storage for Google Code Project Hosting.) to send messages to non-rails
processes to work on asynchronously, and still get access in those
asynch
processes to all your rails environment godness…

For example, I use it to asynchronously process audio submitted through
our
website - since the processing can take ~30 minutes.

-Andrew K.
http://beginsinwonder.com

On 6/5/07, Jason C. [email protected] wrote:


Andrew K.

What about just creating a script (using runner to load the rails
environment) then kick off that script with Windows Schedules Task.
Since BackgrounDRB is just a fancy cron use the Window’s version of cron.
backgroundrb is not just a scheduler, it’s a way to delegate heavy/
long running task to backgroundrb server, either local or remote (good
for scaling out, btw). for example - video processing. transcoding
video inside web server process cause browser to hung waiting for
response from server. Forking child process to work on video and
continuing execution (ie show “please, wait” page, checking for
delegated task completion) makes user experience much more pleasant.
archieving same effect with cron/runner hardly imaginable and pretty
well comparable to pulling out sick tooth through the ass (pardon my
french).

Jason C. wrote:

Is there an alternative to BackgrounDRB since it isn’t supported on
Windows?

What about just creating a script (using runner to load the rails
environment) then kick off that script with Windows Schedules Task.
Since BackgrounDRB is just a fancy cron use the Window’s version of
cron.

Eric

On Jun 5, 9:56 pm, Eric A. [email protected] wrote:

liquidautumn wrote:

backgroundrb is not just a scheduler, it’s a way to delegate heavy/

That is why I called it a fancy scheduler.
What are you calling “fancy scheduler” is just a part of backgroundrb
and it is not that part that we talking about.

response from server. Forking child process to work on video and
continuing execution (ie show “please, wait” page, checking for
delegated task completion) makes user experience much more pleasant.

Add the requested task to a queue (directory, table, etc). Have a cron
task run on-demand/periodically reading from the queue and processing
the request. When the cron job has finished a task have it notify the
web server (update a table, move the file out of the directory, etc)
How would you raise an exception? How would you spec/test such
implementation, keeping in mind that “table updated” or “file moved”
is certainly not equal to “scheduled task successfully completed”.
Trying to answer these questions wouldn’t you end up reinventing some
limited and, likely, unstable bicycle, already invented and called
bdrb?

Same user experience. BackgrounDRB not needed. BackgroundDRB might make
it a /tad/ bit easier (maybe) but cron is no big deal also. And since
the scheduled task is available on Windows my suggestion provides a
solution on Windows while BackgroundDRB evidently does not.
And by the way, despite windows is pretty bad environment to work with
ruby/rails because of poor interpreter performance and lots of more or
less minor complications, it IS possible to run bdrb on windows. Just
not so easy as on linux/bsd and friends. Extra complication, once
forced me to start searching for better working environment.

liquidautumn wrote:

backgroundrb is not just a scheduler, it’s a way to delegate heavy/

That is why I called it a fancy scheduler.

response from server. Forking child process to work on video and
continuing execution (ie show “please, wait” page, checking for
delegated task completion) makes user experience much more pleasant.

Add the requested task to a queue (directory, table, etc). Have a cron
task run on-demand/periodically reading from the queue and processing
the request. When the cron job has finished a task have it notify the
web server (update a table, move the file out of the directory, etc) so
that the next request sees that it is done.

Same user experience. BackgrounDRB not needed. BackgroundDRB might make
it a /tad/ bit easier (maybe) but cron is no big deal also. And since
the scheduled task is available on Windows my suggestion provides a
solution on Windows while BackgroundDRB evidently does not.

Eric

I use WinXP + cygwin’s ruby and have no problems to use the latest
backgroundrb.

On Jun 5, 4:24 pm, Jason C. [email protected]

I have used BackgrounDrb on my XP for some heavy tasks and I do not
encounter any problem with it.
The only problem that I have with it is when I ported my solution to
use SQLite with concurrent approaches to the embedded data base,
namely resource locking.
But, that’s the SQLite problem not the BackgrounDrb’s.