Twitter Likes Count Design | Youtube Views Count Design | Near Realtime Counter System Design

preview_player
Показать описание
Youtube Views Count Design | Twitter Likes Count Design | Near Realtime Counter System Design - In this video, I am discussing how to design a near realtime counter for counting systems like:
- Twitter Likes Count
- Youtube Views Count
- FB/Instagram Post Views Count
- FB/Instagram Post Likes Count
- Live Streaming View Count

Check out our following articles:

#SystemDesign #DistributedSystems #FAANG #Facebook #Google #Amazon #Apple #Microsoft #Uber #Netflix #Oracle #Lyft #Interview #ComputerProgramming
Рекомендации по теме
Комментарии
Автор

Let me know if you find this video useful. And please don't forget to like the video and subscribe to this channel. Thanks :)

ThinkSoftware
Автор

i would choose eventual consistency in this case, because the exact number is not that important to most users. eventual consistency will make scale of likes count easier

Wheyong
Автор

You ask many what-if questions, but answer none. You also don't justify any of your choices (such as creating the 3rd table instead of updating tweets table). This is not a quiz game; the video is not self-contained.

abhijit-sarkar
Автор

I have seen a lot paid and free courses on youtube. But luckily I have came across your channel recently when searched parking lot problem.
Keep up doing the good work. Hats off sir.🙌

bipulmishra
Автор

13:47 if you use kafka and your consumer manually commit offsets, then after consumer died zookeeper will re-arrange topics and assign the topic to another consumer. new consumer will continue from last comimted offset. considering that, we may want to put all the updates regarding the batch into single transaction, rather than do atomic updates for every tweet.

yjeeeek
Автор

your questions in this video is quite intuitive. i am sure by asking right questions many will be able to think in terms of solving problem while continuing watching.

manmohanmundhraa
Автор

Excellent and thought provoking, I like your teaching style where you answer and give thought provoking questions.

code-master
Автор

Thanks for covering the breadth of the different solutions. You started with brute force and worked up to suggest some kind of an optimal solution. However, rather than telling the "WHY" part of choosing a design pattern - you are leaving it up to the viewers to interpret and decide. Would have definitely subscribed and liked your content for wholesome information and depth.

rahulanand
Автор

so I am not sure how things are concluded. is the cache going to hold counters for all of the history that ever exists? and there's two types of consumers? one that writes individual like records to DB and one that stream aggregate and update increments to the Distributed cache?

davidoh
Автор

Great video! precisely what's needed for interviews, thank you sir. But I was left with the doubt of what to do If a consumer dies in the middle of processing a like. I guess the answer is that Messages in a queue can be re-tried?

jlecampana
Автор

06:50
A service should be responsible for single task, so we must create a separate service for tweet likes.
Assumption is that tweet create service have a less load but tweet like service has huge load so we can scale those services separately

shubhamsoni
Автор

A question about write-through cache to distributed cache at 14:09. will redis node die before responding to MQ, will a single record be counted multiple times in this case?

yujiahe
Автор

Appreciate 👍for sharing. Approach with likes in separate service looks better for me.

andriidanylov
Автор

regarding adding a field to. tweet table vs like count table, i would choose like count table, the reason is that it will reduce a lot writes/update the tweet, otherwise it could be a performance issue. I would like to hear what you think?

Wheyong
Автор

A question about the example sql queries done at 11:20: is the "SELECT ... FOR UPDATE" statement still needed here when the UPDATE query would trigger an exclusive lock on the Tweet_Likes_Count row for tweetId "abcdefghij" anyway?

ss_lemonade
Автор

one corner case that you have not taken up sir
what if a person again clicks on the like button to dislike the tweet
how will you remove the like?

gmmkeshav
Автор

I want to thank you for your video, but i am a bit disappointed at the way you ended the video abruptly. You did not complete the video and close the question in discussion. It seems like you have a paid service somewhere you answer all these questions or are preparing that for future. Kindly share your thoughts.

gurmeetchawla
Автор

Hey...I loved your videos, they are really helpful. Special thing is you ask a lot of questions during explanation and open my mind to think beyond one way of thinking. My question is - where do you discuss these questions which you ask in your videos? Many thanks... wishing you good health and wealth 😊

beinspired
Автор

Wish that you say less about stuff everyone already known

genteka
Автор

Every tweet will have the tweet_like_count field. Shouldn't we add the tweet_like_count field to the existing Tweets table? What are the pros of creating a new table?

i-am-darshil