Updates from the Server Side: Polling, Long Polling, SSE and WebRTC
HTTP is request–response based, and the server cannot speak up to the client by itself. This chapter covers the methods by which data can nevertheless reach the client: from repeated querying (polling) through a held-open request (long polling) and a server-side event stream (SSE) to a direct peer connection (WebRTC). For each method the same aspects are examined, so that before the persistent, two-way WebSocket (chapter 10) it is visible what each solves and what it does not.
Updates from the Server Side: Polling, Long Polling, SSE and WebRTC
HTTP is request–response based, and the server cannot speak up to the client by itself. This chapter covers the methods by which data can nevertheless reach the client: from repeated querying (polling) through a held-open request (long polling) and a server-side event stream (SSE) to a direct peer connection (WebRTC). For each method the same aspects are examined, so that before the persistent, two-way WebSocket (chapter 10) it is visible what each solves and what it does not.