Hacker News new | ask | show | jobs
by xaritas 4695 days ago
Unless things have changed dramatically recently, Hacker News uses the file system to store comments (https://news.ycombinator.com/item?id=5229522) and it seems to work well. I can imagine a few cases where having your comments in a DBMS would be a requirement, but none of them seem applicable to situations where WordPress where one might want to use WordPress anyway.

Of course, this is guess from a priori reasoning. I would be genuinely interested if somebody tried file-based comments for a WordPress (or a similar platform) based site and it fell over or failed in some way.

1 comments

Reasonable point, insofar as it's unlike that comments will ever be joined with unrelated articles.

The main reason you'd get failures in a flat file system would be the normal reasons you get a relational database in the first place. Either you get update anomalies, or you want to compact the data into single atoms, or you want ad hoc querying rather than a specific pattern of access set in advance.

It doesn't help that until 5.6 MySQL's query planner joined on disk if you tried to join any two tables in which one or both has a TEXT field, regardless of engine and regardless of the actual fields selected.

As you can imagine, this slows things down a bit, considering that's the core join performed for single post generation. It also makes every kind of "recent comments" plugin a performance nightmare (quite aside from their cache-busting power).