Long Polling, Websockets, Server Sent Events - Who Wins? | Systems Design with Ex-Google SWE

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

КОМЕНТАРІ • 25

  • @matthewsaucedo2471
    @matthewsaucedo2471 11 місяців тому +4

    Really enjoying this content; you break the content down in a really approachable way!
    I think the depth of info covered is pretty good too. Obviously not too detailed but enough to enable people to know what to search for if they decide they want to learn more.

    • @jordanhasnolife5163
      @jordanhasnolife5163  11 місяців тому +3

      Yeah at the end of the day it's an interview channel, don't want to bombard everyone too hard haha

  • @ored5138
    @ored5138 11 місяців тому +2

    Hi, watched a few videos of yours.
    Very nice job, helps me a lot!

  • @Nero21952
    @Nero21952 6 місяців тому +1

    Great content Jordan, thank you for all your videos. I was curious - are stock trading platforms or websites that display live updates (say sports sites with live scores, etc) using SSEs?

    • @jordanhasnolife5163
      @jordanhasnolife5163  6 місяців тому +1

      I would imagine that some percentage of them are, but hard to say without checking each codebase individually

    • @almirdavletov535
      @almirdavletov535 6 місяців тому +1

      Or network tab 😄

  • @povdata
    @povdata 11 місяців тому +2

    Thank you! The SSE works like broadcast from server. So all clients gets the same data result. How to send data for specific clients, for exmaple who has subscription on category: "news". I write more in application layer.

    • @amartyaa
      @amartyaa 11 місяців тому +3

      This feels more like a 'pub/sub' kind of problem. I'll say the combination of pub sub and SSE will be a good idea here.

    • @tomaszzieba315
      @tomaszzieba315 11 місяців тому +2

      For every client, you have a different "session" in SSE. So when a user is logged in and has the session opened you send an event to a user which. No session -> no event send

    • @jordanhasnolife5163
      @jordanhasnolife5163  11 місяців тому +1

      Perhaps using different event sources

    • @povdata
      @povdata 11 місяців тому

      @@tomaszzieba315 seems SSE does not support session. could you help me?

  • @Gitsniks
    @Gitsniks 11 місяців тому +1

    should i watch the newer versions of your videos or both the old and new versions? like for this topic, is it fine just to watch this vid or the old one

    • @jordanhasnolife5163
      @jordanhasnolife5163  11 місяців тому +1

      I think the newer ones are meant to be strictly better than the older ones. Ideally it's all of the same content, but just better for visual learners.
      Gonna do the same for the interview problems starting in a couple of weeks

  • @TOc0olFORu
    @TOc0olFORu 11 місяців тому +2

    Hair looking fly today

  • @yrfvnihfcvhjikfjn
    @yrfvnihfcvhjikfjn 11 місяців тому +3

    LMAO at that intro

  • @zhonglin5985
    @zhonglin5985 6 місяців тому +1

    I noticed in the old vid you mentioned WebSockets were the ones having thundering herb problem due to reconnects, while in this new vid you are saying only SSE will have this problem. Should we say they both have this problem?

    • @jordanhasnolife5163
      @jordanhasnolife5163  6 місяців тому

      Hmm interesting, maybe a typo on my end, it's just SSE that automatically reconnect by default, but if you naively reconnect a websocket right when it breaks I suppose you could have a thundering herd issue there too.

  • @mcee311
    @mcee311 11 місяців тому +4

    How does server side event know which client to reestablish connection with? Do they maintain a list of clients?

    • @jordanhasnolife5163
      @jordanhasnolife5163  11 місяців тому +1

      I believe this is handled by the client

    • @sahilguleria6976
      @sahilguleria6976 Місяць тому

      I believe client subscribes for the events, not exactly like PUB-SUB model, from chatGPT
      In Server-Sent Events (SSE), it's the client that initiates and establishes the connection to the server and then the server pushes updates through that established connection.

  • @spokesperson_usa
    @spokesperson_usa 11 місяців тому +3

    Web2 browser scripting isn't software engineering, it's script kid engineering.