Parking Lot - System Design Interview Question
Вставка
- Опубліковано 12 жов 2019
- System Design interview question - Parking Lot
We cover following use cases
1. Give user ticket when he enters
2. Generate price when user exits.
We also discuss about APIs, Database model and database choice. We also discuss on how to make it distributed. We also discuss about concurrency.
Please comment on what should we cover next.
#design #parkinglot
This is a basic explanation of the service, which is good as a starting point.
However, there are many other questions that an interviewer might ask.
For example:
1. why do you need to store 10 years of parking lot information ?
2. Why do you need 3 DBs if you have only 4GB of data ?
3. How do you plan to implement the lock ?
4. What happens if a node goes down ?
....
What I liked about your video was you discussed about concurrency. I looked this question at multiple places but none actually tried to explain this. Thanks for this.
Nice & clean explanation. Fills up with good ideas from both a System Design as well as an OO Design perspective. Leaves enough room for imagination. :)
Very helpful video. Covered all the topics nicely (w/o rushing into implementation :-) ). I can suggest few more topics System design for 1. message chatting service which is highly scalable, distributed, resilient, supports encryption of message end to end (i.e. server cannot see message) 2. Photo sharing service like instagram 3. Cab booking service like uber (Given APIs for GPS/ map) 4. Book recommendation service (Video recommendation service) 5. Service to show trending topics etc
best PL system design video
Hey, I have been looking at a lot of system design questions but none of them were as simple as this and rest of your videos. It's perfect for a new grad with no prior experience. There are no unnecessary details which make it more confusing. Thanks a lot
You are simply amazing!
Thanks for using easy-to-understand and simple language. Just a suggestion if you can add a link of the PPT/PDF that you have used while creating videos. It will help to revise concepts easly.
This was beautifully explained! Please continue making such great videos. This was really helpful.
Simple and elegant solution to start with. This is very helpful for beginners. Can you also create a video on Elevator design problem?
Great explanation. Really helped a lot to understand low level and high level designs. Please add more videos on low level designs.
Nice and clean explanation.
Very Helpful !
Awesome explanation.
Nice ,very short and to the point.
Great Great Video. SImple and Clear
You seem like a knowledgeable guy
Excellent work.
Basics explained well
Great content
Thanks, Nice Explanation. It leaves a lot of open questions related to failure scenarios handling. like what happens if slot service books the slot but ticket couldn't be generated. How do you say to slot service to roll back the booking? what if you couldn't communicate to the slot service to unbook the slot. Will you have a background job for checking slots that are booked but no one was given a ticket against, due to technical failure. Similar scenarios can happen with exit case, slot unbooked, and later booked by other person but ticketing service fails to let the first-person exit. now if you retry, to unbook the slot you may end up unbooking the slot that was reserved by another person.
if the slot has booked and ticket is not generated. we can do retry insted of rollback. because the major thing here is the getting parking lot rather than the ticket. Ticket can be regerated for same parking lot but we can not assign two parking slot to one vehicle.
awesome content and well explained
Thanks! What topic/question you would like us to do next?
Tech Interview Guide You’re doing a great job. You can cover more system design topics or you can make videos on various distributed systems concepts
@@techinterviewguide4297 System design for 1. message chatting service which is highly scalable, distributed, resilient, supports encryption of message end to end (i.e. server cannot see message) 2. Photo sharing service like instagram 3. Cab booking service like uber (Given APIs for GPS/ map) 4. Book recommendation service (Video recommendation service) 5. Service to show trending topics etc
@@techinterviewguide4297 please try to resume the series!
I have a comment here, Everything looks ok to me. Except why do we need to track the status of parking. Even though status of parking we can find from ticket#. Whether parking is available or not. In this case we would need to make an unnecessary call to the table. Which is not at all required.
Pretty Simple. But aren't there gonna be lot of DB reads ?
I like the explanation and I think it is a good job for questions like this. However, I wonder if you have ever seen an actual parking lot that assigned you a spot when you got your ticket? If you have, I can tell you that is very unusual.
I agree, It is highly unlikely in the US :) I can see this use case for reservation in some events or something but it is too specific of a use case
Maybe you don't need the actual slot id in that case. We could just have a count of different types of slots(S, M, L) in DB/cache. And simply operate on the basis of that count. Concurrency becomes even more crucial then. And then instead of returning a slotId, we could return some other ID to the user. Could be Auto-incremented id, or we could propagate a Vehicle Id throughout our system, and just return that.
Dunno if this works.
slot allocation may not be required. This should be discussed with the interviewer as you may want the vehicle to be parked in any available slot.
You don't need an entire new service just for pricing policy.
Nice
Your voice is like Rishabh pant
In 3:35, where are the number of vehicles entering per day?
Calling the use case “giving the user a ticket” is a bit off isn’t it? Nobody uses a parking garage to get a piece of paper, they use it to get a parking spot.
enum is not grenerally suggested
Seems like vdo is edited & is not original and audio is integrated with the channel guy! Size for parking lot in scale category is not well explained
size per sot 1K, 1K what? bits, bytes, be clear na
Super bulshit solution. Parking lot is a low level design question and not distributed system solution 🤦
They are asking for data engineers too... Who doesn't care of lowlevel design.
Very bad overall video.