I'm wondering what the best way to implement a chat system would be.
Currently, I have a javascript timer that goes off every x seconds to
query the database and return the list of chats. I keep my list to a
certain number of chats, but it seems that the way I'm doing the whole
process is a fairly poor design.

Here's basically how it goes:

user.enterText(text)
chats.append(text)

every 5 seconds, Do:
chat_list = chats.getChatsFromDB()
display(chat_list)

I'm wondering if there is a way to trigger an update only when a new
chat is entered (by any user). Implementing a "push" system seems
impossible because I can't really leave a request open. Is there
something like that though that could do what I'm talking about?

I've looked at the current chat programs that people have created in
app engine, and they all seem to have a delay just like mine before
the chat window is updated. I'm assuming they are using javascript to
update, but without knowing the code I can't say for sure.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to