O
O
Optimus2014-09-02 20:32:42
Database
Optimus, 2014-09-02 20:32:42

How do you like comments?

Here is an example from the ru tape:
b35b5a43f2ba14aedc794654ef52a98e.png
The same on the toaster, only here there are likes without dislikes.
Question: how and where is this data stored, in what database?
If each like is written in a muscle immediately, then with a large volume of one-time likes, everything will probably fall.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2014-09-02
Pyan @marrk2

Normal, does not fall. It's just that the servers are not small at all. Regular shared hosting will survive normally with likes.
Each post/comment has a numeric like field. +1 for like, -1 for repeat. You can also do a dislike.
This is not such a problem at all, there are more things that can hang the server.
For example, a curve request for a selection with a bunch of joins on a bunch of tables.

M
misc1, 2014-09-02
@misc1

Make a post in the table with posts, with a name like like_count, and add it there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question