I Learned a LOT LOT LOT from this SERIES. plz continue this series, Now it feels like a game to see the requirements, try to design ourselves and then see your fabulous solution.
the content in this video is better than most videos . especially those go beyond 30 mins. Excellent work. Cant thank enough for spending your precious time on showing us what a good design looks like.
Hi Soumyajit, Thanks for making this video. Efforts are commendable. I have some questions 1. User class has "Search searchObj"; Could you please help with Search class structure. 2. What is the reason for keeping searchObj in the User class? User can be searching many question at a time. 3. Could you please help with the design of search functionality? Like insert/update are less than search, then can we implement searching questions. 4. Shouldn't EditHistory class contain List of previousQuestion and updatedQuestion, as the question can be modified many times or may be you can mention that we maintain list of previousQuestion and updatedQuestion in DB but while fetching we consider only the latest. Thank you
Nice Work !! Few suggestions : 1. Users can be watching some entities and should be notified once any of the subscribed entities have any update. 2. Observer design pattern seems to be a fit for user subscriptions and notifying users. 3. Can you please explain more the pattern behind keeping searchObj in User class. Say a system to system integration happens then will the calling client be invoking search on user obj ? 4. Also any other design pattern fitting in the solution ?
I was asked one question recently in LLD . Design Workflow management platform: like tasks A -> B -> C -> E -> D -> F and if any flow have error then resume or terminate like options should be their. I purposed them spring batch jobs. For which they asked me to design without that. I failed that round. He even grilled me on topic : when to throw a exception/error and when to handle it , if you are designing a library or a framework.
Should addQuestion() be a part of User entities like Member etc or it should be in Question class? Becausing adding a question will be done by some kind of user. I am eager to here views of others on this. Kindly correct me if I am wrong.. BTW, a great video
I have same doubt. As members will be adding the questions why do we have AddQuestion() as part of question class as well? What is the significance of AddQuestion method in question class?
i also have the same opinion. I think there should be createNewQuestion function in Question class which should be responsible for returning a new question object
Nice video.Some doubts: 1. Comment should not extend entity as Comment cannot have list of Comments as per stackoverflow design.It will make things complex,? 2.In user class why do we need flag api, vote api can do this? 3.In vote entity ,wither both the flag and vote takes member or both dont.I dont see why one needs and other not.I would prefer not to pass
Yes i know, but i though technically nothing is stopping them from implementing it as many websites do allow reply over replies. Wanted to show case the same through design as i have seen quite a few interview questions around the same
@@SoumyajitBhattacharyay ok.well thats nice.It is easy to implement recursive comments then:).Can you see other two points also?I have update my comment but you replied before that:)
Also i think comment/answer should not have close operation.I dont know what does that mean.It can be deleted,but closing is only for question.How can we model this thing?
Why not consider interface segregation. Just define implement IRole interface for different roles in the system. And associate this IRole with different actions. User should what are roles he or she has. Roles should allow some action for a particular user. Basically the low level should have two types of user simpleuser assign the role Readquestion and registered user having account information. Assign required roles. Wrap the task in command like create command can create a question or comment vote command can up vote or down vote a question or answer.
Sure i will do soo. In the previous videos i had added use case diagrams. Please do check this out: ruclips.net/video/Hb6WePtPQhg/видео.html And let me know what other diagrams would you like to have. I will probably split the videos in multiple parts and add them then!
@@SoumyajitBhattacharyay Thanks, I have checked the previous videos Great work and efforts!! If possible you can try adding Class Diagram in next LLD video
Just a Question Might Sound Like a Noob in this. But Why we have stored the whole Member Object in Entity Class We can store a memberID or Instead of a GuestID we can use a UserID which is inherited and that id Can also be used to fetch the Details for the Member?
How is addComment using runtime polymorphism. Method overriding and runtime polymorphism are the same thing, here no method overriding is happening. Don't quite understand this point.
We would have to come up with requirements on our own. Understand exactly what the interviewer wants by asking clarifying questions. These are similar to day to day work, where we clarify the requirements with business by asking questions and understanding what they want!
Good Explanation. I use to learn a lot from your videos. I guess we missed one property in Answers and Question. I feel we can have List as property in both the Question and Answers class.
@Mohammad Kaif the way in c we have struct Node * which has pointer to itself in linked list definition. In java every object stores reference only, so comment has list of comment is nothing list of references, it does not matter to java.however it c, you cannot have this and you have to enforce with pointers.understood?
Hey Soumyajit, you have not provided the implementation of any functionalities (methods) in any of your LLD problem. Are we not required to do that in an LLD interview. Secondly you always adds all the functionalities in the model classes itself. Though I believe in a real LLD interview we are supposed to add the behaviours in the separate service classes instead of directly define them in the models.
Good. . Entity should have only - entityID, votes and createdDate. SINGLE responsibility principle is getting violated. creator and comments shd not be part of entity, instead it should be in the derived classes.
@@SoumyajitBhattacharyay How would you go about designing Back end for Stack Overflow. Describe your approach in a block diagram. Actually I have to this question given by someone .Please help me whatever you can help!! Ps- I know frontend by your video but don't know backend of it!!!
No not always. Only a handful of internship oppurtuinities are open for referral. Not all though. So you would have to send a number of internship job ids to see if it is open for referral
how can comment extend entity. This is wrong. your entity has list of comments. its like saying comment has a list of comments. In most your videos sometimes HAS A relationship is compromised.
Sorry but I think the model is completely out of place. User class having `getQuestions` is completely wrong IMO -- that method should exist on something like `QuestionDatabase` or something, same goes with `addTag`, `addComment`, etc
Man do you intentionally change the time of your laptop to 3am in the morning so that no one in your company points out to you when you are performing poorly (I assume this to be better case). In case you are actually doing at that time you need to rethink about your job and life
@@SoumyajitBhattacharyay great congrats. Btw It was not to offend you .I just found it weird that you were doing all (not some) videos at that time of the day because that implies you don't get time in your job which is not good for your health
I Learned a LOT LOT LOT from this SERIES. plz continue this series, Now it feels like a game to see the requirements, try to design ourselves and then see your fabulous solution.
the content in this video is better than most videos . especially those go beyond 30 mins. Excellent work. Cant thank enough for spending your precious time on showing us what a good design looks like.
Hi Soumyajit,
Thanks for making this video. Efforts are commendable. I have some questions
1. User class has "Search searchObj"; Could you please help with Search class structure.
2. What is the reason for keeping searchObj in the User class? User can be searching many question at a time.
3. Could you please help with the design of search functionality? Like insert/update are less than search, then can we implement searching questions.
4. Shouldn't EditHistory class contain List of previousQuestion and updatedQuestion, as the question can be modified many times or may be you can mention that we maintain list of previousQuestion and updatedQuestion in DB but while fetching we consider only the latest.
Thank you
Thanks for you efforts, such a nice content and learning for me. I would like to suggest "Food Vending Machine" for LLD.
Great video....keeping posting such video
Excellent explanation
Explained very well
Nice Work !!
Few suggestions :
1. Users can be watching some entities and should be notified once any of the subscribed entities have any update.
2. Observer design pattern seems to be a fit for user subscriptions and notifying users.
3. Can you please explain more the pattern behind keeping searchObj in User class. Say a system to system integration happens then will the calling client be invoking search on user obj ?
4. Also any other design pattern fitting in the solution ?
Fine! I don't subscribe that often but you earned my respect.
This channel is going places.. I still struggle with oops concepts but i guess with this series I may improve. I wish I have mentor like you 😭
this is just amazing dude. wow!!!!!!
Thanks, the way you presented this video is the best. Thanks a lot
Thanks so much for the feedback.
Do share this video among your friends!
I was asked one question recently in LLD .
Design Workflow management platform: like tasks A -> B -> C -> E -> D -> F and if any flow have error then resume or terminate like options should be their.
I purposed them spring batch jobs. For which they asked me to design without that.
I failed that round.
He even grilled me on topic : when to throw a exception/error and when to handle it , if you are designing a library or a framework.
Thanks for such nice video content. Could you please make a video on LLD of elevator ? thanks.
thanks, nice one. However stack overflow also supporting multiple language. Is it a part of the tag or there is a separate class for that?
Awesomeness level 👌
Glad you think so!
Great content of LLD of videos, could you pls also involve DB side things as well. Thanks for your efforts. It really helps!!!
i think addquestion should not be inside question entity itself and addAnswer should be in question entity. Nice work anyway!
great
Thanks for content Soumyahit. Does having addAnswer() method in Question class instead of in Answer class will it make sense?
yes i agree with you.
Thanks a lot . Your videos are amazing.
Thanks so much! Please do subscribe to the channel and share it as well.
A lot more give aways are planned for 10,000 milestone 🔥❤
Very clear explanation. Thank you for such awesome content.
It will be very helpful if you bring database design content also.
Yes i will bring them as well! 💃
Hi Soumyajit Bhattacharyay, in the Answer class we have addAnswer
Should addQuestion() be a part of User entities like Member etc or it should be in Question class?
Becausing adding a question will be done by some kind of user.
I am eager to here views of others on this.
Kindly correct me if I am wrong..
BTW, a great video
An answer or a question entity can't perform any action on its own.
They, why we should keep methods in those classes
I have same doubt. As members will be adding the questions why do we have AddQuestion() as part of question class as well? What is the significance of AddQuestion method in question class?
Sir , which language is best suited for low level system design acc to your experience... Java or c++
python
One question, in the stackoverflow video, where did we use polymorphism?
Thanks.
addComment()
Comments can be added to a question, an answer or to a comment itself. So its behavior is changing while the action
is same
I have a question.
Here Admin can also block a moderator.
But you have taken to delete only member.
Great video! We can also add a topic class here, as questions posted belong to certain topics, or are we considering tags and topics to be same?
Kind of. Here tags are like the tags that we can add that will tell what are covered in this question. It will make search easier for the end user
1) Hi Sowmyajit, I don't understand the part why we need addQuestion() in Question class. I belive addQuestion is already present in Member class.
i also have the same opinion. I think there should be createNewQuestion function in Question class which should be responsible for returning a new question object
In EditHistroy, previousQuestion and updatedQuestion should be String, i think, because Question already has a list of EditHistroy.
It's been a while now. Please upload LLD videos. These are really useful
Do you need addAnswer in Answer class and addQuestion in Question class? Won't it just be taken care by the constructors of those respective classes ?
Nice video.Some doubts:
1. Comment should not extend entity as Comment cannot have list of Comments as per stackoverflow design.It will make things complex,?
2.In user class why do we need flag api, vote api can do this?
3.In vote entity ,wither both the flag and vote takes member or both dont.I dont see why one needs and other not.I would prefer not to pass
Yes i know, but i though technically nothing is stopping them from implementing it as many websites do allow reply over replies.
Wanted to show case the same through design as i have seen quite a few interview questions around the same
@@SoumyajitBhattacharyay ok.well thats nice.It is easy to implement recursive comments then:).Can you see other two points also?I have update my comment but you replied before that:)
Also i think comment/answer should not have close operation.I dont know what does that mean.It can be deleted,but closing is only for question.How can we model this thing?
hey, can you tell me above point? I think votetype is not same for question/answer/comment as i told above, it changes the design completely
Why not consider interface segregation. Just define implement IRole interface for different roles in the system. And associate this IRole with different actions. User should what are roles he or she has. Roles should allow some action for a particular user. Basically the low level should have two types of user simpleuser assign the role Readquestion and registered user having account information. Assign required roles. Wrap the task in command like create command can create a question or comment vote command can up vote or down vote a question or answer.
Can you add some diagrammatic representations in your LLD videos
Sure i will do soo. In the previous videos i had added use case diagrams.
Please do check this out: ruclips.net/video/Hb6WePtPQhg/видео.html
And let me know what other diagrams would you like to have. I will probably split the videos in multiple parts and add them then!
@@SoumyajitBhattacharyay Thanks, I have checked the previous videos Great work and efforts!! If possible you can try adding Class Diagram in next LLD video
I am wandering how can Entity have List since comment is also a entity...I mean how can a parent class have child class?
Can u add a video on class Diagram?
Just a Question Might Sound Like a Noob in this. But Why we have stored the whole Member Object in Entity Class We can store a memberID or Instead of a GuestID we can use a UserID which is inherited and that id Can also be used to fetch the Details for the Member?
Shouldn't the "Member" class hold,
addQuestion() and
addAnswer() and
addComment() api?
exactly !!!!
Can you please make video on Blackjack game? It will be very helpful
Thanks
Which design pattern have you followed in this..
Can you please help with LLD for currency converter?
When to implement open close principle
Why addAnswer in Answer class as well as in Member class.
If you could tell me please help.
I will be grateful.
Make more videos which help us to grap top MNCs
Surely! Please do suggest what different kinf of videos would you want me to make???
@@SoumyajitBhattacharyay videos on motivationl for tier 3 students and tips and tricks to get shortlisted and muchh more.
Why do we need addComment in entity class because members class already has tht function which would take entity as input
Create a video for ELEVATOR design.
How is addComment using runtime polymorphism. Method overriding and runtime polymorphism are the same thing, here no method overriding is happening. Don't quite understand this point.
In the Entity class, there is a flagEntity API, but the class does not have any attribute related to "flag". So, what's the functionality of that API?
Please create system design playlist
Yes that is next in my charter!
Will requirements be given in our interview or do we have to come up with our own requirements and discuss with interviewer?
We would have to come up with requirements on our own. Understand exactly what the interviewer wants by asking clarifying questions.
These are similar to day to day work, where we clarify the requirements with business by asking questions and understanding what they want!
@@SoumyajitBhattacharyay 👍 thanks
Design a Traffic Controller System
Good Explanation. I use to learn a lot from your videos.
I guess we missed one property in Answers and Question.
I feel we can have List as property in both the Question and Answers class.
its there in parent class :)
@Mohammad Kaif the way in c we have struct Node * which has pointer to itself in linked list definition. In java every object stores reference only, so comment has list of comment is nothing list of references, it does not matter to java.however it c, you cannot have this and you have to enforce with pointers.understood?
Hey Soumyajit, you have not provided the implementation of any functionalities (methods) in any of your LLD problem. Are we not required to do that in an LLD interview. Secondly you always adds all the functionalities in the model classes itself. Though I believe in a real LLD interview we are supposed to add the behaviours in the separate service classes instead of directly define them in the models.
Please correct me If I am wrong.
@@tusharrawat8768 you generally don't implement the method unless asked
Good. .
Entity should have only - entityID, votes and createdDate. SINGLE responsibility principle is getting violated.
creator and comments shd not be part of entity, instead it should be in the derived classes.
How to run these code?
There was no main function
Bhaiya Can you please help in block diagram of backend of stack overflow??
Sure do tell me what do you want exactly
@@SoumyajitBhattacharyay
How would you go about designing Back end for Stack Overflow.
Describe your approach in a block diagram.
Actually I have to this question given by someone .Please help me whatever you can help!!
Ps- I know frontend by your video but don't know backend of it!!!
So ek block diagram aur thoda explaination is needed for this
Can you please make an video about how to apply for amazon student internships
reach out to any recruiter or get a referral ,search on amazon jobs for relevant job opportunity
@@ajayyadav-ob4gd will it work for internships in college too?
No not always. Only a handful of internship oppurtuinities are open for referral.
Not all though. So you would have to send a number of internship job ids to see if it is open for referral
@@SoumyajitBhattacharyay oooh thankx for the info❤️
You have already inherited userid from User class, i think no need to mention account id in account class.
how can comment extend entity. This is wrong. your entity has list of comments. its like saying comment has a list of comments. In most your videos sometimes HAS A relationship is compromised.
Sorry but I think the model is completely out of place. User class having `getQuestions` is completely wrong IMO -- that method should exist on something like `QuestionDatabase` or something, same goes with `addTag`, `addComment`, etc
Man do you intentionally change the time of your laptop to 3am in the morning so that no one in your company points out to you when you are performing poorly (I assume this to be better case). In case you are actually doing at that time you need to rethink about your job and life
Performing quite good in my job. Just got transitioned into Engineering Manager at Amazon and yes i record videos at that time
@@SoumyajitBhattacharyay great congrats. Btw It was not to offend you .I just found it weird that you were doing all (not some) videos at that time of the day because that implies you don't get time in your job which is not good for your health
@@nikhilchauhan2318 no mostly that's the quietest time of the day! 😛
too much useless talks...please avoid that