7 ms·
I've used .json files in place of a database before on a read-only site. It worked very well. I do believe that we over-engineer some times and use databases wh
by MatthewPhillips 14y ago
I've used .json files in place of a database before on a read-only site. It worked very well. I do believe that we over-engineer some times and use databases when flat files will do just fine.
- codewright 14y agoUsing sqlite as the "this is just an idea" phase positions you better for scale-out/build-up if it becomes necessary. Helps keep your head straight but doesn't slow you down. I say this as someone who worships Crockford for inventing JSON. I've seen too many projects get fucked hard because they used flatfiles. Edit: Seriously though, managing synchronization/atomic changes to flatfiles manually is a Bad Idea (TM). It's somewhere up there with, "I have a performance problem. I'll use pthreads!" Now you have 1,02-SEGMENTATION FAULT problems.
- MatthewPhillips 14y agoLike I said, in my case there were no changes, I only read from them. So I let the server cache the hell out of them and the entire site was fast because of it.
- IsaacL 14y agoYou're not alone. Guess which famous tech website uses flat files as a database? Hint: orange header, heirarchical comments...
- habosa 14y agoIs this true? Is there some post about this?