# BackgrounDRB alternative for Windows?

**URL:** <https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008>\
**Category:** Rails\
**Created:** [June 5, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008 "2007-06-05T16:24:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 5, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/1 "2007-06-05T16:24:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 5, 2007, 5:32pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/2 "2007-06-05T17:32:52Z")

</div>

Depending on what you want to do, you could use activemessaging (  
[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/activemessaging/)) 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](http://beginsinwonder.com)

On 6/5/07, Jason C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

–  
Andrew K.

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 5, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/3 "2007-06-05T19:18:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 5, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/4 "2007-06-05T18:56:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 6, 2007, 1:59am UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/5 "2007-06-06T01:59:33Z")

</div>

On Jun 5, 9:56 pm, Eric A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 6, 2007, 2:08am UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/6 "2007-06-06T02:08:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 5, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/7 "2007-06-05T21:18:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 7, 2007, 8:04am UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/8 "2007-06-07T08:04:22Z")

</div>

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

On Jun 5, 4:24 pm, Jason C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![inari](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/838e76/32.png) [@inari](https://www.ruby-forum.com/u/inari)\
**Post date:** [June 7, 2007, 9:08am UTC](https://www.ruby-forum.com/t/backgroundrb-alternative-for-windows/106008/9 "2007-06-07T09:08:28Z")

</div>

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.
