[cgiapp] Tasks after fork()'ing a CGI::Application
Gurunandan R. Bhat
guru at informationmatters.in
Mon Aug 10 12:48:16 EDT 2009
On Mon, 2009-08-10 at 18:17 +0200, Rhesa Rozendaal wrote:
> Michael Peters wrote:
> > Gurunandan R. Bhat wrote:
> >
> >> Thanks. I did seriously consider TheSchwartz and gearman. I have two
> >> features that I want to implement: First, I want to pass some feedback
> >> to the user who queued the task indicating progress.
> >
> > I normally use a custom job queue for more flexibility and store the jobs in the
> > database (as serialized data structures). Then my web processes can query the DB
> > to see if the job in question has finished and thus give a progress report to
> > the user.
> >
> >> Second, I must be
> >> able to schedule it at a future time. I am currently using Schedule::At
> >> to do this. Again both are fragile and as you correctly pointed out,
> >> will suffer when scaled.
> >
> > My queue also allows this, but I'm not sure how TheSchwartz or Gearman handle that.
> >
>
>
> I'm happily using beanstalk for this (http://xph.us/software/beanstalkd/),
> through Beanstalk::Client. Very light-weight, and very easy to work with.
> Delaying jobs into the future is also possible (and I use that extensively).
>
> When I need to keep the user informed of the current status, I tend to track
> that in a database, or even in memcached if it isn't vitally important.
Thanks a ton!!
beanstalkd with its delay => 'secs' seems to be exactly what I wanted.
Will serialize progress in a database as you have suggested.
Appreciate your help.
Regards
More information about the cgiapp
mailing list