What is the performance of this when many users at once are consuming the same app/resources?
What is the performance of this when many users at once are consuming the same app/resources?
- The dash docs (https://plot.ly/dash) are itself a Dash app. They're getting a lot of traffic today with the launch and they're holding up OK to hundreds of active users.
- The state of Dash apps is entirely in the front-end (in JS in the web browser). The Dash app backend (the python part) is really lightweight - it's a flask server (that you run with an application server like gunicorn) that dispatches to the functions that you decorate. If your functions are really resource-intensive (in memory or if they block for a long period of time), then the app's performance will suffer as part of that. However, since this analytic code is scoped inside a function, the memory will free up after the request is done.
- Since Dash's callbacks are functional, you can pretty easily add caching. Caching will store the previously computed values and serve them if the input arguments are the same. There is some more info in the "performance" section of the docs: https://plot.ly/dash/performance
The state of Dash apps is entirely in the front-end
Cool! I develop APIs using Flask so that's good news for me. I want to keep the API as lean as possible. I also try to cache everything I can or simply render stuff into static data if possible. I.e., some data are updated on a regular basis but do not change so rapidly and thus I can just use a Jinja2 template with some {% raw %} blocks to render my jinja2 templates with much less stuff to do, or even static html when I can.Installing as we speak.
And for the record, I'm not knocking RStudio / Shiny here—the tooling and end-user experience is really excellent. I do worry about the ability to create "enterprise scale" apps though. Fortunately, there are a lot of times when a Shiny app is plenty.
I'll be very curious to see how Dash compares in this regard.