Questions tagged [polling]

Polling is actively sampling the status of an external device by a client program as a synchronous activity.

Polling is actively sampling the status of an external device by a client program as a synchronous activity.

Reference:

1451 questions
4
votes
2 answers

how to poll a resource using jersey service

i have a jersey service which generates a response. what i want to do is to poll a resource (in my case, a singleton class instance) for a success value, and as soon as i get the success value, perform some action @Path("/generate") class…
Gaurav Sood
  • 680
  • 4
  • 17
  • 38
4
votes
1 answer

Python Subprocess Wait for any subprocess which finishes first

I'm currently running some subprocesses in parallel(multiple subprocesses), {p1, p2, p3, p4}. I'd like to wait() until any of them finishes. I'm currently polling in a while loop which is probably very inefficient proc = [p1, p2, p3, p4] while…
Chang Hyun Park
  • 521
  • 1
  • 6
  • 22
4
votes
1 answer

when polling is better than interrupt?

I was looking at this pic: and have 2 questions regarding it: 1. how much faster should a disk be in order for polling to be refered over the interrupt? I thought that beacuse of the ISR and the process jumping (when using interrupt) - that polling…
user1386966
  • 3,302
  • 13
  • 43
  • 72
4
votes
2 answers

Java poll on network connections

I am writing a program in Java where I have opened 256 network connections on one thread. Whenever there is any data on a socket, I should read it and process the same. Currently, I am using the following approach : while true do iterate over…
prathmesh.kallurkar
  • 5,468
  • 8
  • 39
  • 50
4
votes
3 answers

Concurrent AJAX interval polling

Aside from the obvious heavy load on the server, is it bad to have several concurrent AJAX polls going on at the same time? Or is there even a limit as to what a browser/server can handle? Example (all AJAX polling).. Function A is on a 3 second…
nkspartan
  • 487
  • 1
  • 7
  • 17
4
votes
2 answers

How to do Polling and also check for new incoming data in a Database for a regular interval

Here the method reads the database which has an unique ID with the sequence number which keeps on increasing, since am a beginner in java,can I know how to implement this repetitive polling and check for new incoming message each time. /** * Method…
Babu
  • 299
  • 1
  • 3
  • 12
4
votes
6 answers

How to notify my JS client without polling?

Context: From my javascript web UI, I launch a long-running (several minutes) operation that is conducted on the .NET2.0 backend. The call returns immediately with operation ID while the long-running operation run parallel. The operations are not…
user256890
  • 3,396
  • 5
  • 28
  • 45
4
votes
3 answers

Is there a notification mechanism for when getifaddrs() results change?

On startup, my program calls getifaddrs() to find out what network interfaces are available for link-local IPv6 multicasting. This works as far as it goes, but it doesn't handle the case where the set of available network interfaces changes after…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
4
votes
4 answers

polling a HTTP server from J2ME client

I have a J2ME app running on my mobile phone(client), I would like to open an HTTP connection with the server and keep polling for updated information on the server. Every poll performed will use up GPRS bytes and would turn out expensive in the…
Kevin Boyd
  • 12,121
  • 28
  • 86
  • 128
4
votes
3 answers

To poll or not to poll (in a web services context)

We can use polling to find out about updates from some source, for example, clients connected to a webserver. WCF provides a nifty feature in the way of Duplex contracts, in which, I can maintain a connection to a client, and make invocations on…
Irwin
  • 12,551
  • 11
  • 67
  • 97
4
votes
2 answers

Can I use Spring Integration as a daemon in order to poll a directory?

I am new to Spring Integration and I am considering using it in order to poll a directory for new files in order to process those files. My question is: is Spring Integration some sort of daemon one can launch and that one can use in order to poll a…
balteo
  • 23,602
  • 63
  • 219
  • 412
4
votes
1 answer

Java Thread stopping when hiding to SystemTray

For my parents I am writing a simple program to copy files from their digital photocamera to their 'My Documents' folder. They always need my help (they are not so technically advanced) to get their pictures off their camera so I decided to help…
Rick Slinkman
  • 643
  • 10
  • 23
4
votes
2 answers

Adaptive polling with JSF and PrimeFaces

In order to refresh data, I use a primefaces poll: and would like to control the update interval with a spinner.
kostja
  • 60,521
  • 48
  • 179
  • 224
4
votes
4 answers

Most efficient way to tail/poll a log file in Java

There are many approaches, one could use create a Program and just call the Unix tail command, however the problem with this is that the process must be installed on a Unix machine with tail installed. The other option is to just read the file,…
NightWolf
  • 7,694
  • 9
  • 74
  • 121
3
votes
2 answers

AJAX polling and looping

My project is basically like a Reddit feed that updates in real-time. I'm trying to use AJAX to poll the server at intervals for updates on 15 items at a time. I wrote a for loop but it caused the browser to lock up (I'm guessing too many XHRs?).…
Delos Chang
  • 1,823
  • 3
  • 27
  • 47