News for hackers. Stuff that matters.
Re:Why use a database instead of just saving your data to disk? by mootothemax on Sunday May 19, 2013 @03:33PM (#5734107)
Do you know if that's why user comment averages (as on our profile pages) aren't updated in real time?

Seems like that's the kind of thing which is very easy with a database and much less so with flat files.

Re:Why use a database instead of just saving your data to disk? by joosters on Sunday May 19, 2013 @04:27PM (#5734270)
It might be very easy to code with a database, but the DB still has to do a lot of behind-the-scenes work, so you might not want them updated in real time anyway. (n.b. this is all theoretical, I have no idea about the workings of HN)

You could argue that this is another plus for flat files; you have a better appreciation for what operations are hard work, whereas a 'simple' one line select/join can hide a huge performance blocker...

Re:Why use a database instead of just saving your data to disk? by Detrus on Sunday May 19, 2013 @03:45PM (#5734141)
I think everything is in RAM and backed up to disk, Redis style. Probably only keeps recent things in RAM.
Re:Why use a database instead of just saving your data to disk? by qu4z-2 on Sunday May 19, 2013 @10:12PM (#5735454)
I don't really see why that would be significantly harder with flat files.