BackgrounDRB alternative for Windows?

Jason Crovert 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

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).

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

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.