Scaling Shiny apps with asynchronous programming

June 7, 2018 Joe Cheng

This updated talk has new info since Joe spoke at rstudio::conf 2018.

Download Materials from the webinar

One persistent challenge with developing Shiny apps for live deployment, has been the R language runtime’s single-threaded nature. Because of this, a given Shiny app process can only do one thing at a time: if it is fitting a model for one client, it cannot simultaneously serve up a CSV download for another client. Asynchronous programming offers a way to offload certain classes of long-running operations from the main R thread, such that Shiny apps can remain responsive.
The next major release of Shiny will include deep support for asynchronous programming via 'promises', inspired by the JavaScript abstraction of the same name, but with significant enhancements to integrate seamlessly with Shiny's reactive constructs and to allow app authors to write code that looks mostly like idiomatic R. Programming with these promises has its own learning curve, but the payoff can be huge if your app has a significant bottleneck.

About the speaker

Joe Cheng 
CTO, RStudio

Joe Cheng RStudio CTO. Joe was the original creator of Shiny, and leads the team responsible for Shiny and Shiny Server.

About the Author

Joe Cheng

Joe Cheng is the Chief Technology Officer at RStudio and was the original creator of the Shiny web framework, and continues to work on packages at the intersection of R and the web.

Follow on Twitter Visit Website More Content by Joe Cheng
Previous Article
Shiny 1.1.0: Scaling Shiny with async
Shiny 1.1.0: Scaling Shiny with async

This is a significant release for Shiny, with a major new feature that was nearly a year in the making: sup...

Next Flipbook
Shiny Cheat Sheet
Shiny Cheat Sheet

This cheat sheet provides a tour of the Shiny package and explains how to build and customize an interactiv...