Dropbox seems to have a feature where it can be used as a database.

This would be really cool to use for memoized functions, that can be restored on several computers and sessions.

I have a function that is hard to compute, but the output is always just a natural number, and I wish to make Mathematica remember all computed values, between sessions and both at home and at work.

Has anyone tried this solution? What other options are there?

I think that a database or something similar is a must; a plain-text file in a Dropbox folder can be corrupted if the program crashes during writing, and it is tricky to know when to update the file.

  • 4
    $\begingroup$ If you have V10 then Dropbox is supported out the box, so it shouldn't be too hard. But the Wolfram Cloud, i.e. CloudPut, is a more natural option I think. $\endgroup$
    – C. E.
    Commented Sep 29, 2014 at 17:48
  • $\begingroup$ Of course it has it built-in, haha. Too bad my office only have V9. But the dropbox API is different from the Mathematica functions, which only work with files... $\endgroup$ Commented Sep 29, 2014 at 17:56
  • $\begingroup$ Come to think of it, you can probably use Pastebin as I did here. Their API lets you do the three basic things you might want to do: create a new data file, delete a data file and list all data files. (It's not the optimal database solution of course, but besides that...) $\endgroup$
    – C. E.
    Commented Sep 29, 2014 at 22:14
  • $\begingroup$ @PerAlexandersson, can you give details on your corruption worries and "when to update"? Have you had issues using Import/Export? We use Dropbox and Google apps, like Gsheets for online coediting, with Mathematica with no problems. Dataset size on the order of 250m LeafCount. $\endgroup$ Commented Sep 30, 2014 at 14:18
  • $\begingroup$ I was more thinking along the line of memoization, but storing computed things in the database also. Thing is, if I run a batch for computing a large set of polynomials, say, and the kernel crashes, all partial results are lost. If I append to a raw file, the file handler is still open, so there might be data loss. Besides, I think import/export on EVERY new result computed, is a bit tough on the hard-drive (and also slows down the computation immensely), although I suppose writing to a remote location is even slower... $\endgroup$ Commented Sep 30, 2014 at 19:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.