Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

As a web developer, why would you use Long Polling? In case you wouldn't, what are the best alternatives?

user-image
Question added by Sarah Ali , Senior Evaluation Specialist , United Nations
Date Posted: 2018/05/02
Mohammed Harandah
by Mohammed Harandah , Project Engineer , Turner Arabia "SA ARAMCO Project"

First of all, it would be used for the passion to display data in a beautiful and familiar way. Second, a desire to update each gauge without refreshing the page. Finally,  a smart and efficient way to poll respective servers.

Mounir Salem
by Mounir Salem , تقني , it et is services

use long polling because the Web applications were originally developed around a client/server model, where the Web client is always the initiator of transactions, requesting data from the server. Thus, there was no mechanism for the server to independently send, or push, data to the client without the client first making a request.

Salim AINOUCHE
by Salim AINOUCHE , Senior Software Developer , Amadeus

To answer to your first question, Long polling HTTP Requests are usually used to implement http push from servers to clients when new information or the response to your request are available, as HTTP is a non connected protocol as TCP.

For the second question, a good and powerful technic to use is called web sockets. currently, with available new technologies, Long Pull or Web sockets are already support by modern web frameworks, and are smartly used in case of underlying servers doesn't support one of above.

Hope helps,

Best Regards,

Salim Ainouche

Technical Architect, Designer and Full Stack Developer

احمد اشرف
by احمد اشرف , مدير الشركة الدولية , الشركة الدولية لتقنية المعلومات

use in c#

or c++

php

css

html5

mysql

larvel

send me whatsapp

00201116462460

More Questions Like This