Suggestions on mechanism or existing code - maintain persistence of file download history
Dan Sommers
2QdxY4RzWzUUiLuE at potatochowder.com
Thu Jan 30 08:11:01 EST 2020
On Thu, 30 Jan 2020 23:34:59 +1100
Chris Angelico <rosuav at gmail.com> wrote:
> ... I wasn't advocating for the use of a database; my first and
> strongest recommendation was, and still is, a stateless system wherein
> the files themselves are the entire indication of which documents have
> been downloaded.
Yes, I like stateless systems, too, but that system isn't stateless. As
I understand the problem of a "crudely persistem download manager,"
there's a collection of to-be-downloaded URLs (which may be empty) and
some data that's been downloaded (which may also be empty). You can
certainly encode a lot of that directly in the file system, but it's
still state.
Using a database instead solves a lot of the tricky bits that the bare
file system doesn't (which is what ChrisA said in what I snipped). It's
just Greenspun's Tenth Rule with the words C, Fortran, and Common Lisp
crossed out and Python and ACID Database written in crayon.
Dan
--
“Atoms are not things.” – Werner Heisenberg
Dan Sommers, http://www.tombstonezero.net/dan
More information about the Python-list
mailing list