What is the proper refresh rate to balance quality and not crashing the server?
+1
A:
This depends on a large range of factors, e.g. response time, server size, expected capacity, bandwidth. I'd say once every 500ms on completion of a request would feel comfortable.
Make sure to start the timer after the last request completed, otherwise they'll queue up and overlap due to latency.
I'd suggest when doing this, pass a datetime back and forth, push the time of the last message to the client when sending, and when requesting send that time back to the server, so you're only returning messages after that time, the minimum amount of chat data.
Nick Craver
2010-03-21 11:39:07