Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What library to use for comet in Django?

Tags:

django

comet

I'm planning to write a comet application in Django, but as far as I can see articles on this topic are scarce, and the comet libraries that are available don't necessarily lend themselves to use with Django (especially the development environment).

So far the best options I've seen (with one article on how to get it started in Django each) are APE and Orbited. Orbited, however, doesn't seem to still be actively developed (easy_install doesn't even work, the domains have expired), and APE should work fine, but how does one get it to work with python manage.py runserver ?

So my question is - if you are writing a comet application in Django, what library is most commonly used, if any?

like image 417
Herman Schaaf Avatar asked Nov 15 '22 01:11

Herman Schaaf


1 Answers

My solution for this would be to write all of the models and main site in Django, but use another server for the ajax which is more suited to long polling or persistent sockets.

For example: SocketTornad.IO https://github.com/SocketTornadIO/SocketTornad.IO

Inside the tornado socket.io server, the idea was to import the required Django models to work with the data required by the comet / websocket views.

Doing that through manage.py or any plain django server seems very difficult, and it would much easier to let the tornado socket.io server do the specialized comet/websocket work for you.

But, I have not actually implemented it yet, since basic non comet ajax has met our needs fine. It is just a concept that was considered.

like image 167
Tom Gruner Avatar answered Dec 20 '22 21:12

Tom Gruner