Forum: Ruby on Rails BackgrounDRB alternative for Windows?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B42cb9841e07a0b46e1261bd70095978?d=identicon&s=25 Jason Crovert (Guest)
on 2007-06-05 16:24
Is there an alternative to BackgrounDRB since it isn't supported on
Windows?
5635e2fe13ed1c423962f5683fede3c0?d=identicon&s=25 Andrew Kuklewicz (Guest)
on 2007-06-05 17:32
(Received via mailing list)
Depending on what you want to do, you could use activemessaging (
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 Kuklewicz
http://beginsinwonder.com


On 6/5/07, Jason Crovert <rails-mailing-list@andreas-s.net> wrote:
>
--
Andrew Kuklewicz
5190330ad8f1b06d35e2c2da73dc623c?d=identicon&s=25 Eric Anderson (Guest)
on 2007-06-05 18:56
(Received via mailing list)
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
8608f2d7f02c6d0f1c349b7b94b1cea5?d=identicon&s=25 liquidautumn (Guest)
on 2007-06-05 19:18
(Received via mailing list)
> 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).
5190330ad8f1b06d35e2c2da73dc623c?d=identicon&s=25 Eric Anderson (Guest)
on 2007-06-05 21:18
(Received via mailing list)
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
8608f2d7f02c6d0f1c349b7b94b1cea5?d=identicon&s=25 liquidautumn (Guest)
on 2007-06-06 01:59
(Received via mailing list)
On Jun 5, 9:56 pm, Eric Anderson <e...@afaik.us> 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?
8608f2d7f02c6d0f1c349b7b94b1cea5?d=identicon&s=25 liquidautumn (Guest)
on 2007-06-06 02:08
(Received via mailing list)
> 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.
Cb963e8b0fec7c905ca602cca9eb755d?d=identicon&s=25 Nils Franzen (Guest)
on 2007-06-07 08:04
(Received via mailing list)
I use WinXP + cygwin's ruby and have no problems to use the latest
backgroundrb.


On Jun 5, 4:24 pm, Jason Crovert <rails-mailing-l...@andreas-s.net>
04952a6ee948f345e9c3727850d09a1b?d=identicon&s=25 dima (Guest)
on 2007-06-07 09:08
(Received via mailing list)
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.
This topic is locked and can not be replied to.