Closed anoopsarkar closed 8 years ago
@theq629 @vlad003 , if possible may be we can have a Skype call and discuss various issues related to backend and come up with a plan to fix it and make it more scalable.
Sure, if we can find a time that works (my only free time tends to be Vancouver late afternoon).
Any progress on this?
What we discussed on Skype yesterday:
Is this issue still alive?
Since I now have uWSGI running the query backend, it's using multiple processes and many gevent workers, so it'll allow many simultaneous queries, and will practically never crash. Each query itself will still block, but none of them seem slow enough for that to be a significant issue (i.e. nothing's timing out); so I think that submitting a query and then polling is overkill, and will only add unnecessary overhead. By the time the frontend will start polling for a response, it would've gotten one from the backend anyways.
What remains to be done is speeding up the processing of responses from Whoosh so that the backend can respond to queries faster; there are several nested for loops that are potentially looping over a large number of items and there should be a way of at least parallelizing those. That's a bit of a different issue than this one, though, so I'll consider this one fixed.
@KonceptGeek and I discussed in person a change to the backend that would launch a query as a new thread and also return results incrementally back to the frontend.
This is related to issues #135 and #125