polling

After jQuery poll, do I have to destroy and re-init draggable and droppables?

when polling the server do i need to destroy the draggables and droppables before i re-instantiate the functionality? Basically every so often I run a function that updates a div and then i have the function run: $(".dragMe").draggable({helper: 'clone', opacity: 0.50, appendTo: 'body', zIndex:4, addClasses: false}); $(".drop").drop...

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 interval pulling for new message for a global chat system (like Facebook/MySpace). Functio...

How to configure dojox.cometd for callback-polling?

So far I found some examples on how to configure dojox.cometd, but none of them configure the connectionType. I am currently more interested in callback-polling instead of the long-polling (that is the default one, as far as I know). Somebody can help me here? I must admit that the dojox documentation is quite obscure for me, and even t...

Asp.net chat application using database for message queue

Hello, I have developed a chat web application which uses a SqlServer database for exchaning messages. all clients poll every x seconds to check for new messages. it is obvious that this approach consumes many resources, and I was wondering if there is a "cheaper" way of doing that. I use the same approach for "presence": checking wh...

In Linux, polling in a conscientious way

When you've got a tight loop polling the status of something, I'm not quite sure how to do the polling without getting in the way of other processes wanting to use the CPU. For instance, doing this: while (state == BUSY) state = check_state(); seems like a waste of resources. I would think the best way to do this would be: while (sta...

(Win/C#/.Net) Applet needs to poll at hourly interval - recommendations on best method?

Applet needs to poll for existence of a directory, say, every 1-4 hours, and send a couple emails/NET SENDs if it is not found. Not sure on exact interval yet, but it will definitely not be shorter than 1 hour. The overall "job" will be permanent and continuously-running for the foreseeable future. Applet will be running on a Win2k3 S...

Boost interrupt in naive polling implementation

I have a developed a simple polling thread (using Boost 1.39.0) which checks whether a data resource has been accessed within a given timeframe and clears the connection if not. The relevant code can be reviewed below. My concerns are twofold: 1) Is using interrupt on a sleep appropriate to close down the thread safely? Will the interr...

Watching a folder using Win32

I'm looking for a straightforward way to watch the contents of a folder using Win32 (minimum target is XP). If possible, it would be nice to use an event-driven approach rather than a polling-type approach. To complicate things, the watched folder may be a network share. I'm really only interested in capturing "new files". I don't care ...

Getting historical data from Twitter

Hi, goodday. For a research project I would like to get the last 3 months worth of Twitter messages. Technical challenges aside, is this possible? by using some sort of slow polling mechanism to keep the rate limiter at bay? The Twitter API states "Clients may request up to 3,200 statuses via the page and count parameters for timeline...

GKSession using pollling

From what i'm reading in the apple documentation, GKSession works using delegates (for example when receiving data, or establishing connections). Has anybody managed to work with the GKSession using polling ? I'd like my game to test each frame if it has any available data and then read it. The same for establishing a connection. Is t...

Hudson infinite loop polling for changes in Git repository?

The git plugin for hudson works well. However, the build script must update a version number in the files in the repository, commit, and push back to the repository. When Hudson polls next to check for changes, it goes into an infinite loop because it sees that commit as a "change" builds again, which commits a change, so it builds agai...

C#: Handling terminate signal in TCP handler thread?

I am using the TcpClient class in C#. Each time there is a new tcp connection request, the usual practice is to create a new thread to handle it. And it should be possible for the main thread to terminate these handler threads anytime. My solution for each of these handler thread is as follows: 1 Check NetworkStream's DataAvailable ...

Using SqlCacheDependency to get real time updates? - ASP.NET

I would like to display real time updates on a web page (based on a status field in a database table that is altered by an external process). Based on my research, there are several ways of doing this. Long Polling (Comet) - This seems to be complex to implement Regular Polling - I can have an AJAX method trigger a database hit every 5...

HTTP parallel requests and AJAX/polling

Okay, so we all know that most modern browsers (without tweaking) are set to 4 parallel HTTP requests at a time to a single domain/subdomain, but how does long-polling AJAX affect this? Say I have a long-poll on a 15 second interval. While the browser is waiting for a response during those 15 seconds, does that still eat up one of the 4...

I'm in MVVM ViewModel hell

So far, I am really happy with the way things have gone in my app's transition from typical click event handlers everywhere, to complete GUI decoupling. Now I'm running into something I can't quite figure out, and it's related to a window that I want my GUI to pop up, and it needs to display information from the model. I guess the shor...

Using nginx for polling rss

I'm interested in using Nginx for polling rss feeds. Here's the problem: I have about 1,000 very large feeds -- where I'm going to use superfeedr.com I have about 20,000 very small blogs where I need to have my own infrastructure built to poll RSS feeds. (superfeedr is just too expensive, and I'm looking at an infrastructure i can exte...

How can I write a real time stats system? in ajax and php

I trying to make a realtime stats bar. And I think of using the Long Polling concept. But when a request is send to php. I need a way of testing if the stats are updated. Now I can just make a loop with a database query, and test it. But that just doesn't seem right to me :) Is there a more inexpensive method of testing the database f...

Updating data in a client application, how to avoid polling?

I have a desktop client application that is talking to a server application through a REST API using simple HTTP posts. I currently have the client polling every X minutes, but I would like the data to be refreshed more frequently. Is it possible to have the server notify the client of any new data, or is that outside the scope of what a...

BizTalk - Receive Port reading twice from DB

My receive port is of sqlBinding and typed polling. It invokes a SP to fetch a record and based on filter condition the corresponding orchestration kicks off. The BizTalk group consists of 2 servers; thus 2 ReceiveHostInstances. If both the host instances are running -at some point the same request is being read twice - causing a duplica...

Comet vs Ajax for chatting

My site needs a chat room, and I'm also looking to implement a facebookesque person to person chat system. What is most cost-efficient/performant (purely in terms of bw and server) for me. A regular 1 second poll ajax chat, or a comet solution. Thanks. ...