hadley / mastering-shiny

Mastering Shiny: a book
https://mastering-shiny.org/
Other
1.34k stars 566 forks source link

Needs database and async coverage #597

Open abeburnett opened 1 year ago

abeburnett commented 1 year ago

Very good book, Hadley! Say, I'm running into issues with using Shiny to display very large data (data sets running up to hundreds of thousands of rows). I've been looking for resources online which could help address strategies for handling big data, particularly when we're querying data stores like Snowflake. Clearly the most obvious strategies are filtering, limiting, and sampling, but what about after you've done all of that, and now you're trying to figure out how to build the most performant Shiny app possible. Strategies like async/futures might help (if the same large data set is used in other areas of the app, e.g., on other tabs maybe lazy load it?), maybe strategies like chunking data loading from Snowflake (at least where you don't need all the data all at once), or maybe strategies for how you can cache a default data set (which is smaller and therefore will load faster), but then load live data from the DB when a different option is selected in a dropdown.

Anyway, I have yet to see any kind of robust coverage of how to handle large to huge data with R/Shiny--and just generally how to make performant Shiny apps. I'd love it if you'd add more on this to your book. Thanks for your consideration!