Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pylons and NodeJS / Comet

I'm building Pylons web applications that use a lot of jQuery and AJAX/JSON to make these apps more Web 2.0'ie. I've been looking at the server push technologies and have questions about how to do this with Pylons. I've looked at Comet and NodeJS (though I don't know much about NodeJS yet) and am confused about what would be a good method to implement server push techniques in Pylons. I'm currently "emulating" this by having my JavasScript client app perform periodic polling in order to update the app content.

Does anyone have any information/pointers/hints/help about what I'm talking about in the paragraph above? Your help would most definitely be appreciated!

Thanks in advance! Doug

like image 512
writes_on Avatar asked Jun 19 '10 22:06

writes_on


1 Answers

Pylons is unlikely to help you with "Comet" (aka Server Push) Comet relies on "seeping" data over connections open for long time. Pylons is WSGI in the core - which really precludes long-open connections.

You will likely need a separate ASYNCHRONOUS messaging server that will be your "comet" server.

For starters, take a look at a good example of Comet functionality in action: http://code.stanziq.com/speeqe/ Site is interesting because they note the more popular kits for gluing Comet together on Python: Punjab, BOSH, XMPP.

After that, take a look at Orbited. Then, take a look at Tornado. After about a day of reading up on all that, you will know what to choose as back-end for a "comet" functionality.

like image 170
ddotsenko Avatar answered Sep 23 '22 03:09

ddotsenko