On Wed, May 29, 2002 at 09:55:28AM -0400, Nathan Sharp wrote: > The biggest argument I've heard so far is that ping/pongs would take too > much bandwidth. If your end users would prefer very slightly less > bandwidth used yet LOST MESSAGES AND FAULTY PRESENCE info, well, you got > different users than mine.
With the ping/acks there's a simple way to cut down on a large amount of the bandwidth required. From your first post I think that you are already doing this, but I'll just write it down to make sure. The server only needs to send the ping to the client if it hasn't heard from the client within the chosen time-period. Therefore, each time the server receives a packet from a given client it can reset its timer for that client. For active clients this could mean never receiving a ping because the server is happy that it's alive. For clients that are inactive and responding to pings the bandwidth consumed is almost certainly less than that which would be used if the client has active. So in the calculations of bandwidth usage I think you need to include the estimations for how much bandwidth COULD be used based on the number of connected clients. Finally, in the implementation the overhead for tracking timeouts for each client isn't that great. At first guess one might have a timer for each client, that's not the way to go. Use one timer and a scheduler to queue up future pings, rescheduling when the server handles a packet for a client. I'm not sure if pings get my vote yet, but I think this helps show that the bandwidth argument needn't be too much of a concern. -- Dave Turner http://figroll.com/ _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
