Access to flask socketio msg queue and difference with celery msg queue #1844
Unanswered
MarioCiranni
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Can you explain what you are trying to do? The message queue is used internally, you are not supposed to use it directly. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Ive looked up on the web a lot for a satisfying answer about how to access the socketio msg queue but no particular avail.
Im still not sure how can I get access to the socketio msg queue in a flask application that implements websocket with flask-socketio library. @miguelgrinberg IIve also noticed that in your talk back at the PyCon in 2016 you clearly distinguish between socketio msg queue and celery msg queue and how they have different purposes, but still I am not sure how they are used and what makes them different.
Im bringing up this topic because I am developing a webserver. On the backend I need to process a stream of images coming from the webcam and feed it to a ML model. For I had some lagging issue when displaying the image back on the browser, which I take is due to the CPU intensive work done on the backend which causes delay in the response back to the client, I just tought that I could get access to the msg queue / buffer of the socket and just keep the last image or the last n images in order to speed up execution and avoid this CPU bottleneck. Yet, I am not sure which might be the right decision to make in this regard. Ive seen that in case of CPU intensive tasks usually Celery it is used in conjunction with Flask but I do not understand completely fits in my case or I could opt for a (maybe worse but) simpler solution like just accessing the socketio msg queue and drop some images to speed up execution as I was saying above.
I would appreciate so much if you could get a feedback on this.
Thanks,
Mario
Beta Was this translation helpful? Give feedback.
All reactions