ProvTools / provR

GNU General Public License v2.0
7 stars 3 forks source link

Remove writing locally #57

Closed MKLau closed 6 years ago

MKLau commented 7 years ago

Writing to disk as a dump of provenance out of memory is not a long-term solution for provenance storage, as memory limits and the handling of provenance by storage or analysis applications. Also, local writing may block CRAN acceptance.

blernermhc commented 7 years ago

R provides a function called tempdir() that returns the path to the per-session temporary directory. According to CRAN rules, this is an ok place to put files. If we keep snapshots, we could put them there and only move them to a more permanent place if the user did some sort of save command, at the same time that the json itself becomes more permanent.

blernermhc commented 7 years ago

There are a couple of other places where RDT writes to files:

MKLau commented 7 years ago

Thanks Barb, I agree that the writing to the users file system is not necessarily forbidden by CRAN policy. The tempdir function may be a part of a future solution, but I am still not convinced that this mode of provenance storage via writing to disk as it is currently implemented is the longer-term solution. Verifying the provenance via the saving of the script and the graphics also seems like a short term solution.

I still think taking this feature out and designing the long term feature is the way to go.

MKLau commented 7 years ago

Oh, I just read through this thread (see link below) on the tmpdir function, and it looks like this is not a good way to go anyway. The tmp directory is automatically purged at intervals that depend on the OS.

https://serverfault.com/questions/377348/when-does-tmp-get-cleared

This is a reminder to me that developing in R is often not intuitive and seemingly easy paths are often trickier than the first pass suggests!