djnavarro / xprmntr

Build browser-based behavioural experiments in R
https://djnavarro.github.io/xprmntr/
Other
36 stars 3 forks source link

persistent data storage options #5

Open CrumpLab opened 5 years ago

CrumpLab commented 5 years ago

It would be great if xprmntr provided some streamlined, and relatively easy ways to save data to a database, especially if the intention is to run the experiment online. I'm going to take a crack at this for a while and see what happens. There's some good suggestions on ways to do this here https://shiny.rstudio.com/articles/persistent-data-storage.html.

I also came across this https://developer.github.com/v3/, the github REST API, which suggests that data can be written to a database in a git repo...not sure what the security issues with this would be, but seems like a decent option if it is something that can be done.

CrumpLab commented 5 years ago

I got a firebase demo working https://github.com/CrumpLab/jsPsychRexamples. It's not that well documented, but the example does push the data to a firebase database that I made for this app.

At this point, if someone wanted to do this, they would have to sign up to firebase, create a new project, and then add their info to the config variable.

It seems it might be possible to use the firebase API to create new projects from the command line, and that would be super cool to add in here. Looking into that right now. For example, it would be nice to have an R function that automatically creates a firebase project, and sets the parameters for the database read/write rules etc.

CrumpLab commented 5 years ago

Got a google cloud account, and um, lots of stuff there. Not sure if there are advantages to firebase (also on google cloud) over google cloud storage. The cloudyR project has a package googleCloudStorage, checking that out (this I think what you were using in the tutorial I saw).