polling

How do I implement a Comet Programming technique (AJAX long polling)?

Current Project Setup I'm prototyping an online chat system similar to Facebook chat, using PHP, AJAX, a lot of jQuery, and a MySQL database. I'm developing on an Apache Server 2.2.14 (all local... working on a MacBook Pro 10.6.4). The way I listen for incoming chats and check for new messages in an existing chat is by doing: setTime...

Poll is causing crash

Hi, I am getting a crash with following values :- Poll is the system call in use giving "errno" as 24 (EMFILE) and struct pollfd has values "fd = 1022, events = 1, revents = 32" Here we are woking on "fd = 1022" then why it is showing "errno" as 24 (EMFILE /Too many files open/) I have multiple threads which works in an Infinite loop...

is there something wrong in my server polling method?

im trying to get a post from a php file when it has something from the database. this is the js script that sends the post request (im using jquery and the smartupdater plugin) function update(){ $(document).ready(function(){ $("#myp").smartupdater({ url:"listen.php", type: POST minTimeout:2000 },function(data){ $("#myp").before(...

Directory polling to JMS Queue

Is there a open source message broker out there which allows you to configure a file directory as a source, and it will automatically poll this directory for NEW files and send it to a JMS Queue? I heard IBM Message Broker can do this, is there a open source alternative? ...

How to poll for updates with JSONP?

I have a Web server that updates its data once per minute, and want to make that data available to clients of all types. In order to reduce bandwidth, I set up the PHP script to support conditional GETs, using IF-MODIFIED-SINCE and/or IF-NONE-MATCH. The idea is that clients can poll every 30 seconds and thereby be sure that they won't ...

file descriptor polling

Hi, I have created a following program in which I wish to poll on the file descriptor of the file that I am opening in the program. #define FILE "help" int main() { int ret1; struct pollfd fds[1]; ret1 = open(FILE, O_CREAT); fds[0].fd = ret1; fds[0].events = POLLIN; while(1) ...

java swing updating content in frame

I'm currently working on a sample application in java. I haven't really used java for much more than hello world before so please bear with me. I've set my application up so It's polling a mysql database for information. The issue I have now has to do with updating the content in the frame. Currently I have it opening a new window with t...

C# : How to capture events asynchronously and return a value from a function synchronously

This is a C# question I want to do a synchronous call for asynchronous event call backs. See comment in code for the req class User { EventHandler Service1Started() { "Looks like service 1 started as I got event from server class" ; } EventHandler Service2Started() { "Looks like service 2 started as I got...

rsync: polling for new files

I've got: $ rsync -azv zope@myserver:/smb/Data/*/*/* ~/rsynced_samples/ And I want it to run forever, syncing any new file as soon as it appears on myserver: (specifying a poll interval, such as 4 seconds would be an ok comprise) ...

[rails] Elegant way to perform polling while user is waiting in real time

What is an elegant way to perform polling while the user is waiting? This is what i mean: 1) User clicks a bottom 2) Server performs an action that might take a few minutes 3) Want the page to constantly poll the server for updates 4) if not ready, returns back a status message with updates, if ready, show time taken Did you have any ...

Server polling with JavaScript

What is best practise for polling server with JavaScript for application that needs to refresh data very rapidly? I'm using jQuery for front-end and Java Spring Framework for backend. Example of refreshed data could be list of items that are getting updated very rapidly (every 1 second). ...

What is a good setTimeout interval for polling in a IE?

I have an ActiveX object (who source code I have) running in a browser (IE). The ActiveX object has a UI, which raises events. I want to respond to those events in the browser. I don't want to invoke JavaScript functions from the ActiveX object events: and therefore, instead, I want the JavaScript to poll a method of the ActiveX object ...

SL4 HttpPollingDuplex binding in IIS5.1

I am trying to add a http polling duplex service into my website. I am using IIS5.1 on Windows XP. When I add reference to the System.ServiceModel.PollingDuplex.dll (ver 4), VS gives me this warning: "System.ServiceModel.PollingDuplex.dll", or one of its dependencies, requires a later version of the .NET framework than the one specifie...

Jquery Ajax calls crashing Internet Explorer?

I must admit, this is my first post on this site, so I apologise in advice if I do something wrong (formatting etc). Anyway, I'm creating a kind of mmo using javascript (and jQuery), and so far everything is running fine in Chrome, Safari, Firefox, etc. However, I've found that somewhere along the line, Internet Explorer crashes. By ...

What's the fastest way to poll a MySQL table for new rows?

My application needs to poll a MySQL database for new rows. Every time new rows are added, they should be retrieved. I was thinking of creating a trigger to place references to new rows on a separate table. The original table has over 300,000 rows. The application is built in PHP. Some good answers, i think the question deserves a boun...

Does refreshing mysql query by jQuery ajax crashs the database?

Hello I'm using jQuery .ajax function to load php page with a mysql query in it that selects data from the database, but my question is: Does refreshing mysql query by jQuery ajax crashs or tiring the database? Info: Refreshing by 1 second using setInterval(). Edited: This the queries that I use to refresh them. SELECT * FROM table1 ...

Silverlight Polling Duplex with HTTPS

Is it possible to have Silverlight Polling Duplex WCF working with HTTPS? ...

Framework for polling and storing results of external data sources

We have a need to poll a number of external data sources. The data sources initially are SOAP web services, but they might be in future RESTful web services, flat files, or other things. The polling period needs to be configurable (ideally per-data-source). The returned data initially is XML, but in future it might a line from a file ...

How to poll simple website for updates?

I have a professor who randomly updates his website with homework due tomorrow and seems to expect us to check it every hour. This sounds like a job for a program. His website is simple and entirely html, not even any javascript. How could I programatically detect any changes/updates to his website? ...

StreamedResponse with Silverlight 4 polling duplex not sending updates

I'm trying to enable a streamed response using Silverlight 4 and polling duplex, but I'm getting strange behaviour when the rate at which updates are sent to the client is greater than the maxOutputDelay, which results in no updates being sent. For example, with a maxOutputDelay of 7 seconds, and 1 update sent every 10 seconds, everythi...