Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is support for WebSockets with <a href="http://pypi.python.org/pypi/django-websocket" rel="noreferrer">django-websocket</a>, but unfortunately there are major issues with it for getting it working; here's a quote from that page:</p> <blockquote> <h1><a href="http://pypi.python.org/pypi/django-websocket#disclaimer-what-you-should-know-when-using-django-websocket" rel="noreferrer">Disclaimer (what you should know when using django-websocket)</a></h1> <p><strong>BIG FAT DISCLAIMER</strong> - right at the moment its technically <em>NOT</em> possible in any way to use a websocket with WSGI. This is a known issue but cannot be worked around in a clean way due to some design decision that were made while the WSGI stadard was written. At this time things like Websockets etc. didn't exist and were not predictable.</p> <p>...</p> <p>But not only WSGI is the limiting factor. Django itself was designed around a simple request to response scenario without Websockets in mind. This also means that providing a standard conform websocket implemention is not possible right now for django. However it works somehow in a not-so pretty way. So be aware that tcp sockets might get tortured while using django-websocket.</p> </blockquote> <p>So at the moment, WSGI: no go; Django: hardly any go, even with django-websockets; see also a comment in the author's <a href="http://gremu.net/blog/2010/websocket-support-django/#dsq-comment-63868409" rel="noreferrer">original announcement</a>:</p> <blockquote> <p>I can't say this looks like a good idea. You're doing long-lived connections in a way that is going to require threading. django-websocket requires threading setup, and won't work if you've got processes (because you'd just have too many processes) but threads won't scale for a lot of connections at the same time, either, so its just a false safety. You need an asynchronous platform for long-lived things, and I do this by doing my app in Django and my comet and websocket in Node.js </p> </blockquote> <p>Personally if trying to use WebSockets (which I expect to be next year), I would try the combination of <a href="http://twistedmatrix.com/" rel="noreferrer">Twisted</a> and <a href="https://github.com/fiorix/cyclone" rel="noreferrer">Cyclone</a> first. They're designed to cope with WebSockets, and scale well. If you write your code properly to remove unnecessary dependencies on Django, you should be able to use much of your code in a Twisted-based system. This is a very distinct advantage over using Node.js or Comet or any system in another language. You could also make a simple push </p> <p>Finally, you could also just decide it's too hard and use an external service to provide the push support. That then becomes a matter of sending a simple JSON request to their servers instead of worrying about how to make the connection and how concurrency will work and things like that. Of course, you'll need to pay for it (though currently it may be free while in Beta), but you don't need to worry about implementation details; you won't have the full power of WebSockets that way though - just push support.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload