statsplot / jshinyserver

jShiny server
Other
15 stars 4 forks source link

Question: jshinyserver vs shiny #3

Open Kohze opened 7 years ago

Kohze commented 7 years ago

Hallo,

Interesting project you created there, I was wondering if there are significant advantages of your implementation compared to the open source shiny.

Greetings, Robin https://R.Codes

statsplot commented 7 years ago

The official open source shiny server (open source Ss) and jShiny server(jSs) both host shiny apps. jSs is similar to Ss.

jSs features:

  1. Support Windows/Linux/Mac.
  2. Serve the static files to improve page load speed. When clients use multiple shiny apps, shared resources can be shared and cached at client sides. This makes better user experiences.
  3. Support to start new R instances for each user. It's similar to the multiple R instances feature in RStudio Ss Pro.

Shiny app is single page application, many features like DB, user login, HTTP sessions needed to extended. Which feature(s) do you expect?

Kohze commented 7 years ago

Hallo Statsplot, thanks for your answer.

Well shiny does not have to be single page application, and thats what I want to explore where shiny.io servers seem to be not 100% fitted (due to speed/timeout limitations).

here a multipage example: https://frapbotbeta.shinyapps.io/ShinyAdmin/ (its just an example not neccesarily yet connected with shiny, but I did that in other examples)

When I just wait a little bit to long / or search shortly in another tab, and then click again on other pages then I get a timeout / worker expired message which kind of kills the user experience. I was wondering if we could do better there.

statsplot commented 7 years ago

I am not familiar with shinyapps.io, it's a cloud service make deployment easy. I think that the timeout / worker expired can be configured. See https://support.rstudio.com/hc/en-us/sections/203868087-shinyapps-io

You may try (Ss) http://docs.rstudio.com/shiny-server/ or jSs. They simply host shiny apps, manger R sessions and load balancing. Some extra features (user auth, long polling) are implemented in Ss or Ss Pro.

As long as you can build a local shiny application, it's possible to deploy it with Ss or jSs on your own server. If your shiny app must be deployed on Windows or Mac, you can try jSs.

For now I have no idea how we can build multiple pages app in a single shiny app. Change one html page to another will make the websocket( or long polling ) disconnected and reconnected.

Multiple shiny apps may share information with DB or tools like Redis.

Thanks, Fan

Kohze commented 7 years ago

thanks for the answer - im quite familiar with hosting shiny servers etc. so I was hoping you might have had new approaches to overcome some limitations (by just not disconnecting at all for at least an hour). For now I will test then ajax approaches to keep it the same html page for the browser.

statsplot commented 7 years ago

If you can share your shiny app code, it will be easier to understand your problem.

For ajax request, here are some existing tools that you may have known already: https://www.opencpu.org/ https://msdn.microsoft.com/en-us/microsoft-r/deployr-about