Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
199 views
in Technique[技术] by (71.8m points)

R Shiny + Future + Plumber

Preamble

Inspired by the presentation by Barret Schloerke at studio::global(2021) (I will add the link as soon as it becomes available), I tried to implement an app to see the differences between using {future}, {plumber}, both or none into a Shiny app running a sequence of fast-slow-slow-fast computations (both on distinct output and in a sequence within the same one).

Gist

You can find here my attempt, including the app.R Shiny app and the plumber.R APIs.

Results

execution selected (5 s for "slow") result expectation comments
Standard run ~20 seconds before anything appear, next everything appears in the same moment ~20 seconds, appearing sequentially somehow Why did not appear sequentially?
{future} only ~5 seconds before anything appear, next everything appears in the same moment ~20 with "first fast" and "second fast" appearing almost immediatly and next (~5) "first slow" or "second slow," next (~10) the other, and finally (~20) "Sequential") I would expect that something similar to what happened here for the combined type of run... how is possible that "sequential" completed in 5 seconds???
{plumber} only same as the standard run (r should remain busy until each API call would be resolved, right?) same time (~20) but appearing sequentially some how why shiny rendered everything the same time?
{future} and {plumber} same as the standard run I do not expect this at all!, What I expected here is to have "_fast"s appearing immediately, "_slow"s quite the same time after ~5 seconds, and "sequential" after ~10 seconds from the start (i.e., ~10 seconds overall) I am totally confused here :-(
question from:https://stackoverflow.com/questions/65851676/r-shiny-future-plumber

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...