ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Sarah Ali , Senior Evaluation Specialist , United Nations
تاريخ النشر: 2018/05/02
Mohammed Harandah
من قبل 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
من قبل 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
من قبل 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

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

use in c#

or c++

php

css

html5

mysql

larvel

send me whatsapp

00201116462460

المزيد من الأسئلة المماثلة