Тёмный

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

Think Software
Подписаться 30 тыс.
Просмотров 17 тыс.
50% 1

RU-vid 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
- RU-vid Views Count
- FB/Instagram Post Views Count
- FB/Instagram Post Likes Count
- Live Streaming View Count
Distributed System Design Interviews Bible | Best online resource for System Design Interview Preparation is now online. Please visit: www.thinksoftwarelearning.com?RU-vid-tweet-likes-count
Please follow me on / think.software.community if you like to get notified about new course chapters getting added or any other updates. I will also take your suggestions there about the course and the channel.
Check out our following articles:
- How to Ace Object-Oriented Design Interviews: / how-to-ace-object-orie...
- Elevator System Design - A tricky technical interview question: / elevator-system-design...
- System Design of URL Shortening Service like TinyURL: / tinyurl-design-from-th...
- File Sharing Service Like Dropbox Or Google Drive - How To Tackle System Design Interview: / how-to-tackle-system-d...
- Design Twitter - Microservices Architecture of Twitter Service: / design-twitter-microse...
- How to Effectively Use Mock Interviews to Prepare for FAANG Software Engineering Interviews: / how-to-effectively-use...
- Robinhood Backend System Design - How to receive realtime stock updates: / robinhood-backend-syst...
- Payment Gateway System Design - How does the Stripe work: / payment-gateway-system...
- Grokking the Product Design vs. System Design Interviews: / grokking-the-product-d...
- Selecting the best database for your service: / selecting-the-best-dat...
#SystemDesign #DistributedSystems #FAANG #Facebook #Google #Amazon #Apple #Microsoft #Uber #Netflix #Oracle #Lyft #Interview #ComputerProgramming

Опубликовано:

 

24 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@ThinkSoftware
@ThinkSoftware Год назад
Let me know if you find this video useful. And please don't forget to like the video and subscribe to this channel. Thanks :)
@AnkitJain-ln7gx
@AnkitJain-ln7gx Год назад
This is nice explanation. I would like to see design of digital wallet which cover transfer, topup and withdrawal usecase and talks about concurrency and data consistency for users..
@Wheyong
@Wheyong Год назад
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
@code-master
@code-master 7 дней назад
Excellent and thought provoking, I like your teaching style where you answer and give thought provoking questions.
@bipulmishra1543
@bipulmishra1543 6 месяцев назад
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.🙌
@computerscientist9980
@computerscientist9980 Год назад
excited!
@jiaweiwu9857
@jiaweiwu9857 Год назад
This is super helpful. Thanks
@yujiahe4190
@yujiahe4190 Год назад
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?
@rahul10anand1
@rahul10anand1 3 месяца назад
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.
@vikasgupta1828
@vikasgupta1828 Год назад
Thanks
@gmmkeshav
@gmmkeshav Год назад
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?
@heykalyan
@heykalyan Год назад
really liked your crisp explanation
@ThinkSoftware
@ThinkSoftware Год назад
Thanks 🙏
@davidoh0905
@davidoh0905 19 дней назад
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?
@beinspired9063
@beinspired9063 Год назад
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 😊
@ThinkSoftware
@ThinkSoftware Год назад
Thanks for comment 😊. I am looking at various options for that.
@andriidanylov9453
@andriidanylov9453 Год назад
Appreciate 👍for sharing. Approach with likes in separate service looks better for me.
@ThinkSoftware
@ThinkSoftware Год назад
Thanks for the comment 😊
@ss_lemonade
@ss_lemonade Год назад
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?
@ThinkSoftware
@ThinkSoftware Год назад
Yes because select and update are two different statements so it is possible that multiple threads run select in parallel and get the same value for the count and then all try to update count = count + 1. In this case, they all will change the count to the same value although it may need to be updated to count + X where X is number of concurrent calls coming at that time.
@ss_lemonade
@ss_lemonade Год назад
@@ThinkSoftware In mysql at least, I believe an update statement that does a query like "count = count + 1" would be atomic. A "select ... for update" would probably help if you needed to do additional work with the selected value afterwards, or if you wanted to update the column manually using the current selected value
@ThinkSoftware
@ThinkSoftware Год назад
It all depends on DB transaction isolation level. With serializable isolation level, it may work but not with other isolation levels.
@Wheyong
@Wheyong Год назад
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?
@ThinkSoftware
@ThinkSoftware Год назад
thanks for the comment 🙂
@abhijit-sarkar
@abhijit-sarkar 10 месяцев назад
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.
@yjeeeek
@yjeeeek 4 месяца назад
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.
@jlecampana
@jlecampana 7 месяцев назад
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?
@User-nq9ee
@User-nq9ee 6 месяцев назад
yah , data can be retrieved from message queues.
@szyulian
@szyulian 2 месяца назад
Watched. --
@gurmeetchawla8362
@gurmeetchawla8362 Год назад
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.
@ThinkSoftware
@ThinkSoftware Год назад
I do have a paid service but some of the questions could be topics for more videos.
@davidoh0905
@davidoh0905 19 дней назад
@@ThinkSoftware yeah overall good start and everything but the last bit was a big disappointment, to be honest :(
@davidoh0905
@davidoh0905 19 дней назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_b6FniEjiR4.html This video is a great supplement to the current video!!
@shubhamsoni6013
@shubhamsoni6013 Год назад
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
@i-am-darshil
@i-am-darshil 2 месяца назад
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?
Далее
НАШЛА У СЕСТРЫ СЕКРЕТИК
00:36
Просмотров 298 тыс.
Watch this before your System design interview!!
28:18
Просмотров 123 тыс.
How To Choose The Right Database?
6:58
Просмотров 297 тыс.