Re:Python Practices for Efficient Code: Performance, Memory,...
by sandGorgon on Saturday August 19, 2017 @08:07AM
(#15052940)
Do you have a small sample of gunicorn + flask + websockets + sqlalchemu config ? I've been exploring a little here and looking for something that works well.
Re:Python Practices for Efficient Code: Performance, Memory,...
by mattbillenstein on Monday August 21, 2017 @01:43AM
(#15062219)
Sorry, I don't have something that is easily sharable.
Also, generally avoiding c-extensions for talking to databases unless they have explicit support for greenlets is advisable.
My main webapp currently is Flask on gunicorn with async gevent workers. Mix in Flask-Sockets (using gevent-websocket) and I have websocket support as well and use redis pubsub as a broker to communicate intraprocess. It's a nice and capable system and you can reach into gevent if you want to do scatter-gather sorts of patterns without dealing with threads.