Say goodbye to unnecessary waiting: mastering asynchronous programming in Shiny
summary
Shows concrete wins: use future and promises to make Shiny non‑blocking across concurrent users (no cross‑session stalls), use callR r_bg to spawn background R processes so a single user can continue while heavy tasks run, and use coro async/await for more familiar async syntax. Demonstrates multisession/multicore strategies, r_bg polling to retrieve results, and real use cases (DB queries, CSV/PDF generation, ML training). Notes a measurable user‑impact tradeoff, some overhead, and a steep but essential learning curve.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:25Why speed matters
- 3:17Developer responsibility
- 5:51What is async programming
- 8:34How Shiny works synchronously
- 13:32Async vs Multi-threading
- 16:23Introduction to futures
- 20:26Future examples
- 23:56Promises in Shiny
- 29:04Observing with promises
- 33:48Using callr
- 39:11Callr examples
- 43:23Introduction to Coro
- 45:05Method comparison
- 48:37Q&A session
