Dash Julia: Processing Multiple Near-Simultaneous Requests

Hi,

I have a little simulation in Dash that takes ~20 seconds to run. Is there a trick that would allow the Dash app to run multiple requests simultaneously? From what I can see, Dash just queues up multiple requests and runs them serially on a single thread, regardless of how many threads Julia was started with. Am I missing something?

With earlier, lower-level prototypes it was easy to get simultaneous responses just by starting processes with @spawn/fetch but it’s not obvious to me how to do that with Dash.

Code for the Dash app is here.

This app is ultimately intended for classroom use, so I might expect 20-30 submissions within a few seconds.

thanks!

Graham

I believe Dash.jl uses HTTP.jl as web server. You would have to modify Dash.jl so that HTTP.jl is loaded on all Julia threads (assuming you launch Julia multi-threaded).

But seems over-kill for classroom use. Alternatively consider pre-calling endpoints, so that your code is pre-loaded.