Whatsapp System Design | System Design| HLD | High Level Design

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 36

  • @thekingraghuraman
    @thekingraghuraman 2 месяца назад

    Perfect video, all functional requirements are covered.
    Please do add a new section on generic NFR, like how to improve latency and throughput and back of the envelope estimation as well

  • @goku6272
    @goku6272 2 года назад

    Bro from where u are getting so much knowledge . I watch ur 5 videos all are crystal clear

  • @krisssssss1390
    @krisssssss1390 3 года назад +1

    Thanks for sharing, best video for this topic I've seen so far

    • @TheTechGranth
      @TheTechGranth  3 года назад

      Thanks, hope this was helpful :) Do like and subscribe and share with your friends :) check out the other videos on high and low level designs as well

  • @vladd3172
    @vladd3172 2 года назад

    Could you share any thoughts why do you prefer websocket to grps or graphQL? or just HTTP with long puuling? Supporting two different protocols looks like extra work on bothe client and BE sides

  • @CharityChemutai-bf5kc
    @CharityChemutai-bf5kc 8 месяцев назад

    Nice video thanks sir✊✊✊

  • @tusharbaheti1648
    @tusharbaheti1648 4 месяца назад

    but in functional how are you writing consistency and availability together ?

  • @kento8453
    @kento8453 2 года назад +2

    Why are we going with Columnar cassandra database to store the messages? we're not doing any aggregation, and also don't we need our data to be consistent as well? would a document nosql database be better

    • @kushalNawalakha
      @kushalNawalakha Год назад

      Probably because we need to fetch All the messages from a single conversation. So reading that from columnar db might be fast.

  • @aakash1763
    @aakash1763 3 года назад +1

    Great video one doubt
    let's say when I go online I make websocket connect with chat servicer 1 and do the send thing etc... now I go offline so will that websocket connect b/w me and chat server gets removed and when I go online again so again a websocket connect will be made and this time this connection will be made to some other chat server right?

    • @TheTechGranth
      @TheTechGranth  3 года назад +2

      Generally these connections work in pool, so when you go online a new socket connection will be made for you

  • @sankarv7
    @sankarv7 4 года назад +1

    Thanks for the nice explanation, can you post video on youtube or any streaming site

    • @TheTechGranth
      @TheTechGranth  4 года назад +1

      sure, I will be coming up with Netflix design soon

    • @TheTechGranth
      @TheTechGranth  4 года назад +1

      Here you go, I hope this will be helpful: ruclips.net/video/NBO88PLGIis/видео.html

  • @parwana1000
    @parwana1000 3 года назад +1

    You are awesome ...nice way of explaining.well researched content

    • @TheTechGranth
      @TheTechGranth  3 года назад

      Thank you. Glad you liked it. Do like and subscribe and share it with your friends :)

  • @aakash1763
    @aakash1763 3 года назад +1

    One more thing if we don't use websocket protocol here then for each msg we will have to make the connection each time for new msg but with this websocket protocol it will make a connection and both client and server can send the messages.
    My friend was asked to make a bot chat system in which a real user will ask the question and the bot will answer it so the design you have explained can I refer the same design for this thing also?

    • @TheTechGranth
      @TheTechGranth  3 года назад +3

      You can use this but In chat bot a simple http will work because there server is not sending a message rather response to your request. If you ask something to a chat bot, an api will look for that question in some knowledge base and return you a response to the question, this is the case with simple chat botS, which does not involve ML

  • @rational5872
    @rational5872 2 года назад +1

    communication between server to server is also over web socket connection?

    • @TheTechGranth
      @TheTechGranth  2 года назад +1

      Yes

    • @rational5872
      @rational5872 2 года назад +1

      @@TheTechGranth thanks a lot for quick response 🙏

    • @TheTechGranth
      @TheTechGranth  2 года назад

      @@rational5872 welcome. Do like and subscribe and share with others 🙂

  • @rajibguha6960
    @rajibguha6960 4 года назад +1

    Fantastic explanation !!

  • @agrim123456
    @agrim123456 3 года назад +1

    In the above scenario user2 web-socket connection resides in server S4, so when user1 send message it is received by server S1. How server S1 communicate with server S4 ?

    • @TheTechGranth
      @TheTechGranth  3 года назад

      As part of your application, you will query redis to get the websocket connection for the receiver. From redis you know which machine holds the connection object, make a call to that machine to get the object. Btw your application shoould have an internal getter which will share the connection object stored in map.

    • @alexeigabriel
      @alexeigabriel 3 года назад

      if a connection object could be shared among servers using Redis, why do we need to be linked to specific server then? can we simply put connection object in Redis cache itself and doesn't store any user-server mapping tables then?
      I don't think its possible to share connection using Redis, and there's should be simple API endpoint which allows server1 forward user's message to server2

  • @ameynaik2743
    @ameynaik2743 3 года назад +1

    What is the purpose of second table (on right side of the screen) at around 28 mins

    • @TheTechGranth
      @TheTechGranth  3 года назад

      That is the hashtable which contains userid and its websocket connection object

    • @ameynaik2743
      @ameynaik2743 3 года назад

      But can’t we use the table on top left?

    • @TheTechGranth
      @TheTechGranth  3 года назад

      @@ameynaik2743 that is to identify on which server a user connection os present, you can serialize and store this data in 1st table as well, I chose to store on local server in hashtable

  • @ameynaik2743
    @ameynaik2743 3 года назад +1

    Is websocket over tcp?

  • @Miscellaneous-Things
    @Miscellaneous-Things 2 года назад

    The system can't have both consistency and availability.