polling

jQuery - polling of a job queue

喜你入骨 提交于 2019-12-04 17:19:34
I have a database table which contains a queue of jobs. A separate program processes these jobs. I want to provide a webpage for users to watch the progress of the queue. The Server side scripting to query the table and return it in a JSON format is no problem. I've done some reading on jQuery and the PeriodicalUpdater plugin . I'm wondering if it is at all possible to use this plugin to create a visual queue (a basic explanation would be a one column table, with a row per entry in the queue), where jobs which have been completed are removed the next time it polls. As I say, the server side

Directory Scanner in Java

为君一笑 提交于 2019-12-04 14:40:59
Scan a set of directories continuously for a set of file name filters. For each file name filter arrived, process the file and repeat the steps for all What can be the recommended design for this in jdk 1.5 , possibly using java.concurrent.Executor and Future I have done a similar task with the web crawler.Just a few changes had to be made... It is a concurrent implementation with newly found directories getting scanned by the thread pool in the Executor Framework.It uses concurrent collections for Queue and List to hold the indexed files. The indexer picks up the files from the queue and does

BizTalk - Receive Port reading twice from DB

家住魔仙堡 提交于 2019-12-04 12:22:12
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 duplicate at the receivers end. But, why is the reeive port reading it the same record more than once? The proc which reads the updates the record and updates it so that it wont be fecthed again. I observed this scenario while submitting 10 requests; receive port read

Is there a notification mechanism for when getifaddrs() results change?

六眼飞鱼酱① 提交于 2019-12-04 11:32:47
On startup, my program calls getifaddrs() to find out what network interfaces are available for link-local IPv6 multicasting. This works as far as it goes, but it doesn't handle the case where the set of available network interfaces changes after getifaddrs() has returned. Is there some way for the OS to notify my program when the network interfaces have changed, so I can call getifaddrs() again and update my list? Or am I doomed to poll getifaddrs() every few seconds, forever? (Note: on Windows, I call GetAdaptersAddresses() instead of getifaddrs(), but the same issue exists there) You

What's the best way to ping many network devices in parallel?

Deadly 提交于 2019-12-04 11:32:04
问题 I poll a lot of devices in network (more than 300) by iterative ping. The program polls the devices sequentially, so it's slow. I'd like to enhance the speed of polling. There some ways to do this in Delphi 7: Each device has a thread doing ping. Manage threads manually. Learn and use Indy 10. Need examples. Use overlapped I/O based on window messages. Use completion ports based on events. What is faster, easier? Please, provide some examples or links for example. 回答1: Flooding the network

To poll or not to poll (in a web services context)

懵懂的女人 提交于 2019-12-04 09:36:46
We can use polling to find out about updates from some source, for example, clients connected to a webserver. WCF provides a nifty feature in the way of Duplex contracts, in which, I can maintain a connection to a client, and make invocations on that connection at will. Some peeps in the office were discussing the merits of both solutions, and I wanted to get feedback on when each strategy is best used. I would use an event-based mechanism instead of polling. In WCF, you can do this easily by following the Publish-Subscribe framework that Juval Lowy provides at his website, IDesign.net .

Hudson infinite loop polling for changes in Git repository?

依然范特西╮ 提交于 2019-12-04 06:55:38
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 again, then it commits another change, etc... You get the idea. I stopped it, ran a "git log" in each repository and compared the latest commit ids are exactly the same using git ls-tree HEAD Also, Hudson runs this command to check for changes: git fetch +refs/heads

Non-Flickering Polling in Angular with REST Backend

时光怂恿深爱的人放手 提交于 2019-12-04 05:15:57
I managed getting a constant polling of the backend functional using this answer. But on every timeout the UI is flickering (empty model for a short time). How can I update the model (and the view respectively) after the new data arrived in order to avoid this flickering effect? Here is my current controller (slightly modified from step_11 (Angular.js Tutorial) ): function MyPollingCtrl($scope, $routeParams, $timeout, Model) { (function tick() { $scope.line = Model.get({ modelId : $routeParams.modelId }, function(model) { $timeout(tick, 2000); }); })(); } // edit: I'm using the current stable

How to automate task of consuming webservice

烂漫一生 提交于 2019-12-04 04:52:08
问题 I have a winform application which needs to consume a web service . Web service checks in the database for any changes. If there are any changes in the database the winform application should be notified and will perform some tasks accordingly. How do I do that? I thought of using timer in my winform application and after say every 5 min connect to a web service and check if new changes are been done in Database. Is there any other way for this? Update: I am posting the code here base on the

Long polling in Laravel (sleep() function make application freeze)

最后都变了- 提交于 2019-12-04 04:45:39
I'm trying to program long polling functionality in Laravel, but when I use the sleep() function, the whole application freezes/blocks until the sleep() function is done. Does anyone know how to solve this problem? My javascript looks like this: function startRefresh() { longpending = $.ajax({ type: 'POST', url: '/getNewWords', data: { wordid: ""+$('.lastWordId').attr('class').split(' ')[1]+"" }, async: true, cache: false }).done(function(data) { $("#words").prepend(data); startRefresh(); }); } And the PHP: public function longPolling() { $time = time(); $wordid = Input::get('wordid'); session