Hello, would you recommend using beanstalkd [ http://kr.github.com/beanstalkd/ ] for
asynchronous processing in PHP ?
I need some feedback/comments pros-cons, from anyone that has used this lib.
Thanks,
Hello, would you recommend using beanstalkd [ http://kr.github.com/beanstalkd/ ] for
asynchronous processing in PHP ?
I need some feedback/comments pros-cons, from anyone that has used this lib.
Thanks,
I've used Beanstalk in production, and also while testing threw millions of simple messages through it - generally en-mass, but the production system had over a 100,000 tasks put through it till I left the company. It may still be running, in which case it would be tens of millions be now - or more, if they had extended it's use further, as I had planned.
I would recommend it, as it's got a number of excellent points.
My first task I put through it was image processing - and doing that work outside of an Apache/mod_php process allowed me to resize larger images without affecting the server (blowing out the Webserver). With a lightly loaded queue, it had created the thumbnails before the page had refreshed after the upload.
There are many other potential tasks that could also be processed asynchronously.
The only problems I have ever had was making sure that the workers completed without incident - or that any errors were caught so that the job could be 'bury'ed, thus ensuring that the job was not put back into the queue to be run again (and have the worker crash again).
Having the workers also restart to clear memory can also be useful as PHP is less well suited to long-running processes.
i would like to know the source of documentation to implement it.
Thanks