-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Avoid dependencies not compatible with webr #172
Comments
What else is interesting is if I try to put Open Specy into the code editor it will say that its good except for saying that glmnet isn't supported. https://shinylive.io/r/editor/ Looks like you can dowload a tar for it though, not sure how to use it. |
Seems like running this in a shiny app allows it to run without error, adding the install was key. webr::install("OpenSpecy") |
Working with the app a bit now, looks like we may need to restructure how the app grabs data. Might try reconfiguring the app with just a small test dataset for the library to get around this issue in the meantime. posit-dev/r-shinylive#55 |
I think most of the dependencies currently listed as suggests could be removed. I think these are the only ones actually used in the package. testthat (≥ 3.1.9), qs, ggplot2, aws.s3, loggit |
Also remove shiny from depends. @zsteinmetz, what do you think about this shift, any potential for it to crash and burn when people want to run run_app or similar opperations? |
Hey @wincowgerDEV, this looks great! I'll need some more time to dig into it though. Hard to say how much would break right now. Would you like to touch this asap or rather have it planned for 2.0? |
Hey @zsteinmetz, I will probably want to get to this in the next couple of months. I recently got some funds to make Open Specy maintenance cheeper, the website is now double the cost as it was last year, its getting used like crazy. I think this will let us scale cheaply. |
Oh wow! Yeah, let's try it. |
Just pushed an update without CURL. |
I quickly screened through this article: https://hypebright.nl/index.php/en/2023/07/25/building-serverless-shiny-apps-with-webr-a-step-by-step-guide. In their verdict, they don't seem overly enthusiastic about using webR for a fully fledged Shiny app just yet. Making a Shiny app webR-ready reads like a different story than just making the package compatible with webR and running a web-based RStudio like session. They also say it's quite slow which might be the deal breaker here. If I understand it right, all packages need to be made available on one's local computer before the web app starts, so do the spectral libraries. This will take a while. What's your take on this? One alternative would be to move away from Shiny as the GUI and use a JavaScript framework instead. This is beyond my capabilities though. |
For some reason, I can't run the Shiny app locally anymore; neither from the repo nor from
Is this related to removing curl? |
Good find on that article. I think the speed thing isn't a deal breaker, people are generally fine with the current speed for Open Specy which is somewhat slow too. There will be some speed boosts for people who with poor internet because after the app loads it is basically in offline mode and I think we can remove a lot of the data sharing functionality so that this is the default for folks. There should also in theory be a speed boost for people with high performance computers because they wont be running open specy on our 8GB ram sever with everyone else any more, they will be running it on their desktop just in the browser. On the flip side there is latency on the first load up that takes a little while and this will be true for everyone across the board but personally I think the 1 min it takes to load is worth all these benefits. What do you think? Huh, I don't see the error on my end. I think I have seen it before though and I remedied it by updating my packages or reverting them to a previous verison. There were some other weird errors I had to version around for Open Specy online and set these dependencies:
Your error sounds like it is from bs4dash. What version are you using? I am using 2.2.1, here is my session info:
|
I was a bit shocked that this very simple Shiny app already takes about 12 secs to load from my end. Hard to say how long it'll take for Open Specy and for people with a poorer internet connection. If it's less than a minute and we implement a loading bar or something, it might be okay. Everything beyond that .. huh .. don't know. This is my session info running the current R version with bs4Dash 2.3.3:
|
Yeah, I get where you are coming from. I think in the long run, this type of app deployment will be the default but for now there are some latency issues. As for bs4dash, I think you may need to depreciate your bs4dash to 2.2.1 not sure why the most up to date one throws an error. |
Don't get me wrong. I totally agree that we should switch to client-side computing in the long run. I'm just skeptical if it might be too early. Maybe we should start testing with an OS version isolated from mainstream development, maybe in a separate branch or locally.
I'll try to track down that error. Regular users might find it too confusing to use older versions of specific packages to make the Shiny app run locally. |
I was able to get the run_app working again. Unfortuantely though even after removing curl we still have curl imported by another package. Looks like osfr is dependant on it. Maybe we can download the libraries without curl? |
We can produce a special version of Open Specy and host it through a Github action. Right now following these instructions and have a simple version of the package with just the make_rel function going. https://r-wasm.github.io/rwasm/articles/github-actions.html
|
Guidelines
Description
I really want to make Open Specy compatible with webR it will allow us to scale the use of the package on the web by so much! There are 3 dependencies that we currently don't have supported.
Problem
Open Specy support on webr
Proposed Solution
I think the easiest way to get around this is to avoid these dependencies. Another way is to try and figure out how to get them all supported but the fact that they are all written in lowlevel code that I don't know makes me think avoiding is easier.
Alternatives Considered
Get the dependencies included in webr
The text was updated successfully, but these errors were encountered: