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
0
votes
1 answer

how can I use long polling to automatically refresh a webpage

I am trying to figure out how to use long polling to trigger a webpage refresh (the entire page as opposed to just a single section). Although it would be nicer to just update part of the page instead of a single section, I would rather just get…
lacrosse1991
  • 2,972
  • 7
  • 38
  • 47
0
votes
1 answer

Push notifications from web server to desktop app in python

I have a service with users (in django) and desktop client for this srevice (on wxpython). I need to send notifications from server to desktop app for specific user. What I can use for it? Thank you!
ssbb
  • 1,965
  • 2
  • 14
  • 26
0
votes
1 answer

Long Polling client-side "Time Gap" Between 2 Pollings

Assume I have a server support client side long polling. then my client-side code is like this: var polling = function() { $.ajax({ url: "/polling" }).done(function(data) { // polling again polling(); //…
marstone
  • 686
  • 1
  • 10
  • 23
0
votes
1 answer

jQuery $.ajax and Comet methodology - how to know when the script has done its execution?

I'm trying to implement Comet-like behaviour on my site to simulate PUSH events. I'm using jQuery and $.ajax request. The problem with my principle is that I make re-request when I get success event... But... I get success immediately when the…
StjepanV
  • 167
  • 2
  • 14
0
votes
1 answer

Longpolling(comet) solution for Rails as a mobile backend(no js)

Is it possible to organize real-time connection interaction rails app and mobile client(ios, android)? There are many js solutions based socket.io, but I have no ideas how connect them with mobile clients. Maybe there are pure rails alternatives for…
Ivan Kozlov
  • 561
  • 2
  • 8
  • 19
0
votes
1 answer

Handle multiple emits in socket.io with long polling

Is there any good solution to support long polling clients in scenarios like this: sockets.in("room1").volatile.emit(message); sockets.in("room2").volatile.emit(message); The client is in both rooms and is only received the message in one of the…
Mattias
  • 684
  • 3
  • 7
  • 16
0
votes
1 answer

Polling for database changes: OracleDependency, SignalR, or is that too much?

I suppose I'm looking for a best practice, but I've read conflicting information on the various ways to do this. I'm attempting to put together an example of a webpage that contains a grid of information that shows exactly what is in the database.…
jlrolin
  • 1,604
  • 9
  • 38
  • 67
0
votes
2 answers

How HTTP streaming is different from Comet for server push?

I want to implement Server Push in my Java web application. HTTP Streaming is that I can open a connection with the client and its always open and sends data whenever server gets it. 1. But how is this different from Comet? 2. I want to use server…
0
votes
5 answers

JSON data if/else parse

I am doing some long polling (ajax) and I am looping the following portion of code.. There is code being executed above and below. This code is part of an internal messaging system. A certain portion of the page wil blink when a message arrives. If…
greycode
  • 113
  • 5
  • 16
0
votes
1 answer

Simpliest python long polling

I saw some threads about long polling in python, but my problem is not so bit to use some additional kits like tornado etc. I have js client. It sends requests to my /longpolling page and wait for response. Once it get response or timeout it sends…
Luft-on
  • 179
  • 1
  • 13
0
votes
1 answer

long polling ajax request is added every time parameter changes

function AjaxRequest(params, url) { if (params) { this.params = params; this.type = "GET"; this.url = url; // this.contentType = "multipart/form-data"; this.contentLength = params.length;; …
0
votes
1 answer

help with python forking child server for doing ajax push, long polling

Alright, I only know some basic python but if I can get help with this then I am considering making it open source. What I am trying to do: - (Done) Ajax send for init content - Python server recv command "init" to send most recent content - (Done)…
David
  • 728
  • 2
  • 14
  • 28
0
votes
1 answer

jQuery and PHP - Comet

I've searched Google a lot. In all the examples having Comet with PHP and jQuery. They are doing: setTimeout(function(){ check_new_data_function() }, 5000); function check_new_data_function(){ $.ajax{ blah } } And yes, it's pretty…
behz4d
  • 1,819
  • 5
  • 35
  • 59
0
votes
1 answer

Most efficient way to get live updates from server?

What is the most efficient way to get live updates from an online sevrer without DDOSing it or slowing down the client application? *I heard about long-polling once but I'm not sure if it's the best way or how to implement it in C#.
Dan Barzilay
  • 4,974
  • 5
  • 27
  • 39
0
votes
1 answer

Does RestKit supporting long polling and what would I do if app run in background

I Googled around and I can't find many discussions on this. I want to develop an iOS program that would use access a REST service, and I want to get notified of updates so I am thinking of long polling. Does RestKit deal with this? Another…
huggie
  • 17,587
  • 27
  • 82
  • 139