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

What is the best way to change from polling to events?

If you were to parse 300 bytes of raw data 20 times a second into a bunch of WPF control properties, what would your solution be? More specifically, I have a Modbus-enabled PLC and I need to make a WPF HMI for controlling it. Modbus is a…
Yegor
  • 2,514
  • 2
  • 19
  • 27
3
votes
1 answer

Jquery PHP mySQL ajax method to sync data to two clients?

I'm developing an app where two or more separate clients will exchange specific information via a server transfer in real time by all clients invoking the process at approximately the same time (within less than 2 seconds or so of each other). The…
Inator
  • 994
  • 2
  • 14
  • 33
3
votes
1 answer

GOLANG: Why does SetDeadline/SetReadDeadline/SetWriteDeadline not work on a file when using os.File.Fd()?

I am using a combination of os.File.SetReadDeadline and os.File.ReadFull. But even if using SetReadDeadline, the deadline I have set is completely ignored and ReadFull blocks forever. Why is that? Additional info: I fire some IOCTLS towards the file…
Xerusial
  • 525
  • 1
  • 5
  • 17
3
votes
2 answers

Sencha Touch: Implementing Polling

I'm writing a mobile chat client for Microsoft Lync using Sencha Touch. On the server side I'm using the JSONP-enabled WCF service from the lyncwidget codeplex project (http://lyncwidget.codeplex.com) Upon being called, the WCF service returns any…
Thomas Stock
  • 10,927
  • 14
  • 62
  • 79
3
votes
1 answer

How do I start and stop javascript-initiated queries in my Rails app?

I have an app that needs to periodically update a "news" area of the screen as long as my Publisher object has news. When there is no news, that area of the screen is hidden (or simply not rendered), and updating stops. I've used Ryan Bates's…
fearless_fool
  • 33,645
  • 23
  • 135
  • 217
3
votes
5 answers

Best practice to detect two simultaneous signals on two input pins

I need to do the following: I have 2 input pins on a microcontroller, and it is possible, that a signal is received on one or the other, but it is also possible that the two will be physically connected on the outside, and the signal arrives on both…
vsz
  • 4,811
  • 7
  • 41
  • 78
3
votes
2 answers

RTK Query hooks - preventing polling to auto refetch when arg change

I'm trying to refresh a token in a Query hook, with the polling feature every 9 seconds: "/App.tsx" .. ... const [storedToken, setStoredToken] = useState(getStoredToken()); const { data, error, refetch } = useRefreshUserQuery(storedToken, { …
Laurent
  • 119
  • 3
  • 6
3
votes
2 answers

When will FireFox support websockets?

I know that it's possible to enable websocket support in FireFox, but does anyone know when they will fully support it? Using a websocket is so much nicer than using AJAX polling >.<
Clinton Jooooones
  • 887
  • 3
  • 12
  • 19
3
votes
1 answer

Is polling a better option than setting multiple setTimeout()

I'm developing an email reminder system to ping users 24, 8, 3, and 1 hour before a task is due. I have a server that runs on Node.js. My first idea was to set four separate setTimeout() each time a user is assigned a task. However, I assume that…
mitmath514
  • 347
  • 1
  • 4
  • 9
3
votes
1 answer

Is polling a receive-block in erlang good practice?

I'm new to Erlang and have a question about the receive block. I'm trying to receive one or more message(s) from a child process that is performing a task. The way I found out how to receive a message is by using a receive-block. E.g. main() -> …
3
votes
0 answers

Linux on RPi debian, hidraw write() to USB device outputs a few junk characters to /dev/hidraw0 which if not cleared jam the device

We have a set of USB devices which we monitor using a RPi. The monitoring code polls the devices using hidraw direct interface about once a second. The protocol uses 64 byte packets to send commands and receive data and all responses are 64 bytes…
David Gabbay
  • 131
  • 1
  • 5
3
votes
0 answers

Is this system an optimal solution to sync an app with a server in real time efficiently?

Problem I have an Android and iOS app, looking like a classic social network. I need to update UI in real time. Currently, I use a classic system of a client polling each second to a php script by HTTP. The php script bother the database every…
Jerem Lachkar
  • 1,008
  • 11
  • 24
3
votes
2 answers

Websocket api with serverless framework (BlitzJs)?

I am using a serverless framework Blitz.js for my app. However, now I want to implement a notification system so the user is notified of any updates. As Blitz.js is serverless, I am not sure how to proceed. Apologies for the open-ended question,…
Kayote
  • 14,579
  • 25
  • 85
  • 144
3
votes
5 answers

AJAX/PHP Why is HTTP-Polling so laggy?

Why is HTTP-Polling so laggy? What I have is a button, and whenever a user clicks it a MySQL database field gets updated and the value is displayed to the user. I'm polling every 800 milliseconds and it's very laggy/glitchy. Sometimes when clicking…
clbembry
  • 33
  • 2
3
votes
3 answers

How to do polling in svelte?

I have a specific app which should do the following: You have a list of jobs to inspect When you click a job you get a detail view The detail view will poll the API to see live progress updates I did a basic implementation in the following REPL:…
Wilco
  • 928
  • 3
  • 9
  • 20