Referring to data files from more than 1 app

45 views
Skip to first unread message

Andy Clark

unread,
Aug 11, 2014, 2:57:27 PM8/11/14
to shinyap...@googlegroups.com
I would like to have various data files, csv; rds SQLite which can be referred to by more than one app

I had thought of placing them all in one app 

locally in server.R of 'MyApp' I have a line equivalent to

df <- readRDS("../MyOtherApp/data.rds")

where the MyOtherApp holds the data

MyApp works fine

However, when I deploy MyApp and MyOtherApp to shinyapps.io/
I get the error message cannot open compressed file '../MyOtherApp/data.rds', probable reason 'No such file or directory'Error in gzfile(file, "rb") : cannot open the connection

TIA

Tareef Kawaf

unread,
Aug 11, 2014, 3:11:36 PM8/11/14
to Andy Clark, shinyap...@googlegroups.com
Hi Andy, 

You can't share data across apps by including them in any one of the apps.  You would want to put them in a shared storage location like an S3, a database, or have them download the data from a common location. 

Here is the relevant paragraphs from the getting started guide:


1) Data written by an application to the local filesystem of an instance will be lost when you re-deploy the app. Additionally, the distributed nature of the ShinyApps.io platform means that instances may be shut down and re-created at any time for maintenance or to recover from server failures.

2) It is possible to have more than one instance of an application. This situation means that multiple instances of an application do not share a local filesystem. A file written to one instance will not be available to another instance.


We are considering whether we need to provide a shared data store of some kind, but we haven't gotten enough data to help us determine whether those added features would be ones that would be useful premium features.


-Tareef



--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/ee0feb4b-0f4d-4e61-a243-a906a7389394%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Clark

unread,
Aug 11, 2014, 3:30:30 PM8/11/14
to shinyap...@googlegroups.com, ag...@rogers.com
Tareef

   Thanks for reply. Back in the day using glimmer, I remember attempting to link to a database on a different webserver but it took an inordinate
length of time and the solution was to hold csv/rds files in a separate directory accessible by any app. I had assumed something similar would be available
on shinyapps.io (without of course reading the manual!) . So basically I need to revisit outside access or duplicate files as required, then. I seem to remember you
have some storage limit - does that apply per app or by user

Tareef Kawaf

unread,
Aug 11, 2014, 3:38:11 PM8/11/14
to Andy Clark, shinyap...@googlegroups.com
Hi Andy,
We don't have storage limits yet.  The limit is really on the upload of the files you can send out on a per app basis.  The limit is currently set to 100MB.  Do you think that will work for you?  
We would love to learn more about the use cases to understand what else we need to be supporting in shinyapps.io for it to be a platform that works for you.

Best,
Tareef


Andy Clark

unread,
Aug 11, 2014, 4:27:23 PM8/11/14
to shinyap...@googlegroups.com, ag...@rogers.com
Tareef
  I am currently mainly doing toy examples. One I am developing has a significant storage is a csv file in the 10s of megs - but I can presumably reduce this either via compression
or as an rds.
 I currently have a sports stats website based on Flash with an MS SQL backend.but was hoping to switch to a shiny site with probably a SQLite db., probaby doable as one app (albeit complicated). However, I would want to do a lot of ad hoc analyses based on the same db, which I had hoped to be able to incorporate in a kind of rMarkdown blog. It would be nice to access the same large SQLite db rather than deploy it with each app or have to do some preprocessing locally and deploy say a csv file with the data relevat to the blog entry 
Reply all
Reply to author
Forward
0 new messages