HN2new | past | comments | ask | show | jobs | submitlogin
Ask HN: Is there a description of the file layout HN uses to store data?
24 points by TekMol on Aug 10, 2022 | hide | past | favorite | 4 comments
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.



Current 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/...


Is there an example of such a sexp encoded post somewhere?


just run the code, it’s SO easy to find this out.


There 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://hackernews.hn/item?id=28155134




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: