TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: A hacker news like site in go which database would you use?

2 点作者 pvsukale1将近 9 年前

2 条评论

DanielStraight将近 9 年前
Hacker News doesn&#x27;t do anything nearly database intensive enough for it to matter much.<p>I would suggest defaulting to PostgreSQL for all database needs unless you have a specific reason to use something else. It is well supported on most platforms, under very active development, and has exceptional documentation.
brudgers将近 9 年前
My understanding is that Hacker News does not use a database or rather it does not use a DBMS [database management system] at all. Instead it uses the OS file system and each item lives in its own file. It might be described as &quot;flatfile&quot; and &quot;NoSQL&quot; but that sort of layers an additional layer of formality on top of the simple *NIX idea that &quot;everything is a file.&quot;<p>Anyway, until a few years ago, every item was had its own file and all the files were in one directory. But it got to the point that performance could not keep up with rising page views and Paul Graham reorganized all the items lexicographically into a file hierarchy base on item number to improve performance. But that optimization wasn&#x27;t done until it created a problem.<p>It might be an interesting exercise to try to come up with reasons why an DBMS would be a better alternative to files for Hacker News.<p>Good luck.