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?
Asked
Active
Viewed 857 times
2
-
5Flesh out your original question - what are you trying to achieve? Why use PHP? Is it because you know php already? Are you going to write the entire XMPP implementation yourself or are you going to one 'off-the-shelf'? Why not use an xmpp implementation in Java, C# or C++? – graham.reeds Dec 16 '10 at 13:13
-
You are right. I prefer PHP because i know only PHP. I am going to use one of existing XMPP libs. – VitalyP Dec 16 '10 at 13:22
-
If you know javascript then I would go for node.js. – Alfred Dec 16 '10 at 20:20
2 Answers
1
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.

Abhinav Singh
- 2,643
- 1
- 19
- 29
0
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.

demonkoryu
- 1,247
- 10
- 27