Could you help me understand why this have to be done inside a web server 
container?

When I've previously read about reasons for that they tend to be things 
like "handling slow clients", something that an event loop is excellent at 
automatically. To me, this means that this process could run outside of all 
this, and simply be started with "python manage.py runsse 0.0.0.0:9000". 

Also, I don't think you would need to mix redis (or any other persistent 
storage) into this. The connected clients could simply be stored in an 
in-memory array, that is discarded if the server crashes. When the server 
is started again the clients will automatically connect again, and the list 
of clients would be built up again.

On Sunday, 31 May 2015 09:40:43 UTC+2, Roberto De Ioris wrote:
>
>
> > On Sun, May 31, 2015 at 1:23 AM, Roberto De Ioris <[email protected] 
> <javascript:>> 
> > wrote: 
> >> I obviously agree, but take in account that this uWSGI plugin 
> simplified 
> >> the steps a lot: 
> >> 
> >> https://github.com/unbit/uwsgi-sse-offload 
> > 
> > 
> > nice.  it certainly looks cleaner than having an external gevent 
> > process.  does it support sending messages to a specific subscriber 
> > (or subset of subscribers)? 
> > 
> > maybe the easiest way would be to set some variable either in the 
> > router or in the app view function and use it as part of the redis 
> > pubsub channel name. 
> > 
> > -- 
> > Javier 
> > 
>
> the channel name can be specified via variables, so it should be pretty 
> versatile from this point of view. The plugin is pretty tiny so if you 
> have ideas to improve it, feel free to open a github issue 
>
> -- 
> Roberto De Ioris 
> http://unbit.com 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0598ed1c-214c-4aec-b567-2704c0cbbd33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to