niwibe/django-sse — Issue #1: Long polling / streaming updates
Author: dokterbob
Created: 2012-02-08 11:35:07+00:00
State: open

Having read your code, which is very nice otherwise, I notice a lack of [`yield`](http://stackoverflow.com/questions/2922874/how-to-stream-an-httpresponse-with-django) statements which would be required to do long polling. Right now, it seems that the connection is closed after each response (whether a message is returned or not) - regardless of whether there's new data or not.

This leaves the major advantage of SSE unused. Especially for mobile devices creating TCP connections all the time can proof to be a considerable load. Also, it can slow down the interaction with the server.

Do note that I *might* have been misreading your code - haven't found the time to use it yet. Then again, I *might* opt to use your code in which I would implement the requested functionality myself.