Hi Roberto, great post! Just to ensure myself; I'am always uncertain if I do things the "right" way, special with new and unknown technology, such as websockets.
If I understood your post correctly, this for my part this means, that django-websocket-redis, does it (almost) the "right" way. I run two loops, the classical for Django with workers/threads and blocking calls, and the websocket loop, with one thread and a gevent monkey patched Redis connector. The Django and the Websocket loop can communicate only via Redis to each other. The only part of that code I dislike, is the lookup from the current user to its groups. This requires a database access, but fortunately it is done only once and before entering the main loop. Anyway, it is a blocking call, and thus could be those remaining 0.00001%, which are still too much blocking, as you mentioned in your post. So to be safe, I should keep that mapping in the cache, which obviously must be filled by the separate and classical Django loop. This could be done using some middleware. Jacob 2014-03-15 14:31 GMT+01:00 Roberto De Ioris <[email protected]>: > > > http://uwsgi-docs.readthedocs.org/en/latest/articles/OffloadingWebsocketsAndSSE.html > > Source (if you want to send pull requests): > > https://github.com/unbit/uwsgi-docs/blob/master/articles/OffloadingWebsocketsAndSSE.rst > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
