Joe Cheng | Managing long-running operations in Shiny | Posit

Sdílet
Vložit
  • čas přidán 14. 05. 2024
  • It’s been years since Shiny evolved to allow asynchronous operations within applications, improving scalability. The introduction of the {promises} package enabled concurrent processing between multiple Shiny sessions, a significant step forward in handling background tasks. However, this did not address the need for intra-session concurrency, where users expect to interact with the application while long-running calculations are executed in the background.
    Recently, we added a new ExtendedTask feature to Shiny to allow for such intra-session concurrency. This new feature provides a different approach for developers to incorporate asynchronous tasks, enabling smoother user interactions during intensive computations. Alongside ExtendedTask, this talk will also discuss newer methods for launching asynchronous tasks, besides the usual {future} package. The focus will be on the practical application and integration of these features into Shiny applications.
    Links mentioned in the video:
    ⬡ Shiny in Production: Principles, practices, and tools, • Joe Cheng | Shiny in p...
    Timestamps:
    0:20 Make your slow code fast
    1:43 Long-running operations are a problem
    3:28 Inter-session concurrency and intra-session concurrency
    4:24 Introducing ExtendedTask
    5:17 Demo of a slow API using ExtendedTask
    6:13 Slow code example (R)
    7:16 Fix slow code with ExtendedTask (R)
    8:55 Slow code example (Python)
    7:16 Fix slow code with ExtendedTask (Python)
    10:46 Links to get started
    11:06 ExtendedTask backstory intro
    11:28 ExtendedTask vs. Shiny Async
    15:50 How reactive programming works in Shiny
    21:31 How ExtendedTask works in the reactive process
    25:38 What we’re still working on
    26:35 {future} alternatives
    31:47 Wrapping up
  • Zábava

Komentáře • 3

  • @WaiguruMuriuki
    @WaiguruMuriuki Před 17 dny +1

    I have created many shiny dashboards using promise and future for long tasks. However, I was always feeling there was a better idea out there. Then, wallla!!!, we have this. Thanks Cheng.

  • @SamEdwardes
    @SamEdwardes Před 15 dny

    This is awesome! Nice work shiny team 🎉

  • @user-hl1fk6lw8k
    @user-hl1fk6lw8k Před 17 dny

    Thanks for the feature.❤