[dev] Command queue for Groo

Chuck Hagenbuch chuck at horde.org
Wed May 31 16:24:55 PDT 2006


Quoting Luciano Ramalho <ramalho at gmail.com>:

> Once a user types or scans the ISBNs of a bunch of books, if some of
> the numbers are not in our catalog, those ISBNs will be queued in a
> table and an asynchronous process will fetch the book metadata from an
> online source such as Amazon.com.
>
> If a book has no ISBN (happens with the older ones), another queue
> will be used to fetch book metadata given information such as title
> and author, if we can't find it locally.
>
> You probably already have several similar queues in Horde. Can you
> point me to some of the simplest implementations of queues to control
> asynchronous processes in your projects? Also, is there a canonical
> way of periodically firing up those asynchronous processes in Horde?

What we do in pretty much every other app that needs something like  
this is to provide a script which can be scheduled via cron or some  
other facility (Windows scheduled tasks, at, etc). None of them are  
asynchronous queues in the "messaging" sense of that term, but until  
we get to extremely high traffic levels, it's not going to be  
necessary to have something more I don't think.

One of the apps that does things like this most is Rakim. The app  
itself isn't in the best shape, but I'd have a look at the scripts/  
directory (Rakim is in the incubator right now). The three php scripts  
there do periodic checks for abandoned chats, user logouts, things  
like that.

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the dev mailing list