Thursday, December 12, 2019

Polling vs SSE vs WebSocket— How to choose the right one

Dec. 12, 2019

Introduction


It is my favorite article to read, and I spent over an hour to read.

Reading is fastest way to learn


I like to ask questions, and also read out loud, so that I can understand the topic better.

Here is the article.

two general approaches: client pull or server push.
A few ways to implement these:
  • Long/short polling (client pull)
  • WebSockets (server push)
  • Server-Sent Events (server push)


Actionable Items


I also like to write down my thought process. I still remembered that I failed onsite interview question from Fortinet this May 2019, if a web page has submit button, what happen if the button is clicked twice quickly?

I really like to read more carefully, and most important I should pay attention to those terms, ajax polling, long term polling, and what is TCP and how many connections stay open?


No comments:

Post a Comment