Hi,

Thanks for the answers. I took the twisted aproach because I already
had some experience with it. I don't use Nevow/Athena but instead use
Kid, Mochikit and turbojson.

Arnar Birgisson wrote:
> I'm a bit new to this comet stuff - would I assign each client an ID
> and tag the messages for them specifically (perhaps some messages
> could be tagged for multple or "all connected" clients) with that ID?
> What if the queue contains a message with a client-id that's not
> connected? Discard the message? Or wait for the client to connect?
>
> How did the OP (Bran Vandoren) picture this?

This is how I did it:
Mochikit opens a connection to the Twisted server. If the 'version' of
the game map on the client is lower then the one on the server it
returns an update (JSON) immediately. If it's lower it waits  1 minute
before returning an answer. If the version of the game map is increased
in the meantime, the twisted returns the answer immediately. Mochikit
opens a new connection as soon as it received the previous answer from
the server.

It would be great to see these capabilities come to TurboGears with an
easy to use interface. Especially changing the DOM tree/CSS properties
directly from within python would be nice (and in the other direction:
calling python functions from within javascript, off course).

Bram Vandoren.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to