php与异步任务

原创
2017/05/23 21:34
阅读数 97
  • GearMan - this answer was written in 2009, and since then GearMan looks a popular option, see comments below.
  • ActiveMQ if you want a full blown open source message queue.
  • ZeroMQ - this is a pretty cool socket library which makes it easy to write distributed code without having to worry too much about the socket programming itself. You could use it for message queuing on a single host - you would simply have your webapp push something to a queue that a continuously running console app would consume at the next suitable opportunity
  • beanstalkd - only found this one while writing this answer, but looks interesting。beanstalkd默认的队列比较少,需要调用-z参数,或者在启动脚本里添加配置BEANSTALKD_MAX_JOB_SIZE=524280 
  • pthreads php多线程扩展,mac下与Php7支持有点问题
  • 国产的swoole

fopen/fsocket/curl/popen/fork方式基本不靠谱

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
1 收藏
0
分享
返回顶部
顶部