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
12
votes
4 answers

Watching a variable for changes without polling

I'm using a framework called Processing which is basically a Java applet. It has the ability to do key events because Applet can. You can also roll your own callbacks of sorts into the parent. I'm not doing that right now and maybe that's the…
squarism
  • 3,242
  • 4
  • 26
  • 35
12
votes
1 answer

Java equivalent of C's poll()?

As the title suggests, I'd like to know what is Java's equivalent (or most similar) function to C's poll() function for polling a set of file descriptors?
Stephen Walsh
  • 815
  • 4
  • 18
  • 34
12
votes
1 answer

Poll vs. Push - Any reasons to avoid Push Notifications?

I just inherited an Android app project as a (technical) product manager that uses a 5 second timer to poll a remote URL to see if some work initiated by the app has finished. My initial reaction of course was to suggest to replace this with a…
janpio
  • 10,645
  • 16
  • 64
  • 107
12
votes
1 answer

Using the Linux sysfs_notify call

I am trying to communicate asynchronously between a kernel driver and a user-space program (I know there are lots of questions here that ask for similar information, but I could find none that deal with sysfs_notify). I am leaving Vilhelm's edit…
Digilee
  • 191
  • 1
  • 2
  • 11
12
votes
1 answer

Backbone.js: define timeout for Backbone.sync implementation

I'm using backbone on a project of mine, integrated with communication to an external API. I want to use real-time updating of records. Since I don't have access to the main backend of this external application, and they don't provide neither…
ChuckE
  • 5,610
  • 4
  • 31
  • 59
12
votes
1 answer

Akka for REST polling

I'm trying to interface a large Scala + Akka + PlayMini application with an external REST API. The idea is to periodically poll (basically every 1 to 10 minutes) a root URL and then crawl through sub-level URLs to extract data which is then sent to…
user1403269
  • 121
  • 1
  • 4
11
votes
3 answers

How does facebook push data to news feed?

I am curious as to how Facebook pushes data to the browser as in the news feed. New data shows up at the top of the feed without reloading the page or clicking a button Does Facebook achieve this by polling their server through AJAX at a set…
Drew Galbraith
  • 2,216
  • 4
  • 19
  • 22
11
votes
5 answers

Good C#.NET Solution to manage frequent database polling

I am currently working on a c# .NET desktop application that will be communicating to a database over the internet via WCF and WCF Data Services. There will be many spots in the application that may need to be refreshed upon some interval. The…
BernicusMaximus
  • 250
  • 2
  • 13
11
votes
2 answers

Kafka Consumer's poll() method gets blocked

I'm new to Kafka 0.9 and testing some features I realized a strange behaviour in the Java implemented Consumer (KafkaConsumer). The Kafka broker is located in an Ambari external machine. Even thou I could implement a Producer and start sending…
aran
  • 10,978
  • 5
  • 39
  • 69
11
votes
3 answers

Nonblocking Get Character

Platform: Linux 3.2.0 x86 (Debian 7) Compiler: GCC 4.7.2 (Debian 4.7.2-5) I am writing a function that reads a single character from stdin if a character is already present in stdin. If stdin is empty the function is suppose to do nothing and…
John Vulconshinz
  • 1,088
  • 4
  • 12
  • 29
11
votes
1 answer

Why doesn't this call to `poll` block correctly on a sysfs device attribute file?

I have a simple sysfs device attribute which shows up under my sysfs directory, and on a call to read returns the value of a kernelspace variable. I want to call poll on this attribute to allow my userspace thread to block until the value shown by…
Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114
10
votes
1 answer

MemoryCache - prevent expiration of items

In my application I use MemoryCache but I don't expect items to expire. Items are therefore inserted to the cache with default policy, without AbsoulteExpiration or SlidingExpiration being set. Recently, on high server last, I experienced problems…
Wojtek
  • 135
  • 1
  • 1
  • 9
10
votes
2 answers

How can I save aside an object in awaitility callback?

My code calls a server and get a old-response. Then I want to poll until I get a different response from the server (aka new-response). I I use while loop I can hold the new-response and use it after polling. If I use awaitility how can I get the…
Elad Benda2
  • 13,852
  • 29
  • 82
  • 157
10
votes
3 answers

Haskell: Monitor a file without polling (à la inotify in linux)

Is there a haskell library function to monitor a file without polling? With polling i would do someting like this: monitor file mtime handler = do threadDelay n -- sleep `n` ns t <- getModificationTime file if t > mtime then…
scravy
  • 11,904
  • 14
  • 72
  • 127
9
votes
3 answers

How to poll with a Future in Scala?

I want to poll an API endpoint until it reaches some condition. I expect it to reach this condition in couple of seconds to a minute. I have a method to call the endpoint that returns a Future. Is there some way I can chain Futures together to poll…
user1943992
  • 222
  • 3
  • 11
1 2
3
96 97