4 ms·
It took me a long time to shake this line of thinking. Some things just won’t and don’t have to be perfect like that. You can’t store files in a DB, and you can
by dmitryminkovsky 8y ago
It took me a long time to shake this line of thinking. Some things just won’t and don’t have to be perfect like that. You can’t store files in a DB, and you can’t be atomic across multiple systems like, say, a DB and a file system. It’s better to just figure out a working solution, like content address storing your file so that retrying is idempotent, then updating your DB once you’ve stored the file.
- fvdessen 8y agoIf you content address your files then you have problems when tracking entities linking to the same file. (like email sender and recipient linking to the same attachement. Same file; different owners)
- dmitryminkovsky 8y agoI don’t think so? Whatever entity you do add to the DB can reference that content address and can determine permissions. That DB entity is what makes access to the underlying content possible. The file is garbage collected when nothing in the DB references it.