3 ms·
Ask HN: Is there a description of the file layout HN uses to store data?
As far as I know, HN uses no DB and just writes all data to plain text files.
Does this still hold true?
Is there a description of the layout somewhere? I wonder if it is just one file per comment and the name is the id. And what the internal structure of those files is.
I think it would be a very interesting example of a successful Web2 style project that writes to files instead of using a DB.
- yababa_y 4y agoCurrent HN is a mystery but you can look at Anarki, which descends from its implementation, or older version of Arc. Yes, files are named by id, the contents are a sexp encoding nested tables (so, lists of lists of … key value pairs) https://github.com/arclanguage/anarki/blob/master/apps/news/news.arc https://github.com/arclanguage/anarki/blob/master/apps/news/...
- avian 4y agoThere are old copies of the source code floating around. You can study them to figure out how the data is stored. See links in this thread: https://news.ycombinator.com/item?id=28155134 https://news.ycombinator.com/item?id=28155134