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

КОМЕНТАРІ • 45

  • @Budulai89
    @Budulai89 3 роки тому +18

    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 ?
    ....

  • @PujaKumari-im8vm
    @PujaKumari-im8vm 2 роки тому

    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.

  • @PalashPathak19
    @PalashPathak19 4 роки тому +5

    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. :)

  • @9730298808
    @9730298808 4 роки тому

    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

  • @sentinelese6717
    @sentinelese6717 2 роки тому +1

    best PL system design video

  • @mihirranade3445
    @mihirranade3445 4 роки тому +8

    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

  • @MARSSS888
    @MARSSS888 3 роки тому +1

    You are simply amazing!

  • @happyhappyhome7405
    @happyhappyhome7405 8 місяців тому

    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.

  • @deepjyotkaurbindra
    @deepjyotkaurbindra Рік тому

    This was beautifully explained! Please continue making such great videos. This was really helpful.

  • @lankesh870
    @lankesh870 Рік тому +1

    Simple and elegant solution to start with. This is very helpful for beginners. Can you also create a video on Elevator design problem?

  • @vikrantsaini6362
    @vikrantsaini6362 3 роки тому

    Great explanation. Really helped a lot to understand low level and high level designs. Please add more videos on low level designs.

  • @sarathbab
    @sarathbab 4 роки тому

    Nice and clean explanation.

  • @parastripathi3302
    @parastripathi3302 4 роки тому +1

    Very Helpful !

  • @virendrasingh5267
    @virendrasingh5267 3 роки тому

    Awesome explanation.

  • @geeksquad9291
    @geeksquad9291 2 роки тому

    Nice ,very short and to the point.

  • @adityasrivastava5795
    @adityasrivastava5795 2 роки тому

    Great Great Video. SImple and Clear

  • @bostonlights2749
    @bostonlights2749 3 роки тому +2

    You seem like a knowledgeable guy

  • @HameedKhan-mq4ve
    @HameedKhan-mq4ve Рік тому

    Excellent work.

  • @arnavsmultiart2133
    @arnavsmultiart2133 3 роки тому

    Basics explained well

  • @tejass817
    @tejass817 2 роки тому

    Great content

  • @ronakkalyani5035
    @ronakkalyani5035 4 роки тому +3

    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.

    • @pranksmania275
      @pranksmania275 2 роки тому

      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.

  • @ramkrishnakulkarni8289
    @ramkrishnakulkarni8289 4 роки тому +1

    awesome content and well explained

    • @techinterviewguide4297
      @techinterviewguide4297  4 роки тому +1

      Thanks! What topic/question you would like us to do next?

    • @ramkrishnakulkarni8289
      @ramkrishnakulkarni8289 4 роки тому

      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

    • @9730298808
      @9730298808 4 роки тому

      @@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

    • @deepjyotkaurbindra
      @deepjyotkaurbindra Рік тому

      @@techinterviewguide4297 please try to resume the series!

  • @vinaydixit81
    @vinaydixit81 2 роки тому

    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.

  • @rohan1456
    @rohan1456 4 роки тому

    Pretty Simple. But aren't there gonna be lot of DB reads ?

  • @mattleahy3951
    @mattleahy3951 4 роки тому

    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.

    • @LV-ei1ce
      @LV-ei1ce 4 роки тому

      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

    • @PalashPathak19
      @PalashPathak19 4 роки тому

      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.

  • @dev-skills
    @dev-skills 2 роки тому

    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.

  • @aliquewilliams3080
    @aliquewilliams3080 Рік тому

    You don't need an entire new service just for pricing policy.

  • @bostonlights2749
    @bostonlights2749 3 роки тому

    Nice

  • @AlikElzin
    @AlikElzin 3 роки тому

    In 3:35, where are the number of vehicles entering per day?

  • @DodaGarcia
    @DodaGarcia 2 роки тому +1

    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.

  • @youKnowMe4real
    @youKnowMe4real 5 місяців тому

    enum is not grenerally suggested

  • @9893011111
    @9893011111 4 роки тому

    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

  • @GauravSingh-le8mq
    @GauravSingh-le8mq Рік тому

    size per sot 1K, 1K what? bits, bytes, be clear na

  • @ngneerin
    @ngneerin 3 роки тому +2

    Super bulshit solution. Parking lot is a low level design question and not distributed system solution 🤦

  • @AbhishekBalani93
    @AbhishekBalani93 4 місяці тому

    Very bad overall video.