2

I'm wondering is there any good resource with a clear explanation of how like/dislike buttons are actually implemented in modern distributed systems like Instagram/Twitter?

I.e. we can assume that such metadata (name, size, resolution, likes/dislikes) is stored in RDBMS.

How to make it faster without the necessity of instant SQL insert on every like?

Maybe we can put this info into the cache and then start a background thread for the actual insert? Following the "write-back" cache type

1 Answer 1

1

Maybe we can put this info into the cache and then start a background thread for the actual insert? Following the "write-back" cache type

Mysql already has built-in memcached integration. Just add, set, or incr your key value pair and it will get stored to an innodb table eventually.

https://dev.mysql.com/doc/refman/5.6/en/innodb-memcached.html

Other than that, your question is too broad and the answers are too opinionated. Just update SQL until you can't do that anymore, then do some kind cached access / eventual consistency until you can't do that any more. Then federate or shard your cached access / eventual consistency solution.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.