On Jan 8, 2007, at 1:46 PM, Christopher Arndt wrote:

Jonathan Wight schrieb:
Well that wouldn't help me. I need _live_ updating of data in the controller. I've tried using a background thread and a message queue between controllers - but that didn't get me very far. So I'm wondering if there is anything built-in.

Why not? That's what I would try. A combination of a thread pool and the
publisher/subscriber pattern.

1 master thread to rule them all that has two queues, a send and a receive queue

n slave threads that each have a a reference to the two queues

Each slave thread subscribes to the events it is interested in with the master
thread

Whenever something interesting happens, a slave thread posts a notification to the master's receive queue and then the master thread distributes it to those
slave threads that have subscribed to this event via the send queue.

Yeah it is now working. I think the problem I was originally seeing was related to the double reloading of modules. Now I successfully have comet pushing updates to pages when the back-end database is updated. Pretty cool.

        Jon.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to