简体   繁体   中英

Socketing for a Real-Time Django Application

I'm trying to assess the advantages and disadvantages of implementing a Django application with real time capabilities with Socket.io versus Swamp Dragon. I understand that Socket has a much larger developer network and some good documentation, but that Swamp Dragon is built specifically for Django/is wrapped for Python. I have no problem with more JS overhead in Socket's case, nonetheless.

Does anyone have experience with using either of these (preferably Socket 1.0 and Django 1.6 or higher)? Are there any resources you might be able to point me in the direction of? I'm aware of this Django module (which has a failing build and uses an old version of Socket), and articles like Max Burstein's . Simply looking for a few more resources or possible frameworks to consider. Thanks.

After some research on this field. I decided to use swampdragon because as you said. Is built specifically for Django and provides classes for publishing your models automatically. Making some model to notify all users about its changes is really easy.

The problem about the socketio package is that is outdated, using old version of socketio. Last month someone commented about some work being done. Check #19 .

Another package that may worth mention is django-websocket-redis . It has a working demo together with the django-angular package (from the same author).

But, as I said, I decided to use swampdragon because it is very easy to use it and because its work on integrating with django rest framework.

Hope it helps.

You can use django-omnibus . It uses SockJS which is really robust (perhaps more robust than SocketIO). It also works with older browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM