R
R
Risent Veber2015-09-06 15:58:19
Ruby on Rails
Risent Veber, 2015-09-06 15:58:19

What is the correct way to implement the LIKE functionality in Rails?

How to make likes that will work quickly? Let's say, as in modern social networks.
Should I use a non-relational database? How do they generally solve such a problem, so that it is scalable?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Vakulchik, 2015-09-06
@rvakulchik

You can use the ready-made gem for this acts_as_votable .

T
TyzhSysAdmin, 2015-09-06
@POS_troi

And what can be slow in the field value increment in the database?
In general, it is not clear what fast means, by what criteria.

P
Pavel Kononenko, 2015-09-06
@premas

Used counter_cache on a big news portal. There were no brakes. But for a highload, I would still look towards Redis.

P
Puma Thailand, 2015-09-06
@opium

Well, the meaning of the rails is to use for likes, well, write on ruby ​​event machines, do not suffer from idiocy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question