Register now or log in to join your professional community.
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.
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.
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