FreiChat related discussions
Comet or Short Poll?

Hi,

In this thread:
http://codologic.com/page/node/3363

Someone asked about high server CPU load. You said:
using Comet is better than short polling and has less load on server.


But in my FreiChat admin screen, these words are used:

Comet Cons:
more complex and more server resources used

Short Polling Pros:
not server consuming (only if the time between requests is long).


I am not an experienced web server guy, so I'm confused. You say that comet has less load on the server, but the admin screen says it has more server resources used.

My website is running on Ubuntu server 12.04 with Apache 2.2.22 and PHP 5.3.10, and our CMS is Joomla 3.2.x with Community Builder 1.9. FreiChat is working great with my 5 or 6 beta testers (I don't know if I can, or how I can, look at my server resources). We are migrating from an older site, where we have about 100 people online at most times. I don't know whether they will all use the chat feature at the same time or not. We have not had this type of feature before.

In this situation, which is better -- comet or short polling?

Thanks.
jimmy

Hi, In this thread: http://codologic.com/page/node/3363 Someone asked about high server CPU load. You said: using Comet is better than short polling and has less load on server. But in my FreiChat admin screen, these words are used: Comet Cons: more complex and more server resources used Short Polling Pros: not server consuming (only if the time between requests is long). I am not an experienced web server guy, so I'm confused. You say that comet has less load on the server, but the admin screen says it has more server resources used. My website is running on Ubuntu server 12.04 with Apache 2.2.22 and PHP 5.3.10, and our CMS is Joomla 3.2.x with Community Builder 1.9. FreiChat is working great with my 5 or 6 beta testers (I don't know if I can, or how I can, look at my server resources). We are migrating from an older site, where we have about 100 people online at most times. I don't know whether they will all use the chat feature at the same time or not. We have not had this type of feature before. In this situation, which is better -- comet or short polling? Thanks. jimmy

According to what you have said , i would recommend Comet instead of short polling .

using Comet is better than short polling and has less load on server.

Yes, that is true . But it depends on the number of simultaneous sockets that your servers lets you to open . You can increase this configuration if you have access .
If there are 100 people online at the same time then , comet connection wont be a problem .

Comet -> continuous connection for 60 seconds
Short polling -> connection for 5 seconds

Short polling is bad only when the 5 seconds time interval is reduced to 1 or 2 seconds . Because requesting to the server is resource intensive especially when there
are many number of users online

According to what you have said , i would recommend Comet instead of short polling . <em>using Comet is better than short polling and has less load on server.</em> Yes, that is true . But it depends on the number of simultaneous sockets that your servers lets you to open . You can increase this configuration if you have access . If there are 100 people online at the same time then , comet connection wont be a problem . Comet -> continuous connection for 60 seconds Short polling -> connection for 5 seconds Short polling is bad only when the 5 seconds time interval is reduced to 1 or 2 seconds . Because requesting to the server is resource intensive especially when there are many number of users online
Necessity is the mother of all inventions!

can we use nodejs + socket io ? instead of polling?

can we use nodejs + socket io ? instead of polling?
edited Aug 28 '15 at 12:32 pm

That will require us to make a lot of changes since freichat is written in PHP.

And another problem is, not many hosts have nodejs installed in their servers.

That will require us to make a lot of changes since freichat is written in PHP. And another problem is, not many hosts have nodejs installed in their servers.

how about those who use vps/dedicated server for their hosting needs?

how about those who use vps/dedicated server for their hosting needs?

Yes, it is possible for such users.

But, we will still have to do a lot of modification for it to work with web sockets.

Yes, it is possible for such users. But, we will still have to do a lot of modification for it to work with web sockets.
269
5
1
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft