Uber System Design | Ola System Design | System Design | System Design Interview Questions

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ •

  • @TheTechGranth
    @TheTechGranth  4 роки тому +2

    Hello Friends,
    Do like and share the video and Subscribe(Press the Bell icon as well) to the channel to get all updates.
    This is my thought process of designing a system like Uber. I hope this will help you gain some insights on a designing a system like this and also help you in answering interview question related to system design.
    Do put in comment section any doubts that you want me to clarify.
    Also let me know things that you liked and disliked about the video.
    Let me know if you were asked some system design question in an interview and you got stuck, I will try to come up with a video for the same.

  • @Javatechie
    @Javatechie 4 роки тому +4

    Excellent tutorial 👍🏻 . Thanks for your efforts ☺️

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

    Good explanation.
    Few doubts:
    1) Can we employ clean up of NoSQL DB(old historical data) periodically to avoid overload ?
    2.) Can you shed some light after booking a cab. Basically the journey till completion of trip.
    Can we have a trip checker that keeps checking the distributed cache for the journey trial ?
    3.) How rider can give rating for driver ? and how it is aggregated ?

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

      1) no we should not clean up historical data. Since the system involves actual human interactions so we need all the data in case some mishaps happens and some data is required for say police investigation or as proof in court etc.
      2) please elaborate the question
      3) this will be another flow, which I have not covered in this video. Algorithm can be similar in any rating system be it can hailing or food delivery. Good point actually, will come up with a design for this😊

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

      @@TheTechGranth
      For 1) True, shouldn't we purge atleast very old data(more than 3 years).
      For 2.) I wanted to understand what happens after booking the cab till completion of journey. Who registers the trips in riders DB and drivers DB after trip has been booked.
      Will there be any state machine for the trip (booked, in progress, completed). And this driver should not be recieving any new requests trips during his journey from dispatch service.

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

      @@kvv6452 1) may be move to some passive storage
      2) yes you are right about state machine, it becomes very complex when we talk about these scenarios and here I wanted to keep things simple. You might have seen that when booking cab, sometimes you see a situation where can is booked but status is, your driver is completing a near by trip. So these all things can be incorporated based on location and availablity of driver

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

    Hi - Location tracknig is needed for rider as well., a suggestion - so that the system can map the nearest available driver.

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

      a rider need not keep on sending his location, only when he comes online and request for a ride, his location is required but for driver, we need to track him constantly.

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

      when riders moves around after can booking then driver should get notified

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

    Hi Tech Granth,
    In the video, you said we will keep the driver location in NoSQL DB, what would be the sharding key for cabs location data? To fetch fast their current location. The driver will be continuously moving after every 4-sec new location feed will come and the old location feed will be stale data.
    Please help.

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

      For fast retrival of current location we are using cache. For each rider we will be updating the cache and pick current location from there. We need to store complete location details of driver for analysis purpose, for example check if there is a fraud being committed by taking longer route. Now this db can be sharded based on userid because each user will have similar number of record per day. 86400 sec per day this makes 21600 record per day per driver, if they send location every 4 sec. This makes it reasonable to shard on userid. On top of this some buckets can be created on date to further optimize analytics query

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

      @@TheTechGranth Thanks for the answer. Some doubt about it. How will you store data in cache? If you are keeping the key as driver id, then how will you find the nearby driver for the rider. You will need to do a full scan each time. Please explain.

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

      @@rishirajtandon3849 location data in cache for each driver will be the current location which you are updating so that should be fine

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

    The video is good, it is really good, but somewhere i feel the design is very synchronous that leads latency, like get booking for driver, that should be asynchronous with multiple listeners when the location of driver is changed , location service should cache and notify and put in booking pool

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

    Thanks for that video, it was a good explanation. I just felt that the design missed a payment gateway service which is also an important aspect in the cab service, rest everything was perfect.

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

      I have made a separate video on that, you can check it out and integration part is explained in e-commerce design

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

    Hi which is best referral program software and coupon code software

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

    According to CAP theorem, system cannot be both consistent and highly available at the same time. We must choose one of the two. In non-functional requirements, the system can be eventual consistent.

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

    Can you make system design video on distributed logging system ?

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

      Sure, I have some content in pipeline but this seems like a good topic. Will try to come up with it ASAP

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

      Here you go : ua-cam.com/video/WzHgOl3xvu4/v-deo.html

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

    One thing can u clarify why u are implementing Kafka services here please eleborate I need more details

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

      For 2 reasons:
      1) aggregate unstructured data from various components, so that we can later persist it in hdfs or some other db and then run some analytics. Benefit with kafka is it can serve to both real time processing engine and OLAP/batch processing engine.
      2) to aggregate log(here you can use some other queue as well but since you already have the kafka why not use it)

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

    Can we expect this type of design in a new grad system design interview ?

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

      May be not the end to end flow but how you can solve a problem this, so that analytical thinking can be checked

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

    When to use microservices and when to avoid it? Is there a pattern I can follow?

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

      You can check out the series on microservice
      ua-cam.com/video/XpIMnFpVrUg/v-deo.html

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

    Superb

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

      Thanks, hope it was helpful. Do share it with your friends as well. Kindly like and subscribe :)

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

    are u amit bharti ?

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

    One more video request i have.
    Design a shopping cart backend like of amazon scale.
    Can you please make it ?

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

      I hope this is what you were looking for : ua-cam.com/video/XMpchIp746s/v-deo.html Do like and share