j-andrews7/STRprofiler

App: long running tasks blockers

MikeWLloyd opened this issue · 2 comments

Long running query (or other tasks) block reactivity for concurrent users on the same server. Non-blocking async calls are needed to overcome this. Implementation of those presents architecture issues for how functions are currently called. See https://shiny.posit.co/py/docs/nonblocking.html#true-non-blocking-behavior-with-extendedtask

Depending on hosting & load management settings, this shouldn't really be an issue for an app like this, as the server should spin up additional instances/workers to scale with the number of users:

image

We don't really have any long-running computations being performed where I'd expect the concurrency to really be noticeably affected.

This isn't to discourage implementation, just that is may be unnecessary. And in the past, I've found it non-trivial to implement (in R, which is a bit of a different beast).

non-trivial is the key word. I spent a time seeing how to accomplish this, and hit some pretty serious walls. For now, I think you are right we don't need to concerns ourselves with it. I do know that docker / cloud implementations can struggle with load balance. I will close this for now, and we can always revisit in the future.