Low-Level System Design of an Inventory Management System like Amazon or Zepto

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 22

  • @supritdk2956
    @supritdk2956 Před měsícem +1

    These mock interviews are pretty good to understand how a real interview would be. You may not have the right solution or the most optimal one but think logically about the largest entity to divide into classes until you reach the smallest Warehouse -> space in this case. I would probably have divided into these classes in terms of modeling the warehouse. Later you can define User and other methods to efficiently place products into a space in the shelf. Space is the most granular location. Unit is also a good idea when you just aggregate a bunch of products to be placed on the same space in the shelf.
    Warehouse
    + Map shelfTypeToShelves; // helps identify the shelves available and the use them to place products
    + Map productIdToShelfMap //helps identify the shelf where a product is placed quickly
    Shelf
    + ShelfType type
    + List openLocations
    + List occupiedLocations
    + Map productLocations (helps find a product in a given shelf) and remove from doubly linked list easily.
    Product
    + ProductId
    + Name
    + Description
    + Price
    ShelfType : enum
    Small, Medium, Large
    Space
    + SpaceId
    + SpaceStatus : boolean

  • @dreamakash
    @dreamakash Před 2 lety +3

    Thank you for the detailed video... A few questions
    1. Why does Order has a mapping of Product and count? Instead we can just use the list of Units which has all the information including unique product unit ID.
    2. [minor] Tradeoff of using Product instead of productID in Unit class assumed copy by value instead of copy by reference? As Java generally passes by reference (for objects) so the Product reference wouldn't take extra memory and easy to refer to when needed. Instead productID will take even more memory because that is a copy by value.

  • @shubham.1172
    @shubham.1172 Před 2 lety +3

    0:33 "maybe a notification" - sweet timing!

  • @AKASH-sw9bs
    @AKASH-sw9bs Před 2 lety +1

    It's better to watch such an amazing workshop rather than watching a movie at friday night. 😅
    💚💚💚enjoying it.

  • @akshattuknait1862
    @akshattuknait1862 Před 2 lety +1

    very informative video! thanks Arun and Gaurav for making it.

  • @jsu492
    @jsu492 Před 8 měsíci

    2 cents: (which should be part of lld discussion/implementation or not, please clarify)
    1. Order cancellations handling
    2. Expiry date-based removal every day. (And pickup could be as well to minimize loss)

  • @vladd3172
    @vladd3172 Před rokem +1

    Cool video. I find it useful 👏

    • @gkcs
      @gkcs  Před rokem

      Glad to hear that!

  • @cmelgarejo
    @cmelgarejo Před rokem +3

    The head shaking is in agreement always? Like, it's *not* a "NO"? OR, when it is a no? I'm sorry if it sounds like a dumb question, keep in mind that is a cultural clash/shock one. 😅

  • @shoaibmirza397
    @shoaibmirza397 Před 2 lety

    Regarding the design.
    Q- Why are we handling the location class/Table differently? Type here is the only thing, can't we just add S/M/L in the unit class? Or is it to handle different location for a particular type of unit, but i don't see it mention in the Class.
    Thank you for these videos. It helps a lot and very informative.

    • @vzard_
      @vzard_ Před 2 lety

      Actually its reverse. Its to handle different units for a particular location.
      We can store S product in S M L location
      M in M L location, etc.
      Keeping the type in unit class which tightly couple the system to store S in S location, M in M location, etc.
      Since we are on enum part. I'll give a hint too to use state design pattern for handling the Status of Unit. But I believe we might not need for such small state transition diagram.

  • @tanishsinghchouhan6377
    @tanishsinghchouhan6377 Před rokem +3

    Please bring asli engineering guy to one of the vidoe

  • @TwoShotsOfAdventure
    @TwoShotsOfAdventure Před 8 měsíci

    Why are we storing product information, units, and locations in Java? Shouldn't we fetch these details from database?

  • @harjeetsingh392
    @harjeetsingh392 Před 7 dny

    jo main tha concurrent orders; wo ap logo ne assume krlia k sequential hoga order.. sedlyf ;(

  • @av21015
    @av21015 Před rokem

    The design is good for given the time in which you made it but you have bundled a lot of things in the system class. It appears to violate the single responsibility principle. and that map of which product to which location you said you want to keep somewhere else apart from product should have been written in class diagram. like are you going to keep it in system or create a new trackProducts class.

  • @user-um9uf4lh9w
    @user-um9uf4lh9w Před rokem

    Hi please can any one help me how design database design for addresses like amazon users with different addresses

  • @hrehaandixit
    @hrehaandixit Před 6 měsíci

    Arun is really good.
    PS: I am not his fake id.

  • @studyWithUttamSharma
    @studyWithUttamSharma Před 2 lety +1

    is it ok write down whole code in single class in interview?

    • @elephant742
      @elephant742 Před 2 lety

      Yes, easier to scroll between them instead of opening different tabs (in case of diff class files). Ofc, you wouldn't do that in the actual codebase.

  • @setiyakitchen
    @setiyakitchen Před měsícem

    never went to prod🤣