can a shinyapp.io free plan allows for multiple user communication?

Hi,

I would like to use a shiny app to allow my students to input their height and create a histogram. I am new to shiny and the sharing process and for now I have a free account with shinyapp.io, so I wonder if I could share a link where each of my students can input their height and see a histogram built with their observations.

Best,
Natalia

I'm not the greatest expert of Shiny, but I would say what you want is possible, but not easy.

By design of Shiny apps (wherever they're hosted), each time someone connects that creates a new session, that independently tracks data in memory. So if you want communication between sessions, you need some kind of mechanism to store the data outside of the app itself.

As far as I can tell, this is not possible on shinyapps.io (independently of the tier), as the "hard drive" that the app sees is re-created independently for each new session. Here is where I get it from:

When going through the different storage type options below, keep in mind that if your Shiny app is hosted on shinyapps.io, you will have to use a remote storage method for the time being.

So you'd need to have some other server where you host the persistent data. For a free and effortless service, I think the easiest is to use Google Sheets, see here for some code. The idea is that you can create a google sheet somewhere with your google account, and have the Shiny app connect to Google and put the data in the sheet. At the end you can have the app recover data from the sheet. Each instance of the Shiny app is not aware of the other instances, but they all put their data in the same sheet.

1 Like

Thank you so much Alexis, I'll look into that.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.