Gevent, Long-Polling & You
toastdriven.com
toastdriven.com
I have implemented such a functionality for real time monitoring using gevent and works extremely well. This HTML5 feature is supported in recent versions of Chrome, Opera, and Safari and in the beta versions of Firefox, but not in any version of IE: http://caniuse.com/#feat=eventsource
Streaming is when the connection stays open and multiple messages are sent down the single pipe. It's faster and more responsive (and easier to scale since you don't have to deal with lots of connections being closed and reopened all the time) but is tricker to get working.
Of course, WebSockets make everything work sensibly hence avoiding the need for crazy hacks.
Here's a deck from a talk I gave on Comet back in 2008 which touches on some of this stuff http://lanyrd.com/2008/skillswap-goes-javascript/skq/
Slightly off topic, but I wonder if this technique can be used to circumvent the buffering that occurs in HTTP proxies? I encountered the problem once and was only able to make the application responsive by closing the connection after a timeout (forcing the client to open another one).
I think most importantly vs a twisted or tornado based solution this is using the vanilla redis client library. As long as your datastore's client library is pure-python it JustWorks with gevent.
Adding gevent-websocket and gevent-socketio to the mix gives some interesting possibilities as well.
Edit: And an explanatory blog post is at http://corbinsimpson.com/entry/summertime for those readers not well-versed in Twisted.