Information Technology Broadcasting - اطلاع‌رسانی فناوری اطلاعات
410 subscribers
13.9K photos
41 videos
505 files
489 links
Information Technology, Cloud computing, Digital transformation, IoT, Edge computing, IT governance, Fog computing, IT security, IT regulation, IT trends, Programming، Big data, Monitoring, Databases, Api, Service
Download Telegram
#web concepts

Short polling vs. Long polling

With the traditional or "short polling" technique, a client sends regular requests to the server and each request attempts to "pull" any available events or data. If there are no events or data available, the server returns an empty response and the client waits for some time before sending another poll request. The polling frequency depends on the latency that the client can tolerate in retrieving updated information from the server. This mechanism has the drawback that the consumed resources (server processing and network) strongly depend on the acceptable latency in the delivery of updates from server to client. If the acceptable latency is low (e.g., on the order of seconds), then the polling frequency can cause an unacceptable burden on the server, the network, or both.

In contrast with such "short polling", "long polling" attempts to minimize both the latency in server-client message delivery and the use of processing/network resources. The server achieves these efficiencies by responding to a request only when a particular event, status, or timeout has occurred. Once the server sends a long poll response, typically the client immediately sends a new long poll request. Effectively, this means that at any given time the server will be holding open a long poll request, to which it replies when new information is available for the client. As a result, the server is able to asynchronously "initiate" communication.
اولین ماوس کامپیوترهای شخصی در ۱۹۸۱!