polling

How Polling mechanism can be realized with RMI?

Hi! Following the design/architecture i created for multiuser/network turn-based game with RMI server callbacks, I have tried to create a distributed animation in which my model(Ball) is remote object and it updates the clients via callback mechanism from server. The current situation of code is : The model remote object, which is it...

Java: Detecting modification to a file (file polling?)

What is the most efficient way to detect modification to a file in Java? I've read about file polling however, the polling approach has a number of drawbacks that become apparent as the number of watched files increases. I rather not use polling but a number of solutions online appear to point to file polling as the recommended method. ...

VB.NET Serial polling without mix-ups using the DataRecieved event

VB.NET 2010, .NET 4 Hello, I currently have a class that represents a serial device. The communication paradigm is: Send a command/request, the device then sends an acknowledged or not-acknowledged byte. If acknowledged, the device sends its response. The way this is being done right now is: A timer periodically sends a command/re...

How can my desktop application be notified of a state change on a remote server?

I'm creating a desktop application that requires authorization from a remote server before performing certain actions locally. What's the best way to have my desktop application notified when the server approves the request for authorization? Authorization takes 20 seconds average on, 5 seconds minimum, with a 120 second timeout. I co...

Trying to increment a javascript counter when using polling ajax http requests

Hi, I have a script that is running every 5 seconds, as a polling ajax http request. I want to send an incrementing amount through it, on each request (1,2,3,4,5,6 etc...) I have this so far, but the code just sends '1' through all the time. // set the value to 1 var state = { recordId: 1 }; $.ajaxPoll({ url: "map-s...

Ajax Polling with 1000 Chat Users

We want to have an ajax call execute every 100 seconds that requests a boolean value from the database that tells the client side if the user is still authorized to ask questions. I'm afraid that even though this is a very small amount of data being requested that it might be too much for the database.. Worst case scenerio, 1000 users ...

Django Poll for new records

In ajax I am polling a django url to retrieve the latest records. I do not want to display any records I have retrieved previously and I only want to retrieve 1 record for each poll request. What would be the best way to do this? ...

unable to refresh a page when i use setInterval() and pass in a function that uses document.write to output some javascript to the page

basically i have a blank html page that includes a javascript file, and in the javascript file i have this: function doIt() { document.writeln("asdf"); } // could also be setTimeout setInterval("doIt()", 5000); When the html page loads, it waits 5 seconds and then will output "asdf" every 5 seconds to the screen. If i hit refresh or...