Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here are some gists that may help (I've been meaning to release something like 'flask-sse' based on 'django-sse):</p> <p><a href="https://gist.github.com/3680055" rel="nofollow">https://gist.github.com/3680055</a></p> <p><a href="https://gist.github.com/3687523" rel="nofollow">https://gist.github.com/3687523</a></p> <p>also useful - <a href="https://github.com/jkbr/chat/blob/master/app.py" rel="nofollow">https://github.com/jkbr/chat/blob/master/app.py</a></p> <p>The 'RedisSseStream' class uses redis as a backend to communicate between threads (although maybe gevent can do this?), and 'listens' for redis publish events.</p> <p>While the 'PeriodicSseStream' doesn't need redis, it cannot communicate between flask threads i.e. use information from another response; Without something like redis, the seperate threads (the stream, and the one serving another user) cannot communicate.</p> <p>As Janus says, the generator only return one result - it must yield multiple, and in this case it must be enclosed in a loop that endlessly yields after each serial poll; You also need to decide what will limit polling, will it be limited by time (periodically poll), or something else (e.g. if it already take awhile to read the serial port)?</p> <p>I don't really know much about the performance of sse, or how well supported it is (and wrt cross-domain), but if you consider <a href="http://socket.io/" rel="nofollow">socket.io</a>, You could maybe use <a href="http://warmcat.com/_wp/2010/11/01/libwebsockets-html5-websocket-server-library-in-c/" rel="nofollow">this</a> to improve web-socket <a href="http://drewww.github.com/socket.io-benchmarking/" rel="nofollow">performance?</a></p>
    singulars
    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.
 

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