5 ms·
Ask HN: What database does HN use?
I've looked at the arc source for HN at
https://github.com/nex3/arc/blob/master/news.arc
and don't see any references to a persistence layer.
- deleted 15y ago[deleted]
- wmf 15y agoIt's NoDB. "What database did you use? We didn't use one. We just stored everything in files. The Unix file system is pretty good at not losing your data..." http://paulgraham.com/vwfaq.html http://paulgraham.com/vwfaq.html That was about Viaweb, but I think the same philosophy continues in HN.
- idoh 15y agoHN stores everything as files in certain directories. A directory is sort of like a table, and each file is sort of like a row in that table. I think there is a directory for profiles, stories, and votes. I forget how cookie-user mappings are stored, it might be a single file or another directory. The data is stored in files, but there is a lot of caching done to make everything fast.
- Cieplak 15y agoI found this in news.arc: ;For some reason vote files occasionally get written out in a ;broken way. The nature of the errors (random missing or extra ;chars) suggests the bug is lower-level than anything in Arc. ;Which unfortunately means all lists written to disk are probably ;vulnerable to it, since that's all save-table does. I wonder if/how they have fixed this.
- pg 15y agoWe did fix it but I forget how. I know we switched to a log format for vote files. But I'm not sure if that was the fix for this problem or something we did later to improve efficiency.
- tinkerbell1 15y agoWhat makes you think this is a DB - even as a beginner am I smart enough to recognise this isn't a database - look up sql server that's datatbase - you can get youtube viseos on the tutorials and also download sql server for free to use as a back end.
- tinkerbell1 15y agoASK HN - why do I have a star by my name - how do the points work - by each comment - I still have 1 point
- tinkerbell1 15y agoASK HN - why do I have a star by my name - how do the points work - by each comment - I still have 1 point I'm still learning my way around - my attention was taken for a couple of hours by the acta protest commented on this site and on you tube - I noticed on you tube a video of someone hacking facebook - is there a point to that when people hear about it they will stop using it and it is one of the biggest sources of information spreading ?