> > > In site notifications looks like this: > http://www.diigo.com/item/image/121xl/jqgp?size=o (a counter, a popup, a > button to mark as read) > > Now I want to have an ajax keepalive or websockets to pop it automatically > (does anyone knows about it?) >
Have you looked at Socket.IO (http://socket.io/). On the server, you'll need a non-blocking web server to handle all the async connections -- for that there's gevent with gevent-socketio (https://bitbucket.org/Jeffrey/gevent-socketio). Some examples from the interwebs: http://bottlepy.org/docs/dev/async.html http://codysoyland.com/2011/feb/6/evented-django-part-one-socketio-and-gevent/ http://toastdriven.com/blog/2011/jul/31/gevent-long-polling-you/ http://sontek.net/pycon-sprints-part-1-the-realtime-web-with-gevent http://blog.abourget.net/2011/3/17/new-and-hot-part-4-pyramid-socket-io-gevent/ There's also Now.js (http://nowjs.com), which is based on Socket.IO, but on the server it's not Python and requires Node.js. Anthony