asynchronous/batch work (eg. sending emails)

View: New views
3 Messages — Rating Filter:   Alert me  

asynchronous/batch work (eg. sending emails)

by Ivan Sergio Borgonovo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I need to start long jobs that may have a huge load on server.

These jobs need to access drupal DB and functions and continue
asynchronously no matter what happens to the connection with client
that started them.

If I just needed the DB connection data I'd normally use
exec()
that would launch another script running asynchronously.

Now I need some more functions from drupal and some of my modules.

I was thinking to use drush but maybe I can have some better
suggestion here.

I'm aware of
http://drupal.org/project/job_queue

but the queue will be long and dense and cron granularity is not
enough, sending out a bunch of jobs in the same cron tick may still
be too much.

Yeah it can be done... but maybe there is something better to handle
heavy queues.

Any alternative to job_queue? any completely different approach?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

--
[ Drupal support list | http://lists.drupal.org/ ]

Re: asynchronous/batch work (eg. sending emails)

by Alex Barth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Job Queue is a good option.

If your job is sending e-mails, you may want to have a look at  
messaging and notifications modules.

Another approach may be using DrupalQueue API - I've recently started  
backporting it
http://github.com/lxbarth/drupal_queue - haven't gotten around to  
finalize and test it though.

Alex

On Oct 25, 2009, at 4:36 AM, Ivan Sergio Borgonovo wrote:

> I need to start long jobs that may have a huge load on server.
>
> These jobs need to access drupal DB and functions and continue
> asynchronously no matter what happens to the connection with client
> that started them.
>
> If I just needed the DB connection data I'd normally use
> exec()
> that would launch another script running asynchronously.
>
> Now I need some more functions from drupal and some of my modules.
>
> I was thinking to use drush but maybe I can have some better
> suggestion here.
>
> I'm aware of
> http://drupal.org/project/job_queue
>
> but the queue will be long and dense and cron granularity is not
> enough, sending out a bunch of jobs in the same cron tick may still
> be too much.
>
> Yeah it can be done... but maybe there is something better to handle
> heavy queues.
>
> Any alternative to job_queue? any completely different approach?
>
> thanks
>
> --
> Ivan Sergio Borgonovo
> http://www.webthatworks.it
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]

Alex Barth
http://www.developmentseed.org/blog
tel (202) 250-3633




--
[ Drupal support list | http://lists.drupal.org/ ]

Re: asynchronous/batch work (eg. sending emails)

by Ivan Sergio Borgonovo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 25 Oct 2009 09:47:07 -0400
Alex Barth <alex@...> wrote:


> Job Queue is a good option.

It seems that currently it is the best compromise.
I've seen there have been improvement on the direction of scripting
drupal and making easier to load just the stuff you need, but
currently:
a) the learning curve is to steep
b) the available tools aren't mature enough to really script it
outside of drupal cron

thanks for enlarging my horizon.

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

--
[ Drupal support list | http://lists.drupal.org/ ]