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
8
votes
3 answers

Is long polling possible in Google App Engine?

I need to make application that needs to poll server often, but GAE has limitations on requests, so making a lot of requests could be very costly. Is it possible to use long polling and make requests wait for the maxium 30 seconds for changes?
newbie
  • 24,286
  • 80
  • 201
  • 301
8
votes
3 answers

How can I apply long polling technique in ASP.NET MVC?

I search a lot about polling technique but i can't find anything about how to apply this technique in asp.net mvc. There are so many articles and documentation but most of them about php and ajax. I want to use this technique with my project in two…
Selman Genç
  • 100,147
  • 13
  • 119
  • 184
8
votes
2 answers

Long polling in Yesod

Can I do long polling in Yesod, or any other Haskell web framework with comparable database facilities? To be precise, I want to delay a HTTP response until something interesting happens. There should also be a timeout after which the client will…
Adrian May
  • 2,127
  • 15
  • 24
8
votes
2 answers

Possible to use websockets on a shared hosting web server?

I use PHP, JS, HTML, CSS. I'm willing to learn ruby or python if that is the best option. My next project will involve live data being fed to users from the server and vice versa. I have shell access on my shared server, but I'm not sure about…
user993683
8
votes
1 answer

Long polling with database data?

After a week of googling and search.I am hard to find even a single tutorial about long polling from a database table instead of from a flat text file named data.text. Currently, I write manually anything in data.text and it instantly appears in…
Aana Saeed
  • 299
  • 1
  • 4
  • 14
8
votes
7 answers

Long polling freezes browser and block other ajax request

I am trying to implement long polling in my Spring-MVC Web App but it freezes my browser and other request after 4-5 continues AJAX requests.I have no clue whats goin on here is my relevant code. The controller method:(Server Side):- @Asynchronous …
Dangling Piyush
  • 3,658
  • 8
  • 37
  • 52
8
votes
1 answer

Why should session_write_close be used in long polling?

I was reading an article about long polling at Nolithius. Under the section PHP sleeps across the entire session, it is written that the session_write_close function should be called in order to prevent the entire session coming to a deadlock. What…
SexyBeast
  • 7,913
  • 28
  • 108
  • 196
7
votes
2 answers

Django, Ajax long polling, Postgresql: idle transaction

I implemented a chat, using ajax long polling and Gevent. To read, the client ajax the update view and wait with Gevent.event.wait for an update. Problem: The Postgresql transaction opened by Django at the beginning of a request (to get session…
Ashe
  • 107
  • 1
  • 11
7
votes
1 answer

Long Polling - Problems with Internet Explorer 8

I'm trying to implement long polling using Netty and jQuery. I have it working correctly with Chrome and Firefox, but Internet Explorer 8 is causing me problems. I'm executing the following code which sends a request to my server, waits until a…
Brian DiCasa
  • 9,369
  • 18
  • 65
  • 97
7
votes
4 answers

Play framework longpolling in online game

I'm working on a browser game with the play framework, and I definitely need longpolling, but I don't quite understand how to use it. WebSockets would be perfect for this, but it's not supported by that many browsers yet. Here's what I want to do:…
user393964
7
votes
3 answers

MySQL trigger + notify a long-polling Apache/PHP connection

I know there are Comet server technologies that do this but I want to write something simple and home-grown. When a record is inserted into a MySQL table, I want it to somehow communicate this data to a series of long-polled Apache connections…
Eric
  • 71
  • 1
  • 2
7
votes
1 answer

HTTP Long Polling in Swift

I am trying to implement a long-polling solution in Swift using iOS 8+. While the solution undoubtedly works and leaves the main thread free for UI interactions, the memory usage climbs continuously so I am obviously doing something wrong. The…
7
votes
3 answers

Capturing event of client disconnecting! - Gevent/Python

I'm using long polling for a chat with gevent. I'm using Event.wait() when waiting for new messages to be posted on the chat. I would like to handle the occasion a client disconnects with some functionality: e.g. Return "client has disconnected" as…
RadiantHex
  • 24,907
  • 47
  • 148
  • 244
7
votes
2 answers

Recommendation for integrating nodejs with php application

I have an existing app written in PHP (using Kohana framework) and I want to do long polling. From some things I read it seems that doing long polling with PHP is not advisable and using something like nodejs is a better choice. My question is…
jhchen
  • 14,355
  • 14
  • 63
  • 91
7
votes
1 answer

How can I update HTML pages dynamically with Indy HTTP server using jQuery and "Long Polling"?

I have read the article Simple Long Polling Example with JavaScript and jQuery. The paragraph "Long Polling - An Efficient Server-Push Technique" explains that the Long Polling technique combines the best-case traditional polling with persistent…
mjn
  • 36,362
  • 28
  • 176
  • 378