Working with real-time technologies
The web platform offers different protocols and standards for real-time communication. In this section, we will review different technologies and techniques and discuss the requirements for utilizing them with Remix. We will discuss polling, learn about SSE, and review the WebSocket API. First, let’s have a look at polling techniques.
Understanding polling
Polling is a client-pull technique in which the client requests data from the server. Instead of relying on a server to push updates, polling utilizes intervals to check for the latest data from the server.
We can differentiate between short and long polling. Short polling sends requests in time-based intervals to the server. The server responds immediately, either with new data or indicating nothing has changed. With long polling, the server only responds once new data is available, keeping the request unanswered until then. The client sends a new request once the server responds...