Hi,

I've been exploring Pylons and Prototype recently, so I'm definitely a
newby, and I have a question about _pushing_ updates to a client using
a suspended Ajax request.

Please point me in the right direction if I just overlooked a solution
that maybe already exists.

Here's my thought: I saw Ajax.PeriodicalUpdater in Prototype and
thought it's a great functionality for keeping constantly updated a
web page with changing content that's maintained server-side. But
that's active polling, so it's wasted bandwidth.

Why not push the changes from the server the right moment they happen?
This can be done with an Ajax request originated on the client and
left not answered by the server until the moment there is stuff to
send. Soon after that, another request is originated, just to leave it
hanging there in case something else comes through.

Of course I'm just quoting old ideas, nothing new. It's just that I
couldn't find them in Pylons+Prototype.

What would be needed server side is multithreading of course, because
the hanging Ajax request would consume a thread that remains
purposedly blocked on a thread-safe message queue. The queue is used
to communicate with the data-originating part of the application,
which would inject messages in it as soon as there is stuff to send to
the client.

I'm not sure how feasible this can be in Pylons. Can I just grab the
current thread from within a controller's action and block?

Well, I hope I'm not saying too much rubbish. Pylons experts, please
correct me in case I do.

Thanks,
Stefano

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to