IntermediateAbout 15 min

    Real-Time Protocols

    Read the full article on Substack

    5 min read.

    Compare Short Polling, Long Polling, Server-Sent Events (SSE), and WebSockets in a side-by-side race.

    Think of it this way: Short Polling is repeatedly asking "Are we there yet?". Long Polling is asking once, and the driver stays silent until you arrive, but then you have to immediately ask again. SSE is a radio broadcast from the driver. WebSockets is a walkie-talkie connection left permanently on between you and the driver.

    Short polling
    Long polling
    SSE
    WebSockets

    The server gets new data at seconds 3, 7 and 11.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Which protocol is this?

    Sort

    Sort each description into the real-time technique it describes.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Short polling

    Drop items here

    Long polling

    Drop items here

    Server-Sent Events

    Drop items here

    WebSocket

    Drop items here
    7 pieces left to place

    Quiz

    21 questions
    Question 1 of 21
    Score: 0

    A user types a message AND receives replies from teammates in the same session. Which property of the chosen protocol is essential?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going