Questions tagged [long-polling]

In web programming, long-polling is an emulation of pushing data, implemented by repeated polling with delayed response.

Long polling is itself not a true push; long polling is a variation of the traditional polling technique, but it allows emulating a push mechanism under circumstances where a real push is not possible, such as sites with security policies that require rejection of incoming HTTP/S Requests.

1099 questions
23
votes
2 answers

Hard downsides of long polling?

For interactive web apps, things like Websockets are getting more popular. However, as the client, and proxy world is not always fully compliant, one usually use a complex framework like 'Socket.IO', hiding several different mechanisms for any case…
dronus
  • 10,774
  • 8
  • 54
  • 80
22
votes
1 answer

How to do long-polling AJAX requests in ASP.NET MVC?

Does anyone know how to code up long-polling AJAX requests (for server PUSH notifications) in ASP.NET MVC? Whenever I do it, it seems that only the last browser to open up a window gets the notifications. As if IIS/ASP.NET were canceling the last…
Andrew Arnott
  • 80,040
  • 26
  • 132
  • 171
21
votes
4 answers

Asp.net session never expires when using SignalR and transport mode long polling

We have a web application that uses SignalR for its notification mechanism.The problem is when we are browsing our web application using IE ,SignalR uses Long Polling as its transport type thus sends back requests to our web server therefore Session…
Beatles1692
  • 5,214
  • 34
  • 65
20
votes
2 answers

Long Polling/HTTP Streaming General Questions

I'm trying to make a theoretical web chat application with php and jquery, I've read about long polling and http streaming, and I managed to apply most principles introduced in the articles. However, there are 2 main things I still can't get my head…
Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308
19
votes
2 answers

Websockets. Loss of internet, keep-alive messages, app architecture etc

Well, there's a lof of information about websockets. The technology itself is amazing, there's no doubt in this fact. And before i will start using them in my app i just want the community to answer these questions: "...in order to maintain…
Dmitrii Sorin
  • 3,855
  • 4
  • 31
  • 40
19
votes
7 answers

Is there a real server push over http?

I know there are ways to fake it, polling (or long polling) but is there any way to have the server contact the browser to push out information? Either polling option wastes resources on the server and depending on the server can lock it up (apache…
Justin808
  • 20,859
  • 46
  • 160
  • 265
18
votes
4 answers

Is there a difference between long-polling and using Comet

I am implementing a system where I need real-time updates. I have been looking at certain scenarios and among all was Comet. Implementing this I do not see any way this is different from traditional long-polling. In both cases you have to send a…
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125
18
votes
2 answers

Nginx + PHP: stop process at canceled request

I have Nginx 1.4.4 and PHP 5.5.6. I'm making long-polling requests. Problem is, that if I cancel the HTTP request sent via Ajax, requests are still processing (they don't stop). I tested it with the PHP mail() function at end of file, and mail is…
eKrajnak
  • 293
  • 1
  • 5
  • 11
17
votes
1 answer

AWS SQS Long Polling doesn't reduce empty receives

Currently, I have an AWS SQS as a trigger to my AWS Lambda function. I would like to implement long polling to reduce costs since I've used up 70% of my monthly free tier, mostly from empty receives. I tried setting up long polling by changing the…
naribo
  • 690
  • 8
  • 19
17
votes
5 answers

long-poll jQuery.ajax() fails to callback after phone sleeps?

My web app uses the 'long poll' method to keep up to date with the latest data from my server. The server only responds when it has new data, which can be many minutes apart. (It is a heating control system where you only see updates when room…
James
  • 5,635
  • 2
  • 33
  • 44
17
votes
2 answers

Django and Long Polling

I need to implement long polling in my application to retrieve the events. But I have no idea how to do it. I know the concept of long polling, i.e to leave the connection open, until an event occurs. But how do I do implement this in my project. If…
Robin
  • 5,366
  • 17
  • 57
  • 87
17
votes
1 answer

What is the difference between web sockets, long polling, server-sent events and forever frame?

I'm currently exploring SignalR, this technology supports transports (web wockets, long polling ,server-sent events and forever frame). I have understood the terminology web sockets and long polling. But what is Server-Sent Events and Forever…
SundaraPandian
  • 317
  • 1
  • 2
  • 7
17
votes
7 answers

how does long polling work javascript?

Hi I understand that in long polling you keep the connection with the server open for long till you a get a response back from the server and then poll again and wait for the next response. However i dont seem to understand how to code it. There is…
Rasmus
  • 8,248
  • 12
  • 48
  • 72
16
votes
1 answer

How to implement Long Polling REST endpoint in Spring Boot app?

Would you be so kind as to share any up-to-date manual or explain here how to implement a REST Long Polling endpoint with the latest Spring (Spring Boot)? Everything that I've found by this time is quite out-dated and was issued a couple of years…
Pasha
  • 1,768
  • 6
  • 22
  • 43
16
votes
2 answers

PubNub long polling vs sockets - mobile battery life

I recently began using PubNub in my iOS app, and am very happy with it. However, I have been looking at the other options available, such as Pusher and Realtime.co, which use Websockets. PubNub, on the other hand, uses long polling. I have done my…
user1032657
  • 2,451
  • 6
  • 28
  • 38
1
2
3
73 74