PHP MySql 评论系统

发布于 2024-11-19 10:14:21 字数 131 浏览 2 评论 0原文

我正在尝试为我的网站构建一个评论系统,评论系统与我们在 Facebook 上看到的非常相似,我正在尝试弄清楚 Facebook 如何如此快速地存储和检索评论,任何人都知道他们正在使用哪种技术,视图、存储过程或者我不知道的东西?

谢谢

I am trying to build a commenting system for my site, commenting system is much similar to what we see on facebook, I am trying to figure out how facebook stores and retrieves comments so fast, anyone have any idea which technique they are using, views, stored procedures or something I am not aware of??

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

倥絔 2024-11-26 10:14:21

他们已经完全定制了他们的数据结构...

在这里找到了其他用户的这些链接...

他们是这样说的:

Facebook 不使用 RDBMS 进行数据管理。

他们使用一种称为 Map/Reduce 的非关系技术,该技术包含在 Hadoop 项目中。他们构建了一个名为 Hive 的项目,用类似 SQL 的语言查询数据。他们还构建了 Cassandra,这是另一种大规模的非关系数据管理技术。

http://20bits.com/articles/data-management-facebook-style/

http://www.facebook.com/note.php?note_id=89508453919

They have completely customized their data structure...

Found these links from another user on here...

Here is what they said:

Facebook doesn't use an RDBMS for their data management.

They use a non-relational technology called Map/Reduce, included in the Hadoop project. They built a project called Hive to query the data with an SQL-like language. They also built Cassandra, another high-scale, non-relational data management technology.

http://20bits.com/articles/data-management-facebook-style/

http://www.facebook.com/note.php?note_id=89508453919

止于盛夏 2024-11-26 10:14:21

他们做了很多事情!但如果您有一个小网站,他们会做一些事情并且可能会帮助您。

  1. 使用 javascript 在按 Enter 后立即发表评论,就像 Facebook 一样。此评论未注册,但对用户来说有很好的意义。
  2. 有一个标志表明该评论已注册。 Facebook使用点赞链接进行评论,当它出现时,意味着该评论已注册。
  3. 按下 Enter 后,通过 AJAX 请求,发送评论并在响应中放置尽可能少的内容,例如仅一个“ok”,并在收到响应后显示我在上一部分中提到的注册标志。

They do a lot of things! But if you have a small site, there are some things they do and may help you.

  1. use javascript to put the comment right after pressing enter, like FaceBook. This comment is not registered, but have a good sense for user.
  2. Have a sign which shows the comment is registered. FaceBook uses like link for comment and when it appears, it means that the comment is registered.
  3. After pressing enter, by means of an AJAX request, send the comment and put as few as possible things in response, for example just an "ok", and after receiving response, show the registration flag I mentioned in previous part.
疧_╮線 2024-11-26 10:14:21

我猜他们正在将东西存储在数据库中。此外,他们还使用缓存来检索更快的结果。

i am guessing they are storing things in a database. also, they use caching to retrieve faster results.

娇女薄笑 2024-11-26 10:14:21

17% 接受率?你应该改进这一点,以便让人们继续帮助你。无论如何,因为我是个好人,所以我给你答案来帮助你解决你的问题 - 阅读:

Facebook 的新实时消息系统:HBase 将存储超过 1350 亿条消息月份

消息底层技术

17% accept rate? you should improve that in order to get people helping you anymore. Anyways, because I am such a good guy, I am giving you the answer to help you with your question - read:

Facebook's New Real-Time Messaging System: HBase To Store 135+ Billion Messages A Month
And
The Underlying Technology of Messages

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文