It doesn’t matter if it goes through chat or not really, if the database is overloaded, the whole site will be slow, and statistics would take a long time to submit, and people would complain about lag. By running that stuff through chat we can show you when you’ve won a card, or when you got a high score, etc. There are also several less obvious advantages to having a real-time communication method to the server which doesn’t require HTTP polling which I won’t get into. Since our chat server has quite a bit of memory, it can also do some throttling and queuing of packets when the servers are overloaded to try and help them catch up (so that the problem does not get perpetually worse), but this can obviously cause some lag in the chat application. The main problem is that our hardware is underpowered coupled with the fact that we are growing exponentially, and the chat lag is the most noticeable side effect of this.
I have often wondered if it wouldn’t be better to echo your messages locally without waiting for the response from the chat server. This would greatly reduce the laggy feel of chat when things are backed up, although it would be a bit ‘dishonest’
In the mean time I can only apologize for the current state of the site’s hardware, and assure you all that we are working very diligently to get things up to speed. The new hardware is many, many times more powerful than our current setup, and we are also constantly working to improve the efficiency of our back-end, which is why we have been able to survive such growth without any hardware upgrades at all.
Anyway, enough of that uninteresting rant, off to sleep ;)