Server and Events

작성자

카테고리:

← 피드로
DEV Community · Rishwantthi · 2026-06-22 개발(SW)

Rishwantthi

1. Short polling: this is a technique used by the client to fetch data from the server. In this the client first sends a request and then the server responds with the unique id for the client. after receiving the id, client uses it for futher requests. Here, when the client sends request for time taking process, the server gives a immediate response stating it takes time. then the client waits for some time and then sends the request agian to the server.
so the technique where the client waits is known as short polling

2. Long polling: this is an another technique used where when client sends a request, the server waits for a particular time and then gives the response. for a time taking process when clients sends a request the server waits for some time, even then the process is not finished it says so.then the client sends another reuest immediately and the server wait again and sends the response
so here the client doesnt wait, only the server waits.

3. Event Stream: In this technique when client sends a request the server sends the response as soon as the event occurs. So the response is sent in a continuous manner till fully completed. And during this the connections remains established between the browser and the server.

Eg: Chatgpt response: when a user gives a prompt, the response is generated line by line and it is sent as soon as generated. Only when the whole response it sent the connection is closed

원문에서 계속 ↗

추출 본문 · 출처: dev.to · https://dev.to/rishwantthi_2111/server-and-events-gd

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다