Hello, On Thu, Jul 31, 2008 at 11:21 AM, Alexander Back <[EMAIL PROTECTED]> wrote:
> I think of events on the client-side on which you can react. First of > all you should explain why you need to poll the server. Maybe it is > possible to work out other solutions. Some time I worked on chat application and logic how to fetch messages from server. It's obvious that getting messages from server every second is unefficient way. We used a few parameters in our algorithm to calculate interval between requests to server. The first parameter is user's activity. For example if the user uses application you can get messages from server more frequent to keep information up to date, if the user is inactive you use bigger interval to get messages. It's also cool to handle if tab/open is active but I'm afraid that it's impossible only with javascript (I mean cross browser solution). The second one is count of messages from server which you got last time. Based on this parameter you can see activity of other people in chat and also manage interval between requests. It's something like google gets messages on Gmail if server unavailable. I'm not aware with comet very good but if I'm not wrong you need that your server supports this. But I don't think that its a problem. Java developers can take a look at DWR which supports Reverse Ajax [1]. Best regards, Siarhei Barysiuk [1] http://directwebremoting.org/dwr/reverse-ajax ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
