I have a flask webapp running pandas to do some data analysis on the backend.
Right now, i took the naive approach of using AJAX for user to send queries back to the server and interact with the data. but as it turns out there is a lot of overhead with each request and everytime i need to reload the data into pandas/memory which is very repetitive.
I was thinking socketio could be of good use here - I would open up a socket connection and this way once the file is loaded into pandas, the user could interact and query the data more responsively with less overhead through the socket.
So my question right now is:
- Should I open up a room for every user as the users dont need to interact with each other ?
- Does this scale - opening up a room per user ?
- Where does namespace fit in here ? Do I assign namespace to different sections of the website and further open up rooms under each namespace for each user ?
- Or Should I spawn a monkey patched thread ? Greenlet per user ?