System Design Interview: Architecture of Amazon, Flipkart like e-commerce system with

  Рет қаралды 286,739

sudoCODE

sudoCODE

Күн бұрын

Gaurav Sen, the systems design and competitive programming expert have been nice enough to sit down for a System Design Interview where he goes on to design an ecommerce system in an interview like setting.
Follow Gaurav Sen on KZfaq: / @gkcs
To become a 10x engineer, follow his amazing course here: get.interviewready.io/
------------------------------------------------------------------
Recommendations
------------------------------------------------------------------
Our full courses on youtube:
✒ System Design Primer Course: • System Design Primer C...
✒ REST APIs made easy: • REST APIs MADE EASY
Some paid courses that we recommend:
✒Educative.io: bit.ly/3qnW5ku
✒Interviewready.io: get.interviewready.io/ (Use coupon code SUDOCODE for extra discount)
------------------------------------------------------------------
About Us
------------------------------------------------------------------
Created and Instructed by:
Yogita Sharma
✒ LinkedIn - / yogita-sharma-83400b55
✒ Instagram - / sudo.code1
✒ Facebook - / sudo.code
✒ Medium - / yogita088
Post-production(editing, thumbnail etc) managed by:
CiKi
✒ Website: www.ciki.co.in
✒ LinkedIn: / 74735937
Colors and design by:
Naini Todi
✒ LinkedIn - / nainitodi
Both Arpit and Yogita are software engineers and want to help other software engineers become better by providing high quality and well researched content by adding their creativity and teaching twist.
------------------------------------------------------------------
Join Us
------------------------------------------------------------------
Hangout with sudoCode:
✒Discord Server: / discord
For business:
✒Email: sudocode.yogita@gmail.com

Пікірлер: 180
@ayasswain
@ayasswain 2 жыл бұрын
For the first time Gaurav looked bit nervous in his videos as he was the candidate here and Yogita looked confident :-) . For the inventory design part I feel Gaurav should have started with the Source of Truth itself i.e how to store the items data either in a RDBMS or in a No-SQL DB like Mongo DB or Cassandra rather than starting to think about Elastic Search for the searching part first. Always start from DB side and then move upwards in the system's layers. Very nice video.
@subhadeepmandal2221
@subhadeepmandal2221 Жыл бұрын
But for a system designing first we need to look into the matter as customer centric rather than an engineer centric way. Although he appeared here for a low level solution architect but to give this discussion the initial perspective, high level search requirements needs to be put into table at the beginning. Engineering details should come once we delve deeper into technical details.
@g_pazzini
@g_pazzini 7 ай бұрын
yes. he looks nervous this time…
@cristianouzumaki2455
@cristianouzumaki2455 2 жыл бұрын
This was an amazing interview. The interviewer asked some really good questions and Gaurav was able to explain things from all angles. Thanks for collaborating. My first video on this channel and already subscribed.
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 2 жыл бұрын
Finally , Thanks a lot for the most awaited video on full system design , Please also introduce some LLD questions as well . Thanks a lot for such an amazing content.
@itssantanu
@itssantanu 2 жыл бұрын
This was really a good discussion , really liked it. Since you have emphasized more on inventory, I was waiting your explanation, "how inventory can be managed in a distributed system" which is essentially adding an existing products, consuming this products, locking on data and provide correct inventory while user search on this product. If you can create some thing details on inventory would be awesome. Also don't forget to build another video on event-driven approach for this same use case. Lastly thank you both of you for your effort to help people.
@niesh20us
@niesh20us 2 жыл бұрын
Thank you guys without editing any part of it . Thanks for being realistic :)
@dhananajaykrishna8259
@dhananajaykrishna8259 2 жыл бұрын
It was really cool to see Gaurav clarifying the requirements and making sure that Yogita is also on the same page. Also the way Yogita was explaining the scenarios and driving the interview was truly awesome. Thanks for the video!!!
@lakshanperera6634
@lakshanperera6634 2 жыл бұрын
Thank you for the awesome video Yogita and Gaurav! Waiting for more valuable contend! Cheers!
@Andre-mi6fk
@Andre-mi6fk 2 жыл бұрын
Why didn't I find this sooner!!!!! This is amazing content! I just love systems engineering/design.
@sudocode
@sudocode 2 жыл бұрын
Welcome 🎉
@sounishnath513
@sounishnath513 2 жыл бұрын
Thanks for the interview itself. It was so much insightful at the same time so much fun to watch, also many concepts are covered up in the smartest manner. Thanks once again to both of you. Gods Of Systems Design 👨🏻‍💻🥰
@MohammadbinIsmail
@MohammadbinIsmail 2 жыл бұрын
Yogita can refer us in Careem and Gaurav in Uber 😉
@theSDE2
@theSDE2 2 жыл бұрын
loved it. Always get to learn something from you two.
@antarakundu3380
@antarakundu3380 2 жыл бұрын
Great video and many many things got clear. Another thing that we could cover in the debugging part is when 2 or more user purchases the same product and quantity of the product was 1. So some sort of locking would work!.
@JH-zd6en
@JH-zd6en 3 ай бұрын
This popped up on my feed and I actually enjoyed watching it. It's a realistic interview where the interviewer can ask some unexpected questions that make you nervous. Gaurav is pretty experienced but he's also nervous here. It's better than watching rehearsed System Design videos.
@MohammadbinIsmail
@MohammadbinIsmail 2 жыл бұрын
Interesting so many details covered , thanks a lot 🙏 @Gaurav and @Yogita
@gauravpandey599
@gauravpandey599 2 жыл бұрын
Fan of both of you! TikTok design was way awesome, you started with monolith and scaled it for DAU. Thanks to both of you for system design lectures, I got selected in PayPal as SDE-2. My system design round was awesome because of some great contents you guys have created. 🙂
@MohammadbinIsmail
@MohammadbinIsmail 2 жыл бұрын
Yogita can refer us in Careem and Gaurav in Uber 😉
@nammi895
@nammi895 2 жыл бұрын
Bhai low level design kha se kari. Aur ye machine coding round ka kaise kara
@vladd3172
@vladd3172 Жыл бұрын
Looks very like a real interview, thank you very much guys!
@SidUdgata
@SidUdgata 2 жыл бұрын
So much learning at least for myself ! Cheers to you, guys 🍻
@rick-kv1gl
@rick-kv1gl 2 жыл бұрын
love it. u guys do great job of educating ppl like myself.
@suvadeepmajumdar7804
@suvadeepmajumdar7804 2 жыл бұрын
We were using Magento as CMS and were pumping data to Elasticsearch for indexing within fixed intervals.
@eeyore345
@eeyore345 2 жыл бұрын
Very realistic video. :). It goes to show that regardless of how well you can do a design on your own, once you get into the interview situation, you get nervous and then you often times make mistakes that you would have never done on your own. :)
@g_pazzini
@g_pazzini 7 ай бұрын
true.. it gives me confidence to my onsite interview tomorrow…
@gautampatil4833
@gautampatil4833 2 жыл бұрын
Thanks alot Didi . Thanks for your system design course . I have learnt alot of system design from your vidoes . Btw your teaching is really good.
@tejendrapatel718
@tejendrapatel718 2 жыл бұрын
This design still need some parts which is essential. 1) Space estimates and capacity estimates 2) DB design which cover store link of photos, videos etc 3) Monitor metrics need proper name like QPS, error rate, latency(50% , 75% , 90% percentile) 4) data partition 5) High level design with LB, Cache etc
@shridhar_rao
@shridhar_rao 2 жыл бұрын
They had Time constraints I guess.
@sayantanbhaduri3874
@sayantanbhaduri3874 2 жыл бұрын
Yes definitely....but yes the interview will be only 45 min so they have skipped many things. But when candidates will prepare they need to think about every part because you never know in which part interviewer will be interested
@koeber99
@koeber99 Жыл бұрын
@@sayantanbhaduri3874 This!! Depending on the job/Interview they may not care Caching, LB or NoSQL (new Start up). Unfortunately, "we" have to know about everything. Some Interviewers may just ask very detail questions on DBs or spend 20 mins on Networking protocols. The questions could be based on your resume only. The list goes on!!!
@AbanoubAsaad-YT
@AbanoubAsaad-YT 2 жыл бұрын
Really great! Thank you so much :)
@hedu911
@hedu911 4 ай бұрын
Wow good interview session, I really liked how she asked those questions that makes you think whether you are doing things right or not.
@adewumisunkanmi5593
@adewumisunkanmi5593 2 жыл бұрын
This is wonderful and so insightful. Thanks
@abhishekdutta8481
@abhishekdutta8481 2 жыл бұрын
Both of you have done better videos . This unfortunately is not one of your best . But appreciate the effort you guys took . Thanks for that .
@sudocode
@sudocode 2 жыл бұрын
We will keep trying to do better.
@kamalsmusic
@kamalsmusic Жыл бұрын
ES also shouldn't be used as a source of truth since writes go in-memory first before they are flushed to disk, making ES less durable than a regular database
@batteryrocks1
@batteryrocks1 2 жыл бұрын
This actually gave a feel of system design interviews, liked it a lot. Just wanted to clear a doubt regarding the search use case. Shouldn't SOLR be a better option here instead of elastic search as the search items which are the products related data would be mostly static?
@JaskaranSingh-yo6sz
@JaskaranSingh-yo6sz Жыл бұрын
For text searches we use elastic or Solr
@manideep6814
@manideep6814 2 жыл бұрын
This is a great video and the content overall is exceptional. Earned my sub !
@sudocode
@sudocode 2 жыл бұрын
Thanks Manideep
@shivangigupta8691
@shivangigupta8691 2 жыл бұрын
To Be Honest! In my real experience, interviewer was never listening to me while I just say I will use Elastic Search let say... They would dig deeper into every how. And always complicate even simplest thing. I remember in one of my interview where most of the part was spend on HOWs of loadbalancer.... For me this is not even close to how my system design interviews went 😪
@surabhijaiswal3194
@surabhijaiswal3194 Жыл бұрын
second you !! not even remotely close
@parijatbandyopadhyay8057
@parijatbandyopadhyay8057 2 жыл бұрын
Simply awesome :)
@jyotir124
@jyotir124 2 жыл бұрын
insightful and fun at the same time. I laughed a lot along with learning :)
@sudocode
@sudocode 2 жыл бұрын
Thanks Jyoti
@soumyadipchatterjee2267
@soumyadipchatterjee2267 Жыл бұрын
I guess Auto scaling feature might be highlighted in this blog once . Elastic Search the unique one I found & Product ID & Image Id description is also great to hear .
@amitupadhyay6511
@amitupadhyay6511 2 жыл бұрын
good job, now please made these in depth videos for adding and removing items in cart and delivery tracking, This seems part one of a super awsome anime series.
@sekhafrid3459
@sekhafrid3459 2 жыл бұрын
Great mock interview 💜 I didn't even see the timer and think I am also there at the same page.
@imtiazr2874
@imtiazr2874 2 жыл бұрын
Gaurav great presentation! Yogita your videos are always much appreciated and your way of simplifying and relaying information is like no other! I would love to see your system design solution for this requirement if not too much trouble :) Once again thank you both!
@kuldeeparya504
@kuldeeparya504 4 ай бұрын
Very nice discussion! Gaurav very well maintained balance between product focus and diving too deep in details; In other words - zoom in and zoom out during the discussion is amazing. Also, questions from Yogita are very pragmatic and based on real world scenarios & challenges.
@deepakp2936
@deepakp2936 Жыл бұрын
Hi Yogita, Was the functional and non-functional requirements part missed in this video?
@BiharGaurav
@BiharGaurav 2 жыл бұрын
What another service can be used for storing the product images apart from S3 or any cloud storage as they are charging much for the data transfer?
@rajeshseptember09
@rajeshseptember09 8 ай бұрын
Great video. But please keep in mind, you cannot keep adding items to Elasticsearch and expect it to reflect immediately. As Elasticsearch index needs to be rebuilt inorder to reflect the newly added items since the last index build. May be we can periodically rebuild the index and while it is down for that period, serve the response from a slave node of Elasticsearch.
@amitbansal7754
@amitbansal7754 2 жыл бұрын
A really good video. Thanks for sharing.
@somakkamos
@somakkamos Жыл бұрын
Great video. One question though…arent the images served from cdn.?or typicAlly always frm backend file store?
@vijaybabaria3253
@vijaybabaria3253 2 жыл бұрын
Gaurav, you have not failed, bro … even if you do, we love you and your content.
@sudocode
@sudocode 2 жыл бұрын
Yeah. We love him too :)
@awwwkshay
@awwwkshay 7 күн бұрын
I love the videos you do with people but please choose the people you are doing the interview with carefully. VIdeos that you have done with Gaurav Sen are great because both of you have great knowledge about the topic. Please don't pollute your videos doing interviews with people who are just trying to prove they know but they don't. This video actually helped me learn a lot. It was a very relevant video even after 2 years of it being created. Also please try to go into more detail or make a playlist for this type of problem which are lengthy.
@lehandro69
@lehandro69 2 жыл бұрын
This is very good. Thanks
@chrajeshdagur
@chrajeshdagur 2 жыл бұрын
wonderful smile at starting :)
@petar55555
@petar55555 9 ай бұрын
Great discussion, but not great as an interview due to the lack of structure and missing important pieces like: did not discuss non functional reqs, dove too deep in some areas but missed complete components to talk about. Time management needs to be accounted as well get the full system high level design, then detailed system design and then ask the interviewer where do they like to deep dive
@jawwaddanish6196
@jawwaddanish6196 4 ай бұрын
yogita, gaurav. Thankyou, thankyou soooo much. you can't believe what this video has given me in my career. God bless you both. allah aap dono ko salamat rakhay. ❤❤❤❤
@deepusasidharan2012
@deepusasidharan2012 2 жыл бұрын
Fantastic Explanation
@suchitkumar2891
@suchitkumar2891 2 жыл бұрын
It is so real. Seems Gaurav is bit nervous !!
@himanshigoyal5829
@himanshigoyal5829 2 жыл бұрын
If only design interviewer are that descriptive. I can always add two lines to descriptive questions but the whole point of this interview is to come up with problems, tradeoffs, solutions ourselves. No cache? no images? Monitor metric names look so naive.
@jhanvidattani8196
@jhanvidattani8196 5 ай бұрын
Hi Yogita, Instead of considering RDBMS as a single source of truth, can we remove RDBMS and instead make a cluster of ElasticSerah and make it a single source of truth? By doing this we can remove the overhead of updating RDBMS and ElasticSearch at the same time. The other services can read from the slave/master ES instance and user service can read from master/slave?
@ganjirao7094
@ganjirao7094 2 жыл бұрын
metrices can be built by Prometheus, Grafana stack.
@upengan78
@upengan78 2 жыл бұрын
Can you use serverless for any specific purposes /functions in this design?
@ayushjindal4981
@ayushjindal4981 2 жыл бұрын
superb!!
@rambo4014
@rambo4014 2 жыл бұрын
I wish you guys were there earlier
@atulkumar-bb7vi
@atulkumar-bb7vi Жыл бұрын
Nice, What about image of different sizes for preview and thubnails. We should store them separately. Or change size within a service using server code so that to make sure that we are not sending high resolution images in product catalog.
@hasanfuad6631
@hasanfuad6631 2 жыл бұрын
Thank you Yogita and Gaurav. Both of you're awesome. Take so much love from Bangladesh.
@rodoherty1
@rodoherty1 2 жыл бұрын
You should do this collaboration again!
@ryan-bo2xi
@ryan-bo2xi 2 жыл бұрын
28:40 she is asking how to check slowness of queries and bhaiya is explaining about heart beats
@Gingeekrishna
@Gingeekrishna 2 жыл бұрын
Why RDMS I feel we can go with DynamoDB. We can scale more when we go for large data
@reshusingh6005
@reshusingh6005 2 жыл бұрын
Is S3 the S3 bucket on AWS ? @sudocode plz clarify or some other kind of similar storage service?
@sudocode
@sudocode 2 жыл бұрын
Yes
@prathameshparanjape405
@prathameshparanjape405 2 жыл бұрын
Liked the tiktok video more. Thanks for it!
@sumankalyanghosh4838
@sumankalyanghosh4838 2 жыл бұрын
what you will do incase of hotSKU sells / flash sale / mega sale where you will have only few stocks and there are millions of customers are searching for same. How do you show correct inventory ?
@priyankverma7434
@priyankverma7434 7 ай бұрын
A little misleading, the beginning was a bit off. The interviewer won't be telling this much in the beginning. A viewer should keep in mind that this is not a mock interview.
@mukulmishra2884
@mukulmishra2884 6 ай бұрын
Monitoring -Instead of the cron job, let's define the status as processed and fire event if the processed status is not updated within a timestamp. Also sending slack message to fire event notification cannot be considered for bulk jobs as it will consume the resources of the system. Alerts can be added using platforms like datadog. Health check every 5 seconds - Rather let's have a dead letter queue for failed event and fire an alert if the queue gets failed record. It will save the system resources.
@suvadeepmajumdar7804
@suvadeepmajumdar7804 2 жыл бұрын
Another question could have been how to handle image optimization for better page metrics
@GauravSharma-wb9se
@GauravSharma-wb9se 2 жыл бұрын
you guys are talking about start development with monolith design but different deployment for each service.....so i want to understand if you are deploying individually then how it can be monolith application ?
@vishalmishra7018
@vishalmishra7018 2 жыл бұрын
Can you make a video about how elastic search works?
@robinmahato
@robinmahato 2 жыл бұрын
great big fan
@cosmicwhisperss
@cosmicwhisperss Ай бұрын
One feedback gaurav your videos are amazing just that white board makes it difficult to watch because of lightings If possible could you do something about it like use a tablet or online tools that will help better to see it visually and follow along
@ssuriyaprakash1
@ssuriyaprakash1 2 жыл бұрын
3:56 I spot an error he said "denormalize" and then went writing a normalized image catagory table .... think he tried to say normalized image details from product table
@abhishekvarma3529
@abhishekvarma3529 2 жыл бұрын
Amazing content. Love you both. Have a question here since select * like %string% does a Full table scan. Is not the optimum solutions when you are talking about a huge inventory. Is there a better optimised way to do that?
@Andre-mi6fk
@Andre-mi6fk 2 жыл бұрын
I thought the same. Would be interesting to hear the remarks on this.
@josephnduati1214
@josephnduati1214 2 жыл бұрын
Does that do a whole table search or rather a single column in a table..?
@vikasveerapur
@vikasveerapur 2 жыл бұрын
where clause had name & description columns where name was supposedly indexed in which case the SQL optimiser will not go for a full table scan due to the presence of a indexed column.
@ajaypatidar
@ajaypatidar 2 жыл бұрын
Thank you for nice videos, can you make a video on system design on Forex trading platform where live exchange rates and instant order execution is a must requirement
@gamezpedia
@gamezpedia 3 ай бұрын
Can you please share similar discussion or system design for Banking domain to follow? Like architecture, event driven approach, database to choose, and many more things.
@manojsethi6040
@manojsethi6040 2 жыл бұрын
In the 1st half the interviewee confused, didn't stick to, but in 2nd half you clicked and brought the climex :)
@josephbiehl7435
@josephbiehl7435 2 жыл бұрын
Locking on data and provide correct inventory while user search on this product.
@mayursen9523
@mayursen9523 2 жыл бұрын
Please have vedios on data centers.
@MiteshBDesai
@MiteshBDesai 6 ай бұрын
What about short video retrieval of the product when the consumer searches for a product ? Will it come from S3 directly to the user's front end ? How will you address latency issues of video retrieval ? Also , what about product reviews by the consumers ? I feel , the MVP should have at a basic feature for product review for any E-Commerce solution .
@vgupta4760
@vgupta4760 2 ай бұрын
How many 1st of all do you have?
@gargichakraborty3154
@gargichakraborty3154 Жыл бұрын
What do we do if the payment is done but PayPal fails to send a response? We have the status "purchasing" and it gets stuck there. How do we finally send a success response to the customer?
@tarun7597
@tarun7597 2 жыл бұрын
In mysql, Indexing does not work if you are using "%TEXT%"
@erased1972
@erased1972 2 жыл бұрын
Why we are waiting for the RDBMS response before sending the product details to elastic search ? Way it is bad to send them together ?
@sudocode
@sudocode 2 жыл бұрын
RDBMS is the source of truth. We need to ensure a successful transaction from RDMS before we can index it in ES.
@erased1972
@erased1972 2 жыл бұрын
@@sudocode ohh .. Thanks for making these videos .. Its very helpful ..👌👌👌
@rbrohitbisht
@rbrohitbisht 2 жыл бұрын
@@sudocode I guess ES should be on a different server. Here RDBMS is the producer and ES is the consumer. Although event-driven mechanism will work fine.
@kaushiks87
@kaushiks87 2 жыл бұрын
at 19:00, I think what Yogita is asking for is CQRS
@IITianProudIndian
@IITianProudIndian 2 жыл бұрын
Enjoyed it, like the rest of the videos. Future mein agar aap hindi mein content banaoge toh bahut hi useful hoga jinko angrezi samajhne mein takleef hai. I know lot of young techies(some reporting to me) very talented, but unable to follow us to the full, when we have our meetings in English :(. Just a small suggestion, for future :). I would then defintely guide all of them to your videos as you really know how to break down complex stuff into easily digestible pieces
@chitranshsaxena59
@chitranshsaxena59 2 жыл бұрын
21:00 - I once heard in Hussein Nasser's BE engineering video, that a primary DB should never be a NoSQL DB
@sudocode
@sudocode 2 жыл бұрын
It’s not a hard and fast rule. There can be trade offs, if the org and engineers are aware of those trade offs and risks, it can be their decision at the end.
@mangeshtrimbake3170
@mangeshtrimbake3170 Жыл бұрын
Bhai ye core field walo k liye nahi. Now days commerce people also coming in these IT firms. So let it be.
@susmitvengurlekar
@susmitvengurlekar 2 жыл бұрын
I would like to appear for a mock system design interview !
@pavanka-sj8gm
@pavanka-sj8gm Жыл бұрын
I feel index will not be applicable in case if we use wild cards like %
@roopakmishra9
@roopakmishra9 2 жыл бұрын
Store image urls in dynamoDB instead of RDBMS.
@neelbhatt4396
@neelbhatt4396 2 жыл бұрын
This is the common mistake developers do. Going for monolith and thinking that it can be converted to microservices in the future. Believe me if you do not get time initially to make it microservices base, how will you get time in the future to convert? Going for MVP is the thing PO uses to put the product in the market as soon as possible but it does not mean we go with something for now and thinking it can be improvised in the future. I take interviews in Europe and believe me it does not go well always!
@powprashant
@powprashant 2 жыл бұрын
Yogita was superb though out the interview she had great insight . Not sure what happened to Gaurav, he keeps jumping one design/though over other, until chimed by Yogita. Great mock interview though 🙏
@sudocode
@sudocode 2 жыл бұрын
He was thinking out loud and that’s exactly how system design interviews take place. It’s upto the interviewer if they want to dig deep on one design or hear multiple views. He managed to cover a lot of depth in a short 45 minute interval 😊
@suryanarayansubudhi9439
@suryanarayansubudhi9439 Жыл бұрын
Cart implementation ?
@nikhilflautist
@nikhilflautist 2 жыл бұрын
the comment section of every sudocode video is extremely technical and complex. Meanwhile, Me currently learning DSA and Webdev for Campus placement:. isko toh ab jaldi finish karna padega, abhi toh bohot kuch padhna baaki hai to become a SWE. 😲
@raghavendratungaturthi1177
@raghavendratungaturthi1177 2 жыл бұрын
I am an interviewer at Microsoft I’ve done close to 500 interviews. Few things to keep in mind - there is no right or wrong answer for a System Design Question! The questions you ask for clarification matters a looot! Don’t ask just for the sake of asking. Don’t ask templated questions. Be genuinely curious! Always always focus on simplest end-to-end scenario first. Don’t try to talk about ALL optimizations at once. Keep making points like - We can have xyz optimization here, let’s come back and address it.
@coderabsolute9583
@coderabsolute9583 2 жыл бұрын
Probably, that’s why he didn’t get a job! 😉
@ajaysdigitalart3320
@ajaysdigitalart3320 2 жыл бұрын
Nice and very well explained...
@parikshithegde7477
@parikshithegde7477 2 жыл бұрын
Gaurav's annoyance with Paypal is legit, using it as a failing payment service 😂😂😂
@jspnser
@jspnser Жыл бұрын
10:10 phele chalna chaiye phir baad main dekhnge 🤣
@man904u
@man904u 2 жыл бұрын
My Feedback for the interviewer should be: "Lelo yaar " PLeaseeeee
@_ipublic
@_ipublic Жыл бұрын
11:14 how would you make this extensible if you are making monolithic in the first place? @gaurav is exposed everywhere😂
@sumeetbasu1526
@sumeetbasu1526 2 жыл бұрын
subscribed...great I found this channel...I had 1 question though referring to 17:20, so here we discuss about using an RDBMS to store new products or update the existing inventory after every purchase against a product and then merging those updates to the NoSQL DB(Elastic Search) from time to time as the NoSQL DB would be used for searching and display of products to the users real time. But what if an user searches a product, gets the details as well as the count of the stock and just after that NoSQL DB is refreshed with new update for that product from RDBMS and stock becomes 0 for that particular product. How to handle that? Would you use some distributed transactions or JTA transaction manager or something for consistency? The tradeOff definitely would be that it would slightly slow down the system.
@ACusBusConsultingSolutions
@ACusBusConsultingSolutions 2 жыл бұрын
That's where an event driven design comes handy. As stock is refreshed, user is notified about the same.
@EricStratton79
@EricStratton79 2 жыл бұрын
You don't use ES as your source of truth for stock numbers. ES just holds general details of the inventory. The RDBMS would hold the true stock numbers. While your situation is valid (stock goes to 0 after adding it to your cart) it has nothing to do with ES and it's something you have to verify at check out or by reserving stock when it's in your cart (with an expiry time). If this were my design, I wouldn't have the product service update ES directly. The product service would queue a job to update ES.
@prashantsalgaocar
@prashantsalgaocar Ай бұрын
I think the idea of going monolith to get an MVP out is a bit confusing. I would still go with a distributed system even so the team is small and we have an MVP time which is strict. Breaking down a monolith and reworking on the system after the MVP is out is not a great idea. I have seen this not work in the past and BLOATING the system and increasing the overall deployment times. I would still break this into Microservices each doing what needs to be done. Monitoring can also be done easily then
@sudocode
@sudocode 26 күн бұрын
That’s a completely acceptable approach if you have time and resources.
System Design Interview: Design Amazon Prime Video
26:53
Exponent
Рет қаралды 85 М.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 537 М.
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 45 МЛН
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 1 МЛН
I Did 850 Tech Interviews For Amazon And I Learned This
9:02
A Life Engineered
Рет қаралды 286 М.
20 System Design Concepts Explained in 10 Minutes
11:41
NeetCode
Рет қаралды 909 М.
How I Mastered System Design Interviews
10:22
Ashish Pratap Singh
Рет қаралды 116 М.
A Day in the Life of an Amazon Software Engineer
6:51
Ashish Pratap Singh
Рет қаралды 51 М.
YouTube High Level System Design with @harkirat1 !!
35:02
Keerti Purswani
Рет қаралды 89 М.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 537 М.