>These are pretty big Flask apps too, which have thousands of lines of code, dozens of packages, tons of assets and require running Celery, Postgres, Redis, etc..
I was trying to create a new project last month trying to put all of these together. One thing that I was stuck in was putting these together:
- non-single-thread-Flask
- Redis pub-sub, subscribe to listen to a channel
- and websocket (such as socket.io) upon receiving redis sub message, pushing the message to client side.
I found out that this was a non-trivial thing to do, as redis subscribe is a blocking function, and I was not able to push websocket message from redis subscribe callback. I wonder how did they do that, if any?