开发者

PHP XMPP bot performance

开发者 https://www.devze.com 2023-01-30 17:34 出处:网络
Hey guys. I need to write xmpp bot which will be receiving and sending about 2000 messages per hour (24/7 work time) and working with MongoDB (select, update queries开发者_开发问答). Is it bad idea to

Hey guys. I need to write xmpp bot which will be receiving and sending about 2000 messages per hour (24/7 work time) and working with MongoDB (select, update queries开发者_开发问答). Is it bad idea to write it on php? What about performance if i'll use php 5.3?


I don't think 2000 messages per hour will be a problem at all even if your xmpp bot runs 24x7. I have experience with xmpp bots running for weeks without any memory leaks and millions of db writes during it's run time. Ofcourse your db write strategy (on the fly or aggregated write) will make an impact over amount of memory used by your php based xmpp bot.


In almost every situation where a DB is involved, DB overhead is going to dominate script execution time. With 1 request every 1.8 seconds, using PHP will be just fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消