4 ms·
PHP is weak for long running back-end services.
by gummydude 14y ago
PHP is weak for long running back-end services.
- encoderer 14y agoTrue, but if you have to: https://github.com/shaneharter/PHP-Daemon https://github.com/shaneharter/PHP-Daemon
- chrismsnz 14y agoInteresting - hadn't seen that before. My own attempts at brewing something together with PHP's posix and pcntl libs were feeble. Thanks for the link.
- gummydude 14y agoFrom your link. "Note: For many reasons PHP is not an optimal language choice for creating servers or daemons. I created this library so if you must use PHP for these things, you can do it with ease and produce great results. But if you have the choice, Java, Python, Ruby, etc, are all better suited for this." Possible but not recommended.
- encoderer 14y agoYeah, it's my project. It's OSS so I figured a shameless plug wouldn't hurt anybody.
- sheraz 14y agoi'm running beanstalkd workers in PHP using supervisord. Seems to work for me, at least for now...
- chrismsnz 14y agoYeah, same. You really do need supervisord to manage the process, though. My background processes lean on supervisor's functionality quite a lot. Most of them don't run any longer than 5 mins or so.
- sheraz 14y agoMy setup is like iron.io, and supervisord manages all of the PHP daemons. * video encoding and thumb-nailing * image conversion * content upload to ftp, s3, rs cloud, etc * address geocoding * email notifications * web scraping All in all, very pleased. The next part is to build a unified control panel to watch my processes and workers. For now I use the one built into supervisord.