Every single packet sent is counted when computing bandwidth, regardless of the contents.JAB Creations wrote:First and foremost headers aren't counted towards your bandwidth.
php ajax chat room will increase server load?
Moderator: General Moderators
Re: php ajax chat room will increase server load?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: php ajax chat room will increase server load?
Time to look at your Apache access logs!
Create a one byte file, download it, and then look at your log.
Create a one byte file, download it, and then look at your log.
Re: php ajax chat room will increase server load?
in log you have document (content) size, not including headers etc.
Re: php ajax chat room will increase server load?
Jab, by using the term "bandwidth", we all mean bandwidth at OSI Layer 3 - that is Network Layer: IP, ICMP, IPsec, IGMP, etc. protocols. It's not even TCP.
HTTP is far away from this - it's in the last Layer 7, the Application Layer.
http://en.wikipedia.org/wiki/OSI_model
HTTP is far away from this - it's in the last Layer 7, the Application Layer.
http://en.wikipedia.org/wiki/OSI_model
There are 10 types of people in this world, those who understand binary and those who don't
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: php ajax chat room will increase server load?
Well gee, there is another chunk of the world I was blissfully unaware of.
Thanks for pointing that out.
Re: php ajax chat room will increase server load?
Right all I have done using techniques here: http://www.zeitoun.net/articles/comet_and_php/start
So it says it is comet, a kind of server push. But, Server do not push every 2sec
Just wondering why that example code using HTTP streaming does so? Please point me out. Are they called 'PUSH'?
Thanks for reply
So it says it is comet, a kind of server push. But, Server do not push every 2sec
Just wondering why that example code using HTTP streaming does so? Please point me out. Are they called 'PUSH'?
Thanks for reply
Re: php ajax chat room will increase server load?
It uses long polling technique, it's not real "server push".
There are 10 types of people in this world, those who understand binary and those who don't
Re: php ajax chat room will increase server load?
That's quite clever actually...
Although in a case like that, I would have actually thought pull would be better than push, as this script has to be executing the whole time, and a connection has to be maintained constantly for all users.
But if people say it's better...who knows.
Although in a case like that, I would have actually thought pull would be better than push, as this script has to be executing the whole time, and a connection has to be maintained constantly for all users.
But if people say it's better...who knows.
Re: php ajax chat room will increase server load?
jackpf,jackpf wrote:That's quite clever actually...
Although in a case like that, I would have actually thought pull would be better than push, as this script has to be executing the whole time, and a connection has to be maintained constantly for all users.
But if people say it's better...who knows.
I think the reason is pull uses more resource to build the request from client side and pull saves one step to be that much. I don't think it's possible to make do "real time", like instant messenger, or it might need a distributed server sets, like Messenger.
Usually it looks like 2-5 secs delay is acceptable but that's really depended on < 1000 users... But if this application is on the public face website, it's anther world.... God knows how many will chat at the same time
Re: php ajax chat room will increase server load?
I appended the chat messages by appending a child div with javascript (for the new message) to the chat display area.
So I just let them go as long as the user was in the chat room.
It never became a problem.
So I just let them go as long as the user was in the chat room.
It never became a problem.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: php ajax chat room will increase server load?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: php ajax chat room will increase server load?
What's the fun in that?
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: php ajax chat room will increase server load?
PHPFreeChat is ok but it didn't integrate in to my site when I first tried it which is the most important aspect of third party modules...they integrate seamlessly or they prove to require too much time and energy.
I wrote a chat room from scratch this past January and then ended up rewriting it even better. There is always the possibility that when you reinvent something you could end up with something better and the invaluable experience associated with it.
I wrote a chat room from scratch this past January and then ended up rewriting it even better. There is always the possibility that when you reinvent something you could end up with something better and the invaluable experience associated with it.
Re: php ajax chat room will increase server load?
Yeah, high five for writing your own programs and not blindly copying scripts off the internet....
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: php ajax chat room will increase server load?
Though there is a point to not reinventing the wheel in some regards. Let's say someone write a chat and releases it and it's better then the previous status quo. If it's easier to implement then the wheel was reinvented and more compatible with more sites...or at least increases the overall potential that any chat room is compatible or easy to implement subjective to any given site. So far nothing feels (to me at least) like it's met an acceptable standard plus I've wanted to have something that didn't clash yet was completely customizable with CSS. I guess the wheel analogy works in some ways however it's too broad when the needs of the many can't be fulfilled by too few options.