Forums

  • Hi!

    I checked out with Firebug about what happens in the background, and I noticed, that chatbox causes quite a stress on browser, server and (total) bandwidth.

    Here's few thoughts about how to make it less stressful:

    * Fewer polling. Seriously, once a second is quite heavy. I'd suggest once per 2-4 seconds, because after all, this is a website, not IM client. wink If you want to play tricks, make a system that slowly drops polling frequency to something like once per 5-10s if there's no new messages in a period of time. And if there appears a new message, shoot the polling back to top freq.

    * Use JSON. Currently response to the chatbox-query returns content in HTML, which certainly is much more heavier than same content in JSON format.

    * Don't return whole chatbox content when polling. That's just pointless, we already have the content. This causes enormous usage of bandwidth for no good reason (5,4 KB/s at the moment). If there's no update, return as small response as possible and reasonable (if you want to keep things simpler, always return JSON).

    * If possible, setup WebSocket. This eliminates polling completely.

    If you need "heads up", I can provide you couple useful links to php.net and some js-sources. I'm developing a sort of "series of minigames" for local library, where I utilize AJAX heavily, so it's quite "subject at hand". smile Exception being WebSocket-subject - I know about it, but I haven't utilized it, mainly because my webhost does not provide it - thus I can't really help with that area.
     

  • The chatbox that is currently on the website was a basic one that i put on there, it was the first chatbox i found as was in a rush to get the website completed..

    The current website has many issues, but it is not a priority at this point. I have been flat out working on other things Oberin wise, the website will get its upgrade once I am happy with the updates in Oberin and finished a long line of other jobs on my to do list not regarding Oberin.

    The current state of the Oberin website was a 2 day rush job as the original Oberin Website was down for over 2-5 weeks. Don't worry about the website issues at this time, as there are upgrades for it to come.
     

Moderator(s):