PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Feb 23, 2020 12:09 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Feb 13, 2012 12:53 am 
Offline
Forum Newbie

Joined: Sun Feb 12, 2012 11:33 pm
Posts: 24
Hi there,

I'm creating a live chat script, something like Zopim, and for now the way i retrieve messages is using jQuery Ajax request loops every 'n' second, it works very good, but yeah, when we look at the apache access log we get tons of messages from the script, is this a bad thing ?

I know how to do long polling request, but i don't like this method, although it is effective, it is defective lol, sometimes it crashes apache, and it creates a process for every user that is using the chat, so i'm not going to use this method.

Another one is using services like Pusher.com for use HTML5 WebSockets, i'm testing this and i really like it, but if the Pusher website goes down the script itself doesn't work...


What do you guys recommend me to do, since this script is to be selled.


Top
 Profile  
 
PostPosted: Fri Feb 17, 2012 6:48 am 
Offline
Forum Contributor
User avatar

Joined: Wed Sep 09, 2009 5:55 am
Posts: 323
Location: Australia
Well I would hazard a guess that the majority of SIMPLE chat services are going to be based via PHP, AJAX and MySQL.

Alternatives would be an actual chat 'server' which either deals through sockets or software that is designed as a chat protocol such as XMPP.

It really depends how much this intends on being used, because if it supposed to be used quite a considerable amount, then you may actually be better off using something that is dedicated rather than a script that gets called every second for every chat window that is running.
Admittedly, MySQL can handle that load, however depending on the resources your web server itself has, you could find it running under more load than it probably should be.

It really comes down to whether your underestimating or overestimating the usage of the system.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group